Pango and Cairo issues
-
Use
FT_HAS_GLYPH_NAMES
-
Remove PANGO_ENABLE_BACKEND
This macro was removed in Pango 1.44, which we request as a minimum version.
-
Make LilyPond recognize the 'CFF2' font format
This format gets used in OpenType Variation Fonts. Note that support for 'CFF2' is not possible in the PS backend. However, Cairo can handle them just fine.
-
Improve Pango handling of zero-width input characters for Cairo backend
Instead of falling back to glyph-only handling, adjust the glyph and cluster lists that are passed to Cairo. In other words, let Cairo decide what to do with input characters without associated glyphs.
Note that neither the PS nor the SVG output interface uses clusters.
-
cairo.cc, pango-font.cc: Improve
glyph-string
marshallingFinalize cluster data handling before it is passed to
cairo.cc
instead of doing it afterwards. -
output-svg.scm: Minor cleanup.
Rename arguments of
glyph-string
inoutput-svg.scm
to use the same names asglyph-string
inoutput-ps.scm
. -
s/w-x-y-named-glyphs/w-hd-x-y-g/
This fits better the actual contents of the list.
-
cairo.cc: Don't use
cairo_show_text
Probably due to a misunderstanding while developing the Cairo backend, glyph names 'uniXXXX' or 'uXXXXX' were mapped back to Unicode input characters. However, this didn't work correctly: The code assumed that there was either a string of Unicode characters derived from those glyph names, or an array of glyphs where a mapping to Unicode characters was not possible, but not both at same time. In reality, however, this actually does happen. For example, if an OpenType feature alters a glyph index, it is no longer mappable to Unicode.
This commit removes the use of a Unicode input string as an input for Cairo.
-
Improve Cairo support
Pass the glyph index to
glyph-string
also. This has two benefits for the Cairo backend:- By using glyph indices instead of glyph names, the code for handling
glyph-string
gets simplified a lot. - At the same time, it became more powerful since it now can handle Variation Fonts and CID-keyed CFFs without restrictions, for example.
No functional changes in the other backends.
- By using glyph indices instead of glyph names, the code for handling
-
Document function
glyph-string