Open
Bug 1134947
Opened 9 years ago
Updated 2 years ago
Ahem font shows different height for zh-TW lang on Windows
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
NEW
People
(Reporter: xidorn, Unassigned)
References
Details
Attachments
(2 files, 2 obsolete files)
When lang is zh-TW, Ahem font behaves slightly differently than in other lang. See the attachment. You need to install Ahem font [1] before. Do we do anything special for zh-TW? [1] http://www.w3.org/Style/CSS/Test/Fonts/Ahem/
Reporter | ||
Comment 1•9 years ago
|
||
Reporter | ||
Comment 2•9 years ago
|
||
Seems to be a windows-specific problem. It works fine on Mac.
Reporter | ||
Comment 3•9 years ago
|
||
Attachment #8566926 -
Attachment is obsolete: true
Reporter | ||
Comment 4•9 years ago
|
||
Use https for the font file so that it can be checked directly on bugzilla.
Attachment #8569492 -
Attachment is obsolete: true
Reporter | ||
Updated•9 years ago
|
Summary: Ahem font shows different height for zh-TW lang → Ahem font shows different height for zh-TW lang on Windows
Reporter | ||
Comment 5•9 years ago
|
||
The reason that this happens only on zh-TW on Windows is that, the default font list of zh-TW contains some bad underline font family. Although it is also true for ja and zh-CN fonts, the fonts in the list seem to have an larger underline offset. The underline offset: Ahem: ~ -2.66 First bad in ja list: -2.00 First bad in zh-TW list: ~ -3.81 in gfxFontGroup::GetUnderlineOffset(), the smaller one is peeked as the underline offset, which in case of zh-TW is -3.81. After some further calculation, it finally adds one pixel to the descent and the height. But simply adding descent probably shouldn't cause this problem?
Comment 6•9 years ago
|
||
Need to look at this a little closer but guessing we shouldn't be using "first font in list" logic like this.
Reporter | ||
Comment 7•9 years ago
|
||
So this problem happens in nsLineLayout::VerticalAlignFrames(), which calls nsLayoutUtils::GetCenteredFontBaseline() to calculate the minBCoord, which is later used in calculation of the baseline of the block. nsLayoutUtils::GetCenteredFontBaseline() uses the result of nsFontMetrics::MaxHeight() which finally calls gfxFontGroup::GetUnderlineOffset(). Finally, the block outside the text of zh-TW will have a wrong baseline. Not sure how should we fix this problem.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•