Another proposal for saving custom fonts in fontconfig

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



In order to support saving custom fonts from variable fonts in pango,
we propose to saving the information in fontconfig XML.


Here are some thoughts about C API and fontconfig XML syntax.

For C API, I think some bool property like FC_CUSTOM_FONT will need to
be added.
And some API to write or remove the custom fonts maybe also needed.

For C API:

To create the custom font file:
FcPublic FcBool
FcConfigCreateCustomFont(FcPattern *origin, FcPattern *custom);

To remove the custom font file:
FcPublic FcBool
FcConfigRemoveCustomFont(FcPattern *custom);

For fontconfig XML syntax, we have one proposal:

1. Create separate XML syntax for custom font file format to recognize
as normal fonts:

		<family>Variable Font Family</family>
		<style>Style Name</style>
		<family>Variable Font Family</family>
		<style>Custom Style Name</style>

After fontconfig finish font loading, the "origin" element will match
the existing fonts, and the "custom" element will copy and modify the
matched font,
then save the new font as normal font pattern into FcFontSet.

I will think about how to re-use the current fontconfig XML syntax,
and propose another XML syntax soon.

Feel free to comment it.


Fontconfig mailing list

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux