Re: character by name on the gnome canvas, custom fontencoding



> Right now, fontconfig only knows the zapfdingbats glyph names. If
> there are other standard glyphname->unicode mappings, it would be
> nice to add those to fontconfig.

I suggest to incorporate the Adobe Glyph List.

> Alternatively, I could provide an API that did name->glyph
> translations by inverting the existing FT_Get_Glyph_Name API if that
> would be of interest.

Mmh, for Pango I had envisioned something different (see the old mail
below).  But it is definitely better have such a feature in
fontconfig...


    Werner


======================================================================


[...] there should be a means to access Type 1 fonts like the feta
fonts which can't be mapped to Unicode in a sensible way.  I suggest
functions like

  glyphname_pua_mapping = pango_add_custom_encoding (<afmfile>);
  fonthandle = pango_addfont (<font>, glyphname_pua_mapping);
  unicode = pango_glyphname_to_unicode (<glyphname>,
                                        glyphname_pua_mapping);
  glyphname = pango_unicode_to_glyphname (<unicode>
                                          glyphname_pua_mapping);

The first function creates a new encoding, reserving a free block (or
rather, free PUA code points) in the PUA and mapping all glyph names
in the AFM file to it.  The second function then registers the font
within Pango, using the just created mapping.

Note that I don't know how to use Pango.  My function names are just
wild guesses.



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