Another proposal for saving custom fonts in fontconfig

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

 



Hi,

Based on previous fontconfig cache API proposal, I propose some small
additions with some command line tool for font package maintainers.

FcBool
FcDirCacheAddStyle (const FcConfig *config, const FcChar8 *file,
const unsigned int index, const FcChar8 *stylename, FcPattern *custom);

The FcPattern *custom will contains all the properties to be
overridden.

FcBool
FcDirCacheRemoveStyle (const FcConfig *config, const FcChar8 *file,
const unsigned int index, const FcChar8 *stylename);

To remove the saved custom style name.

To add some custom style when install the font package,
provide some command line tool `fc-custom` to add custom style into
fontconfig cache.

To add some custom style:
$ fc-custom add-style "family name" "style name" "new style name" --
variations "wght=150;INKT=100" --features "kern 0, dlig"

To remove some custom style:
$ fc-custom remove-style "family name" "new style name"

But with this proposal, if user re-generate the fontconfig system
cache, the custom style maybe lost, like `fc-cache -fvr` with root
user.

Feel free to comment it.

Thanks,
  Peng

_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/fontconfig



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

  Powered by Linux