Closed Bug 1021133 Opened 11 years ago Closed 11 years ago

Header resizing for long strings fails for some labels

Categories

(Firefox OS Graveyard :: Gaia, defect)

defect
Not set
normal

Tracking

(blocking-b2g:2.0+, b2g-v2.0 fixed)

RESOLVED FIXED
2.0 S4 (20june)
blocking-b2g 2.0+
Tracking Status
b2g-v2.0 --- fixed

People

(Reporter: flod, Assigned: mikehenrty)

References

Details

(Whiteboard: [systemsfe])

Attachments

(2 files)

Attached image Settings (xh)
Filing a new, less crowded bug to investigate this. I flashed my keon with Gecko+Gaia a few minutes ago: header resizing is definitely working, but it's also failing for at least a couple of labels (I'm using xh for testing). See screenshot: #1 and #3 are truncated, #2 is not, even if it's probably longer. My only explanation is the hyphen in the string. This probably doesn't happen on Flame because screen is large enough to fit the original string without resizing it.
Whiteboard: [systemsfe]
blocking-b2g: --- → 2.0+
The issue is that our canvas.measureText function doesn't take into account fontStyle. Headers are all italic, and since italic fonts are slightly wider than normal fonts, there are cases where our re-sizing still produces overflow. I'm patching FontSizeUtils now to use Font Style.
Guillaume will you have a look?
Attachment #8436065 - Flags: review?(gmarty)
Attachment #8436065 - Flags: review?(gmarty) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee: nobody → mhenretty
Target Milestone: --- → 2.0 S4 (20june)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: