Hi, On Wed, Jun 26, 2019 at 4:14 PM Peng Wu <peng.e.wu@xxxxxxxxx> wrote: > > Hi, > > In order to support saving custom fonts from variable fonts in pango, > we propose to saving the information in fontconfig XML. > > URL: https://gitlab.gnome.org/GNOME/pango/issues/350 > > 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. What is that for? > 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); Are you expecting to input/output from/to file in fontconfig? I'm not yet fully understanding what exactly you want with it though, is it created/modified/removed by users and happens so often? What exactly the use case is it? > 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. What you said the above can be done without any changes even at this point, with FcFontMatch(). but FcFontList(). you can't expect any operations to rebuild the list with some modifications in FcFontList() like FcFontMatch() does. that will affects a lot to the performance. "custom" you said in your mail must be extracted prior to add to the list. what you can expect on FcFontList() is only filtering. Anyway, please elaborate more on use cases and requirements for input/output through fontconfig API. > > I will think about how to re-use the current fontconfig XML syntax, > and propose another XML syntax soon. > > Feel free to comment it. > > Thanks, > Peng > > _______________________________________________ > Fontconfig mailing list > Fontconfig@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/fontconfig -- Akira TAGOH _______________________________________________ Fontconfig mailing list Fontconfig@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/fontconfig