[Webkit-unassigned] [Bug 182205] New: 加粗字体有重影

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 26 18:17:21 PST 2018


https://bugs.webkit.org/show_bug.cgi?id=182205

            Bug ID: 182205
           Summary: 加粗字体有重影
           Product: WebKit
           Version: WebKit Local Build
          Hardware: PC
                OS: Windows 10
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Platform
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: gaodang119 at sina.com

使用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);
    }

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180127/165e61f1/attachment-0001.html>


More information about the webkit-unassigned mailing list