Closed Bug 489902 Opened 15 years ago Closed 15 years ago

video controls should prefer a specific font name

Categories

(Toolkit :: Video/Audio Controls, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.9.2a1

People

(Reporter: Dolske, Assigned: Dolske)

References

Details

(Keywords: verified1.9.1)

Attachments

(2 files)

The time labels used in the video controls just specify "sans-serif" as the font face to be used. These should explicitly prefer the expected platform default first, with "sans-serif" as the last fallback. [Linux will probably be... exciting. :-/]

The reasoning for this is that the controls are doing pixel-precise alignment to cram all this stuff into a small area, and if non-default fonts are used things don't align right. There's no practical way to support using, say, Zapfino as the default font, and even similar fonts may cause poor results.

I noticed this because my daily-use OS X profile somehow had:

user_pref("font.name.sans-serif.x-western", "Arial");

Which caused Arial to be used instead of Helvetica, and all the text labels were 1 or 2 pixels too low as a result. [Which is somewhat surprising, because I thought Arial was supposed to have precisely copied Helvetica's metrics.]
Attached image Zapfino
Had to try the fail.
Attached patch Patch v.1Splinter Review
Not sure that there's a good fix for this issue on Linux, because we can't really depend on any specific fonts being around, AFAIK. But this should resolve the issue on Windows and OS X, Linux should be no worse off than it is today.
Attachment #377898 - Flags: review?(rflint)
Attachment #377898 - Flags: review?(rflint) → review+
Comment on attachment 377898 [details] [diff] [review]
Patch v.1

a191=beltzner

Won't hold release for this, but should be super-safe. Make sure it bakes for a cycle on mozilla-central before you move it to 1.9.1

Might want to file a follow up on finding the right font for Windows. They have some much nicer choices than Arial now ;)
Attachment #377898 - Flags: approval1.9.1+
Pushed http://hg.mozilla.org/mozilla-central/rev/43de1fb72976
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
You know what would have been cool? Some @font-face love with one of those LCD digit fonts. Next release!
Verified FIXED on latest 1.9.1 branch, trunk and B99

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1pre)
Gecko/20090608 Shiretoko/3.5pre

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b99)
Gecko/20090604 Firefox/3.5b99

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre)
Gecko/20090608 Minefield/3.6a1pre
Status: RESOLVED → VERIFIED
Component: Video/Audio → Video/Audio Controls
Product: Core → Toolkit
QA Contact: video.audio → video.audio
Version: Trunk → unspecified
Blocks: 558746
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: