lilypond-devel
[Top][All Lists]
Advanced

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

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


From: Jan Nieuwenhuizen
Subject: Re: character by name on the gnome canvas, custom fontencoding
Date: Mon, 17 May 2004 18:13:49 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Werner LEMBERG writes:

> In case the gtk-app-devel-list can't help, you should probably
> directly contact Owen Taylor <address@hidden>.

I did at last, and he replied to gtk-i18n-list (see below).  It seems
that we have three options:

  1. find out what freetype does, ie, where feta charaters get mapped,
  2. wait for pango-1.6/look at/dive into pango development,
  3. remap the feta font using Adobe Unicode character names
     (probably impossible for a music font using sensible names,
      we could use latin1 names and translate internally?).

What do you think, can you help with 1.?

Jan.


On Mon, 2004-05-10 at 12:50, Jan Nieuwenhuizen wrote:
> I'm having trouble to get gnomecanvas/pango to draw a character from
> our customly-encoded feta font.

[...]

> What could happen, is that this custom encoded-font gets mapped (or
> mapped partly, the `a' and `b' are still/also at latin1 positions)
> onto the private unicode area (0xe0000 and up); so I've tried several
> shots at that, remapping characters and converting to utf8 sequence,
> but to no avail.

Things that I would expect to work:
 
 - If you use a postscript font with the standard Adobe Unicode 
   character names for PUA codepoints
 - If you use an OpenType/CFF font (or TrueType font, but you seem
   to have Type1 outlines) with a Unicode character map.
 
If your font is not encoded in either of these two ways, then 
Pango has no way of knowing how to get from Unicode codepoint
to glyph in the font.

Chris Blizzard is working on some API enhancements to Pango to
allow the application to control how this mapping works; this
is needed for MathML support in Mozilla which uses various
misencoded and custom encoded fonts. So, hopefully we'll have
some more flexibility here for Pango-1.6. 

But in the short term, you'll certainly have the easiest time 
if you can adjust the encoding of the font.

> The observed behaviour suggests that pango looks up (or remaps)
> characters by name, which is just how I'd like to refer to them again.

Pango has no code here other than what FreeType does internally.

> So what I'm actually/probably looking for is something like:
> 
>     pango_addchar (&string, "font", "lilypond-feta, r16",
>                  "char-name", "noteheads-0", 0);

Generally, I think we'd leave this up to the application; the 
application needs to know what Unicode code points they want
from the font. Pango only needs to know how to map Unicode
code point to glyph in the font.

Regards,
                                                Owen


-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org





reply via email to

[Prev in Thread] Current Thread [Next in Thread]