Character code 0 in font with FT_ENCODING_ADOBE_CUSTOM not drawn
Cairo 1.16.0 does not draw the character with character code zero in a Postscript Type1 font with encoding ADOBE_CUSTOM in some situations.
Here is a program demo.cpp
that demonstrates the effect:
demo.cpp
I want to render two characters from TeX's CMSY10 font (/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb
on my Linux system), namely the minus sign (character code 0), and the setminus sign (character code 110).
When I run the program as
$ ./demo cmsy10.pfb 0 110
the output test.pfb
correctly has two glyphs.
However, when I run it as
$ ./demo cmsy10.pfb 110 0
then the second glyph (for the minus sign with character code 0) is missing from the output.
The different behaviour is perhaps caused by the line
(latin_character == 0 && sub_font->num_glyphs_in_latin_subset > 0))
in _cairo_sub_font_map_glyph
, but I haven't investigated why the glyph simply disappears.