Bug 522950
Summary: | Odd monospace font-size inconsistency on Planet Fedora | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jud Craft <craftjml> |
Component: | firefox | Assignee: | Gecko Maintainer <gecko-bugs-nobody> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | rawhide | CC: | gecko-bugs-nobody, mcepl, yaneti |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2009-09-21 13:35:29 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Attachments: |
Description
Jud Craft
2009-09-12 15:39:55 UTC
For reference, I have the default Firefox font settings (16, mono-13, minimum-none), 98dpi in GNOME, no xorg.conf. The Mac, at least for Firefox, has the same settings (16, mono-13, minimum-none). I had assumed that Firefox actually ignores DPI and always displays at 72dpi (since changing the GNOME and XRDB dpi never seems to affect firefox rendering). Created attachment 360789 [details]
firefox shot of monospace (planet fedora) - Fedora
Notice that monospace in the body text is the correct size, while monospace in the separate paragraphs (not sure if Planet Fedora uses /pre or /code tags) is huge.
Created attachment 360790 [details]
firefox shot of monospace (planet fedora) - Mac
Shot of same site in Mac Firefox 3.5.3. Note that the monospace text is uniformly sized throughout the body of the article.
This looks like a duplicate of bug 508899 , which is a liberation-fonts issue. Try a different font for the firefox monospace font setting to confirm. I...already am. My monospace font is "monospace", which I believe defaults to Deja Vu Sans on Fedora systems via fontconfig. Switching it formally to "Deja Vu Sans" has no effect. In addition, I decided to set the Sans & Serif to Arial and Times New Roman, since I originally used Liberation, but this has no effect either. Just to be sure I unchecked "Let Pages Use Their Own Fonts", thus forcing my fonts. This had no effect and the monospace fonts are still displayed incorrectly on Planet Fedora. To be certain, I then tried a completely different font (Consolas), and got the same effect (some monospace blocks on p.f.o are displayed at a huge size, while some are not). This is definitely a font size issue, not a font-face issue. In addition, I later separately tried changing my DPI to 72. This did not work; fonts were displayed EXACTLY the same in Firefox as at DPI-98 (although of course GNOME UI was -much- smaller). Also, don't you see the same thing when you visit Planet Fedora and scroll down to some code or script text? This has always happened to me on every version of Fedora & Firefox. I don't think I "did" something to make this happen. I think I misread the bugreport and jumped the gun here. I see now its a size, not spacing issue, duh. Sorry for the noise. Created attachment 361024 [details]
monospace-article-large-planetubuntu
Again, observe the HUGENESS of the monospace font. "pre" tags here.
Created attachment 361025 [details]
monospace-article-correct-source
The same article, from its own website. The "pre" tags are still used, but the font isn't so huge!
Same with Planet Fedora. Lennart Poettering's recent article on mutexes: it uses "pre" tags on both Planet Fedora and the original page.
But PF has a -huge- font size for the monospace parts, while it appears the correct size in Lennart's blog.
Why does this occur on the Planet sites? Is there a div/css/styles inheritance problem going on?
It turns out, the problem is rather convoluted... It has to do with the CSS in fedoraproject.org/static/css/fedora.css. In particular, for the "pre" tag: font-size: 2.6ex; The "ex" unit is what causes the large size of the font; ex is an unusual CSS unit type. This unit type seems to be ignored on Firefox 3.5 for Mac. One possible solution is to put the following line in your userContent.css in ~/.firefox/profiles/[profile]/chrome/... ---- pre { font-size: 1em ! important; } ---- This will disregard special "pre" tag sizing, and display the fonts at their normal size for that block. (IE, if they are wrapped in a "font-size: 75%" block, then the final font will be 75% of 1em. It doesn't set an absolute font-size, but it allows you avoid any "ex" units that are associated with the "pre" tag). This seems to clear up giant font monospace sizes in many cases. Feel free to discuss this further, but in my opinion there is nothing Firefox should do better. Closing as NOTABUG No, I suppose not. |