Closed
Bug 474819
Opened 17 years ago
Closed 17 years ago
vertical deltas (baseline offset) handled incorrectly by ATSUI font backend
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jfkthame, Assigned: jfkthame)
Details
(Keywords: fixed1.9.1)
Attachments
(5 files)
137 bytes,
text/html
|
Details | |
32.77 KB,
image/png
|
Details | |
42.12 KB,
image/png
|
Details | |
677 bytes,
patch
|
roc
:
review+
beltzner
:
approval1.9.1+
|
Details | Diff | Splinter Review |
38.19 KB,
image/png
|
Details |
When ATSUI returns non-zero baseline offsets for some of the glyphs in a text run, the gfxAtsuiFont backend applies these in the wrong direction, so that glyphs are lowered instead of raised and vice versa.
AAT fonts that use baseline shifts are rare (I don't know of any in wide circulation), which is presumably why this has not been noted previously; the code has never been tested.
A font that does illustrate the issue is Nastaliq Navees R, an old Urdu font developed for QuickDraw GX, available from <http://scripts.sil.org/Nastaliq_Download>. This version of the font was encoded with the Urdu letters at MacRoman codepoints, as a hack for old 8-bit systems without Arabic support, but can still be used to show the issue.
The sample file attached includes a few test character sequences that involve baseline offsets when rendered with Nastaliq Navees R. Viewing this file with TextEdit.app shows the expected result. Viewing with Minefield shows the character sequences badly broken due to the inversion of vertical deltas.
Assignee | ||
Comment 1•17 years ago
|
||
Assignee | ||
Comment 2•17 years ago
|
||
Assignee | ||
Comment 3•17 years ago
|
||
With this patch, the test file using the Nastaliq font renders correctly.
Assignee | ||
Comment 4•17 years ago
|
||
Assignee | ||
Updated•17 years ago
|
Attachment #358232 -
Flags: review?(roc)
Attachment #358232 -
Flags: review?(roc) → review+
Is there any way to reftest this?
Assignee | ||
Comment 6•17 years ago
|
||
I can't think of a way to do so except by creating custom AAT fonts (e.g, one font that has vertical positioning, and a second version that has the glyphs themselves shifted within the em-square so that the result should be the same). But given how obscure the situation is, that's a fair bit of work (there are no tools to create such a test font, I'd have to build the cross-stream kern table by hand), so I'm reluctant to put this at the top of my list. I'd rather solve some of the rendering glitches that people actually see, like clipped ClearType glyphs.
(I'd guess that this has never shown up in real-life usage. I only dug out that old font and tried it because I was trying to create a scenario comparable to the vertical-offset bug we were seeing on Windows. But AFAIK there are no current AAT fonts in circulation that actually work like this.)
Fair enough.
Assignee | ||
Comment 8•17 years ago
|
||
It'd be nice to go ahead and get this landed, so it doesn't get forgotten or start to rot.... does it need any further review (sr?) or can we mark it checkin-needed on the basis of your r+?
Keywords: checkin-needed
Whiteboard: [needs landing]
Comment 9•17 years ago
|
||
Seems like we could write a reftest that overlaid the Urdu with glyphs from Ahem, then compared against a blank window. If the veritcal offsets extend the wrong way they would show below the overlaid Ahem glyphs. Hacky, but at least we'd have something to capture this and you wouldn't need to create a special font.
Assignee | ||
Comment 10•17 years ago
|
||
I guess something like that could work.... but would require the Navees font to be available, and strictly speaking we shouldn't put that in our tree as it's not free.
Comment 11•17 years ago
|
||
Yeah, we need an openly licensed font for this sort of test. Are there other available openly available AAT fonts for Urdu that exhibit this problem? My guess is that they are somewhat rare.
Comment 12•17 years ago
|
||
Pushed 7122bd06f018.
Status: NEW → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [needs landing]
Should we take this on 1.9.1?
Assignee | ||
Comment 14•17 years ago
|
||
For the sake of correctness (and in view of how low-risk the actual change looks), I think we should.
On the other hand, it seems unlikely that it will affect anyone in real-world usage, so practically speaking it's not really important.
Attachment #358232 -
Flags: approval1.9.1?
Comment 15•16 years ago
|
||
Comment on attachment 358232 [details] [diff] [review]
patch to fix the sign error with ATSUI vertical offsets
a191=beltzner
Attachment #358232 -
Flags: approval1.9.1? → approval1.9.1+
Updated•16 years ago
|
Keywords: checkin-needed
Comment 16•16 years ago
|
||
Keywords: checkin-needed → fixed1.9.1
You need to log in
before you can comment on or make changes to this bug.
Description
•