To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=92671


User cmc changed the following:

                What    |Old value                 |New value
================================================================================
                 Summary|With Fedora's Sazanami fon|GSUB Coverage Format 2 han
                        |ts vertical writing looks |dling (Fedora Sazanami Fon
                        |bad                       |t)
--------------------------------------------------------------------------------




------- Additional comments from [email protected] Wed Sep 30 13:53:28 +0000 
2009 -------
So I finally got around to having a look at what got broken in the Fedora
Sazanami font and 

a) loading the original unmodified font with fontforge and saving it gives a
font which shows as "broken"
b) loading the original unmodified font with ttx from fonttools and saving it
gives a font which shows as "broken"

Digging into the diffs from original to re-saved I see that the difference is in
the CoverageFormats. The original has Coverage Format 1 while the ones saved by
the two different tools have Coverage Format 2 in use (it produces slightly
smaller .ttf files for this font, which is presumably why both tools favour it
for Sazanami)

So reading http://www.microsoft.com/typography/otspec/CHAPTER2.htm I'm not sure
that we're handling this coverage format right in OOo.

It says that for the simpler format 1 "When a glyph is found in the Coverage
table, its position in the GlyphArray determines the Coverage Index that is
returned-the first glyph has a Coverage Index = 0", i.e. in our implementation
the first glyph is placed as the first element in aSubstVector and so on. 

While for format 2 it says that "Coverage Index (GlyphID) = StartCoverageIndex +
GlyphID - Start GlyphID." for each range. Our implementation is doing... 


for( USHORT j = nGlyph0; j <= nGlyph1; ++j )
    aSubstVector.push_back( GlyphSubst( j + nCovIdx, 0 ) );

I suspect that it should basically be...

for( USHORT j = nGlyph0; j <= nGlyph1; ++j )
    aSubstVector[nStartCoverageIndex + j - nGlyph0] = j

i.e. the coverageindex is the index into out aSubstVector.

This would only be noticeable where a font has more than one range as the first
range always has a coverageindex of 0

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to