Closed
Bug 578620
Opened 14 years ago
Closed 14 years ago
[Meta] Enabling DW/D2D causes changes of Firefox Button
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: Terepin, Assigned: jtd)
References
(Blocks 1 open bug)
Details
(Keywords: meta)
Attachments
(4 files, 2 obsolete files)
User-Agent: Mozilla/5.0 (Windows; Windows NT 6.1; WOW64; sk; rv:2.0b2pre) Gecko/20100713 Minefield/4.0b2pre
Build Identifier: Mozilla/5.0 (Windows; Windows NT 6.1; WOW64; sk; rv:2.0b2pre) Gecko/20100713 Minefield/4.0b2pre
When you enable DirectWrite, the vertical size of Firefox Button will increase.
Reproducible: Always
Reporter | ||
Comment 1•14 years ago
|
||
Reporter | ||
Comment 2•14 years ago
|
||
Reporter | ||
Updated•14 years ago
|
Blocks: FirefoxButton
Reporter | ||
Updated•14 years ago
|
blocking2.0: --- → ?
Keywords: regression
Updated•14 years ago
|
Component: General → Graphics
Product: Firefox → Core
QA Contact: general → thebes
Version: unspecified → Trunk
Comment 3•14 years ago
|
||
This looks like a font rendering change. UX team, should the size of the button change in response?
Comment 4•14 years ago
|
||
(In reply to comment #3)
> UX team, should the size of the button change in response?
No, the button should match the default size of the other window buttons(min/max/close). Right now the CSS is setting the size of the button with padding using em. Which might be why the button size would change if the font rendering changes.
Comment 5•14 years ago
|
||
Can someone confirm this?
Reporter | ||
Comment 6•14 years ago
|
||
Just a note: The bold font occurs only in my current profile, but not in clean profile. Not sure why, but the size of the button itself is changing regardless which profile I'm using.
Comment 7•14 years ago
|
||
I can't block on this until it's confirmed. Please renom once this bug is confirmed.
blocking2.0: ? → -
Comment 8•14 years ago
|
||
I've seen this too. Seems font related.
Comment 9•14 years ago
|
||
Happens to me also.
Updated•14 years ago
|
Status: UNCONFIRMED → NEW
blocking2.0: - → ?
Ever confirmed: true
Comment 10•14 years ago
|
||
We will get different font metrics with DirectWrite. The Firefox button should be sized such that they don't negatively affect it!
Component: Graphics → Theme
Product: Core → Firefox
QA Contact: thebes → theme
Comment 11•14 years ago
|
||
We deal with the height, but what about the overly bold font? Looks pretty bad if you compare the two screenshots.
Comment 12•14 years ago
|
||
Peter suggested it doesn't always happen; have you seen it too, Dão?
Comment 13•14 years ago
|
||
Looks slightly bolder with DirectWrite over here, but not like in the attached screenshot.
Updated•14 years ago
|
Component: Theme → Graphics
Product: Firefox → Core
QA Contact: theme → thebes
Comment 14•14 years ago
|
||
(In reply to comment #12)
> Peter suggested it doesn't always happen; have you seen it too, Dão?
Apparently Gavin sees it: https://bug555845.bugzilla.mozilla.org/attachment.cgi?id=468744
Comment 15•14 years ago
|
||
That screenshot is from johnath's new machine, in case you want to see it in person, Joe!
Comment 16•14 years ago
|
||
I only want to block on the investigation of what's making this font apparently render bolder.
Assignee: nobody → bas.schouten
blocking2.0: ? → final+
Comment 17•14 years ago
|
||
Here is picture of the bug on my PC.
From user view it seems like easy fix, can someone work a little bit on this?
OS: Windows 7
GPU: Nvidia 8400GS
Mozilla/5.0 (Windows NT 6.1; rv:2.0b6pre) Gecko/20100903 Firefox/4.0b6pre
Comment 18•14 years ago
|
||
This bug will cause problems with https://bugzilla.mozilla.org/show_bug.cgi?id=593950
Basically, if the gap between min/max/close buttons and tabs is reduced to the designed 3px (?), there will be no room between tabs and the Firefox button when D2D is on (without D2D we get the correct gap, since the Firefox button is the same size with the window controls).
Comment 19•14 years ago
|
||
I've found similar entry: Bug 601152
Comment 20•14 years ago
|
||
John, could you have a quick look? This sounds like WONTFIX to me but I'm not 100% sure.
Assignee: bas.schouten → jdaggett
Comment 21•14 years ago
|
||
This is a quirk with DirectWrite in general.
Text of websites shift whenever its enabled. It even causes a slight artifacting or mirroring issue in Google Reader when in list view.
Comment 22•14 years ago
|
||
(In reply to comment #20)
> John, could you have a quick look? This sounds like WONTFIX to me but I'm not
> 100% sure.
ping?
Assignee | ||
Comment 23•14 years ago
|
||
The font metrics for the two cases is different:
GDI metrics:
0[2ab098]: (FindFontForStyle) name: Segoe UI, sty: 00, wt: 700, sz: 12.0 -> Segoe UI Bold
Font: 04F9D748 (Segoe UI Bold) size: 12.000000
emHeight: 12.000000 emAscent: 9.000000 emDescent: 3.000000
maxAscent: 12.000000 maxDescent: 3.000000 maxAdvance: 27.000000
internalLeading: 3.000000 externalLeading: 0.000000
spaceWidth: 3.000000 aveCharWidth: 7.000000 xHeight: 6.000000
uOff: -1.000000 uSize: 1.000000 stOff: 3.000000 stSize: 1.000000 supOff: 6.000000 subOff: 2.000000
0[2ab098]: InitTextRun 4e61508 fontgroup 34347a8 (Segoe UI) lang: en-us len 10 TEXTRUN " Minefield" ENDTEXTRUN
DirectWrite metrics:
0[52b098]: (FindFontForStyle) name: Segoe UI, sty: 00, wt: 700, sz: 12.0 -> Segoe UIBold
Font: 03DBF920 (Segoe UIBold) size: 12.000000
emHeight: 12.000000 emAscent: 9.176471 emDescent: 2.823529
maxAscent: 13.000000 maxDescent: 4.000000 maxAdvance: 21.855469
internalLeading: 4.000000 externalLeading: 0.000000
spaceWidth: 3.310547 aveCharWidth: 7.078125 zeroOrAve: 6.902344 xHeight: 6.000000
uOff: -1.042969 uSize: 1.000000 stOff: 3.105469 stSize: 1.000000 supOff: 6.000000 subOff: 6.000000
0[52b098]: InitTextRun 551a728 fontgroup 54d8ca0 (Segoe UI) lang: en-us len 10 TEXTRUN " Minefield" ENDTEXTRUN
I need to dig into the layout code a bit more to figure out the exact calculation used but I would bet the height is set to (maxAscent + maxDescent + internalLeading). That would explain the slightly different heights, 18px vs. 20px.
GDI code:
if (0 < GetOutlineTextMetrics(dc.GetDC(), sizeof(oMetrics), &oMetrics)) {
mMetrics->emHeight = metrics.tmHeight - metrics.tmInternalLeading;
gfxFloat typEmHeight = (double)oMetrics.otmAscent - (double)oMetrics.otmDescent;
mMetrics->emAscent = ROUND(mMetrics->emHeight * (double)oMetrics.otmAscent / typEmHeight);
mMetrics->emDescent = mMetrics->emHeight - mMetrics->emAscent;
mMetrics->maxAscent = metrics.tmAscent;
mMetrics->maxDescent = metrics.tmDescent;
DirectWrite code:
mFontFace->GetMetrics(&fontMetrics);
mMetrics.xHeight =
((gfxFloat)fontMetrics.xHeight /
fontMetrics.designUnitsPerEm) * mAdjustedSize;
mMetrics.maxAscent =
ceil(((gfxFloat)fontMetrics.ascent /
fontMetrics.designUnitsPerEm) * mAdjustedSize);
mMetrics.maxDescent =
ceil(((gfxFloat)fontMetrics.descent /
fontMetrics.designUnitsPerEm) * mAdjustedSize);
mMetrics.internalLeading =
ceil(((gfxFloat)(fontMetrics.ascent +
fontMetrics.descent -
fontMetrics.designUnitsPerEm) /
fontMetrics.designUnitsPerEm) * mAdjustedSize);
The inclusion of ceil() was done for bug 549190.
Comment 24•14 years ago
|
||
In case the font metrics are correct, bug 610071 will take care of not screwing up the button size.
The bold rendering is still an issue (see the screenshots on <http://blog.mozilla.com/rstrong/2010/11/06/what-to-do/>).
Comment 25•14 years ago
|
||
The excessively bold rendering seems to happen only with D2D enabled.
Reporter | ||
Comment 26•14 years ago
|
||
Changed name of bug. Dao, fill bug for bold font.
Thanks for fixing them!
Summary: Enabling DirectWrite causes increase of vertical size of Firefox Button → [Meta] Enabling DW/D2D causes changes of Firefox Button
Updated•14 years ago
|
Whiteboard: [soft blocker]
Updated•14 years ago
|
Whiteboard: [soft blocker] → [softblocker]
Reporter | ||
Updated•14 years ago
|
blocking2.0: final+ → ---
No longer depends on: 625029
Keywords: regression → meta
Hardware: x86 → All
Whiteboard: [softblocker]
Reporter | ||
Comment 27•14 years ago
|
||
Attachment #457276 -
Attachment is obsolete: true
Attachment #457277 -
Attachment is obsolete: true
Reporter | ||
Comment 28•14 years ago
|
||
Enabling HW acceleration causes increase of size:
1. On FXB's bottom by 1px,
2. On top of tabs by 1px.
Reporter | ||
Comment 29•14 years ago
|
||
Forgot to ask: Should I fill another bug for it? Or it is something else?
Reporter | ||
Comment 30•14 years ago
|
||
Not happening anymore.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•14 years ago
|
Resolution: FIXED → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•