are there additional font types for openvg C/C++ available ?
e.g.,
Zapfdingbats / Windings,
Symbol,
Greek alphabet,
EnglandHand or either handwriting font type,
7-segment LED,
There is a program that is compiled in the openvg (or openvg-master whichever was created when you unzipped the library) directory of libshapes called font2openvg this is the program that converts the .ttf file into an .inc file.davenull wrote:I have a lot of fonts on my Windows PCs
so given I wish to import
symbol.ttf
- I really don't understand what to do for openvg nevertheless. (Sorry, my English is too poor and Google translate is messing everything up.)
copy symbol.ttf into which Raspi directory ?
then how to include it into openvg font libs together with the 3 existing by which command,
so that it can be accessed from proprietary programs by the same way as the 3 existing ones?
these instructions as much to sink a ship tell me nothing, unfortunately... :-/
./font2openvg /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf DejaVuSans.inc DejaVuSans
and include the generated code in your program:
#include "DejaVuSans.inc"
Fontinfo DejaFont
The loadfont function creates OpenVG paths from the font data:
loadfont(DejaVuSans_glyphPoints,
DejaVuSans_glyphPointIndices,
DejaVuSans_glyphInstructions,
DejaVuSans_glyphInstructionIndices,
DejaVuSans_glyphInstructionCounts,
DejaVuSans_glyphAdvances,
DejaVuSans_characterMap,
DejaVuSans_glyphCount);
Code: Select all
pi@raspberrypi ~/myprog $ ~/openvg/font2openvg ~/myfonts/MyFont.fft MyFont.inc MyFont
Code: Select all
#include "MyFont.inc"
FontInfo myfont;
myfont = loadfont(MyFont_glyphPoints,
MyFont_glyphPointIndices,
MyFont_glyphInstructions,
MyFont_glyphInstructionIndices,
MyFont_glyphInstructionCounts,
MyFont_glyphAdvances,
MyFont_characterMap,
MyFont_glyphCount);