Open bhaskarvk opened 7 years ago
fontquiver exports fontset_register()
so other packages can provide their own fonts. I think you only need to register a fontset getter function, i.e. fontset_xyz()
, and a fontset data structure. The easiest way is probably to take https://github.com/lionel-/fontquiver/blob/master/R/fontset-liberation.R as a template.
Awesome, I was probably confused because of files fontset-bitstream-vera.R in this package, as opposed to the fontBitStreamVera package. This led me to believe that if I want to add some more fonts I'll probably have to do the same. Good to know that I can add more fonts w/o touching this package.
hmm I should probably export the font constructors (e.g. sans()
etc). In the mean time you can just copy them over in your package (from the file fontset.R).
Cool thanks. I'll keep this open for your reference.
If I want to add more fonts, I need to create a
fontXYZ
package similar tofontBitStreamVera
and then fork this project and add corresponding functions. This seems counter intuitive. It would be better if this package provides functions, that font packages can hook into, so that we can create font packages w/o needing to make changes every time to fontquiver pacakge. Or I am completely missing something very obvious.