Closed Bug 1121448 Opened 9 years ago Closed 9 years ago

Text is wrapping too early on some pages with "Siyam Rupali" as default font

Categories

(Core :: Graphics: Text, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38

People

(Reporter: Swarnava, Assigned: jfkthame)

References

()

Details

(Whiteboard: [gfx-noted])

Attachments

(2 files)

Can't reproduce on Windows with either yesterday's or today's nightly. Which nightly are you using, and can you reproduce in a clean profile? What about in safe mode?
Flags: needinfo?(swarnavasengupta)
Product: Firefox → Core
Reproducible in Safe Mode.

Not reproducible in a clean profile.
Flags: needinfo?(swarnavasengupta)
(In reply to Swarnava Sengupta (:Swarnava) from comment #2)
> Reproducible in Safe Mode.
> 
> Not reproducible in a clean profile.

Can you copy/paste your about:support raw data from the broken profile into an attachment: https://bugzilla.mozilla.org/attachment.cgi?bugid=1121448&action=enter ?
Flags: needinfo?(swarnavasengupta)
Attached file about:support data
Flags: needinfo?(swarnavasengupta)
(In reply to Swarnava Sengupta (:Swarnava) from comment #4)
> Created attachment 8550237 [details]
> about:support data

On a new profile, if you change your font settings to also include  "Siyam Rupali" for western script, and ensure that "font.language.group" is set to "x-western" afterwards (in about:config), and then restart, does that let you reproduce on the new profile? What about if you start that profile in safe mode?
Flags: needinfo?(swarnavasengupta)
In a new profile,  reproducible both on normal and safe mode profile if default font is siyam rupali
Flags: needinfo?(swarnavasengupta)
I can reproduce this on OS X (after downloading the font somewhere and installing it). It looks like it decides that the text, which is text-align: justify, can only deal with one word per line - except that removing that CSS line in the inspector doesn't make any difference. Reverting the font preference to something like Times fixes the issue.

Jonathan, do you have ideas? (Not sure if this is Layout instead of graphics: text, but you would know better than me...)
Component: Untriaged → Graphics: Text
Flags: needinfo?(jfkthame)
Summary: Page is not showing properly on latest Nightly → Text is wrapping too early on some pages with "Siyam Rupali" as default font
The problem happens because that page specifies CSS width properties in terms of the "ex" unit, and the SiyamRupali font specifies its ex-height as -1 (in font units, at 2048 per em).

So a couple of points can be made here. First, the font is broken; this is a clearly inappropriate value (probably generated automatically by some tool that tried to look at the height of the "x" glyph, found it missing, and left an "uninitialized" value in its place). Second, the page is poorly authored: it's not appropriate to be expressing column widths in terms of the font's ex-height. Using ch or em units would be more sensible. (In this case, replacing the use of 75ex throughout the document with 75ch should give the result that I think the author intended.)

Having said that, perhaps we should apply some sort of minimum percentage of em-size to the ex-height value we read from the font, so that things don't behave quite so badly in the presence of poorly-constructed fonts.
Flags: needinfo?(jfkthame)
I suggest we do this, to avoid such issues; if there's one such broken font around, there are probably others...
Attachment #8550742 - Flags: review?(jdaggett)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Whiteboard: [gfx-noted]
Comment on attachment 8550742 [details] [diff] [review]
Ignore negative values in the OS/2 table sxHeight field

Review of attachment 8550742 [details] [diff] [review]:
-----------------------------------------------------------------

mmm, I do love fonts with crappy metrics...
Attachment #8550742 - Flags: review?(jdaggett) → review+
https://hg.mozilla.org/mozilla-central/rev/37ec2038576e
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: