Bug 182205 - Cairo: Bold font with ghosting(?)
Summary: Cairo: Bold font with ghosting(?)
Status: RESOLVED DUPLICATE of bug 182093
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Local Build
Hardware: PC Windows 10
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-26 18:17 PST by 高向党
Modified: 2018-01-30 23:43 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 高向党 2018-01-26 18:17:21 PST
使用cairo图形库编译,打开网页加粗字体有重影,系统为win10,屏幕分辨率(1920*108),
原因描述:
Source\WebCore\platform\graphics\cairo\CairoOperations.cpp文件中,调用drawGlyphsToContext函数中
if (syntheticBoldOffset) {			
        cairo_translate(context, 1, 0);
        cairo_show_glyphs(context, glyphs.data(), glyphs.size());
        cairo_set_matrix(context, &originalTransform);
}

其中调用cairo_translate函数的第二个参数直接使用syntheticBoldOffset,没有跟据系统的分辨率和缩放比例进行调整

建议修改方式:
 if (syntheticBoldOffset) {	
        double inverseScaleFactor = syntheticBoldOffset / deviceScaleFactorForWindow(0);	
        cairo_translate(context, inverseScaleFactor, 0);
        cairo_show_glyphs(context, glyphs.data(), glyphs.size());
        cairo_set_matrix(context, &originalTransform);
    }
Comment 1 Fujii Hironori 2018-01-28 17:48:07 PST
Can you take a screenshot of this bug?
Same with Bug 182093?
Comment 2 Fujii Hironori 2018-01-30 23:43:30 PST
Please reopen if Bug 182093 doesn't solve your problem.

*** This bug has been marked as a duplicate of bug 182093 ***