Re: U+00AD (soft hyphen) problem



On Thu, 2008-01-10 at 19:16 +0100, Peter Frentrup wrote:
> Hi,

Hi,

> I am working on a formula renderer using Pango.
> For mathematical characters, I use the Computer Modern TrueType fonts 
> from ftp://www.ctan.org/tex-archive/fonts/cm/ps-type1/bakoma/ttf/
> 
> cmex10.ttf (and the other cmex... fonts) place the smallest left angle 
> bracket glyph at ISO Latin 1 character 0xAD, which is normaly the soft 
> hyphen.
> According to http://www.cs.tut.fi/~jkorpela/shy.html, Unicode says this 
> is an invisible character, but ISO Latin 1 doesn't.
> Because Pango thinks it's invisible, it produces the glyph 0x0FFFFFFF, 
> which is invisible. But I need the real glyph of the font.
> 
> Is there a possibility to let Pango treat this character as visible?
> I could manually search for the glyph index in all four cmex.. fonts and 
> use this in my code instead of calling pango_shape() as until now, but 
> this would be the ultima ratio for me ;-)

The way Firefox2 uses those fonts is by setting up a PangoFcDecoder to
map real Unicode characters to the glyphs.  That should avoid this
problem.

> Thanks,
> Peter

-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759



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