[Sugar-devel] installing a font?
bert at freudenbergs.de
Mon Oct 31 11:08:29 EDT 2011
On 26.10.2011, at 23:43, Erik Blankinship wrote:
> Is there a way for an xo bundle to install a font to the system (for cairo to use)?
No, and it shouldn't, since activities need to be self-contained.
If your activity wants to use that font, then just use the font file directly from your activity bundle, like in a "fonts" subdirectory.
E.g., in FreeType you can just give a full path to a font file:
So FT_New_Face() would create a face from a file, and then cairo_ft_font_face_create_for_ft_face() creates a corresponding Cairo font face:
Similarly, cairo_ft_font_face_create_for_pattern() seems to allow making a face from a FC_FILE pattern.
- Bert -
More information about the Sugar-devel