PangoFontDescription woes


I am investigating how one can handle fonts with multiple faces that
produce identical PangoFontDescriptions. For example Gunplay which has
two variants, "Regular" and "3D". The function:
pango_font_face_get_face_name() returns these face names for the two
faces but this information is not stored in PangoFontDescription and
there  does not appear to be anyway to use the names to choose which of
the two font faces should be used when rendering.

I've noticed that the Semi-Light weight has recently been added to
PangoWeight. This has caused us (Inkscape) some problems as CSS does not
allow the value 350 for weight and faces with a Semi-Light weight were
being interpreted in our code as Normal weight instead of the Light
weight as before. For the moment we our forcing Semi-Light to be
interpreted as Light. (Book and Ultra-Heavy have similar problems but
are not as common.) I can understand wanting to allow more weights but
increasing the number of values doesn't really help us. It makes being
CSS compliant more difficult while at the same time doesn't handle all
the possible font-face variants.

What I would like to do is be able to use a property in the Inkscape
namespace, e.g. -inkscape-facename, to store the face name as given by
pango_font_face_get_face_name() and then be able to use that property to
help select which face is rendered (when PangoFontDescription matches to
more than one font face). While this wouldn't help artists who are
targeting the web (who are limited by CSS), it would allow others to
have better access to the various font faces available.

An alternative would be for Inkscape to support the CSS @font-face rule.
This actually would be quite desirable for many reasons, however, Pango
doesn't seem to be able to handle user fonts.

Any ideas?



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