freetype
[Top][All Lists]
Advanced

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

[Freetype] Another Indic GSUB problem


From: Dave Williss
Subject: [Freetype] Another Indic GSUB problem
Date: Fri, 20 Jul 2001 12:04:21 -0500

I have the latest ftxgsub from CVS (well, as of Tuesday).
The font mangal.ttf (a Devanagari font) has several GSUB
tables.  One in particular is causing me grief.  This font
has one glyph (I-Matra) that extends up and over the next
glyph.  The 'pres' table picks a version of this glyph that
accounts for the width of following glyph.
 
It is a ContextSubst2 lookup with the following set of
conditions...
 
The coverage matches one glyph, the I-Matra
 
The SubClassSetCount is 5, but only SubClassSet[0]
has any rules.
 
The class table lists classes for all the glyphs that
can follow it and cause it to need to change, but
_not_ the initial glyph itself.
 
The result is that when ContextSubst2() calls Get_Class()
on the initial glyph of the context, it gets a Not_Covered
error and gives up.  It seems from how this table is formed
that it's supposed to assume class 0. 
 
The Microsoft OTSPECs seem to confirm this...
 
http://www.microsoft.com/typography/OTSPEC/gsub.htm
 
"For each context, a SubClassRule table contains a
count of the glyph classes in the context sequence
(GlyphCount), including the first class.  A Class array
lists the classes, beginning with the second class (array
index = 1), that follow the first class in the context.
 
This sounds like the first glyph's class is assumed.
Modifying ftxgsub.c to make this assumption causes it to work.
 
An example of text that shows this is:
 
    Unicode: 0x093F 0x0915 0x093F 0x091E
    Glyphs:  0x1D3 0x80 0x1D3 0x87
 
When it works, the "eye brow" width is adjusted so that
the right end of it falls over the vertical line of the next
glyph.  I've attached two screen grabs of this.
 
The good news is that after this fix, it all seems to work
for Indic and It appears that I didn't break my Arabic support
in the process.
 
 -- Dave Williss
------
Meddle not in the affairs of dragons,
   for you are crunchy and taste good with catsup

Attachment: right.jpg
Description: JPEG image

Attachment: wrong.jpg
Description: JPEG image


reply via email to

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