On 8/16/07, Gail Banaszkiewicz <gbanaszk@...1686...> wrote:
It was suggested previously that we use the system font name, which I was going to use pango to retrieve (http://www.gtk.org/api/2.6/pango/pango-Fonts.html#pango-font-description-to-...). However, this function produces almost the same answer as pango_font_description_to_string(), so it's probably just as easy to use that function.
From description, I think we should use
pango_font_description_to_string() because it does not do space/underscore replacements.
There is another disadvantage: Pango doesn't support anything that CSS doesn't. For quite a long time I thought I could get around this because when pango finds fonts on the system, I was able to print out the information about even the non-CSS styles. Unfortunately, we are currently very dependent on the PangoFontDescription structure, and once this structure is obtained from this point on, we lose all non-CSS information. There are two things I would like to look into in the future: first, whether we can around this super-dependence on that structure and could use instead somehow the PangoFontFace structure that seems to contain all needed information; and second, perhaps contributing to pango and/or finding out why they don't have more general font support.
I'm not really qualified to give advice on this issue, but I would perhaps just try to store the PangoFontFace for a font in Inkscape in parallel with PangoFontDescription, so that this change would be minimally intrusive. Asking advice from Pango devs is also a good idea I think.