WebKit Bugzilla
Attachment 372624 Details for
Bug 198909
: [WinCairo] incorrect font height for 'Google Sans Display' font
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP patch
wip.patch (text/plain), 2.36 KB, created by
Fujii Hironori
on 2019-06-21 03:02:45 PDT
(
hide
)
Description:
WIP patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2019-06-21 03:02:45 PDT
Size:
2.36 KB
patch
obsolete
>diff --git a/LayoutTests/platform/wincairo/TestExpectations b/LayoutTests/platform/wincairo/TestExpectations >index e53ce4c156d..0468f2f1443 100644 >--- a/LayoutTests/platform/wincairo/TestExpectations >+++ b/LayoutTests/platform/wincairo/TestExpectations >@@ -1550,7 +1550,6 @@ fast/writing-mode [ Skip ] > fast/xmlhttprequest [ Skip ] > fast/xpath [ Skip ] > fast/xsl [ Skip ] >-fonts/use-typo-metrics-1.html [ Skip ] > fullscreen [ Skip ] > html5lib [ Skip ] > http/wpt [ Skip ] >diff --git a/Source/WebCore/platform/graphics/win/SimpleFontDataCairoWin.cpp b/Source/WebCore/platform/graphics/win/SimpleFontDataCairoWin.cpp >index 157f80b51f2..ac5bebd07bc 100644 >--- a/Source/WebCore/platform/graphics/win/SimpleFontDataCairoWin.cpp >+++ b/Source/WebCore/platform/graphics/win/SimpleFontDataCairoWin.cpp >@@ -70,20 +70,9 @@ void Font::platformInit() > OUTLINETEXTMETRIC metrics; > GetOutlineTextMetrics(dc, sizeof(metrics), &metrics); > TEXTMETRIC& textMetrics = metrics.otmTextMetrics; >- float ascent, descent, lineGap; >- // The Open Font Format describes the OS/2 USE_TYPO_METRICS flag as follows: >- // "If set, it is strongly recommended to use OS/2.sTypoAscender - OS/2.sTypoDescender+ OS/2.sTypoLineGap as a value for default line spacing for this font." >- const UINT useTypoMetricsMask = 1 << 7; >- if (metrics.otmfsSelection & useTypoMetricsMask) { >- ascent = metrics.otmAscent * metricsMultiplier; >- descent = metrics.otmDescent * metricsMultiplier; >- lineGap = metrics.otmLineGap * metricsMultiplier; >- } else { >- ascent = textMetrics.tmAscent * metricsMultiplier; >- descent = textMetrics.tmDescent * metricsMultiplier; >- lineGap = textMetrics.tmExternalLeading * metricsMultiplier; >- } >- float xHeight = ascent * 0.56f; // Best guess for xHeight for non-Truetype fonts. >+ float ascent = metrics.otmAscent * metricsMultiplier; >+ float descent = -metrics.otmDescent * metricsMultiplier; >+ float lineGap = metrics.otmLineGap * metricsMultiplier; > > m_fontMetrics.setAscent(ascent); > m_fontMetrics.setDescent(descent); >@@ -94,7 +83,7 @@ void Font::platformInit() > > cairo_text_extents_t extents; > cairo_scaled_font_text_extents(scaledFont, "x", &extents); >- xHeight = -extents.y_bearing; >+ float xHeight = -extents.y_bearing; > > m_fontMetrics.setXHeight(xHeight); > cairo_win32_scaled_font_done_font(scaledFont);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198909
:
372231
|
372232
|
372233
|
372624
|
372821
|
372822
|
372823
|
372825
|
372828
|
372829
|
372831
|
372833