Changeset 281687 in webkit


Ignore:
Timestamp:
Aug 26, 2021 11:18:56 PM (11 months ago)
Author:
mmaxfield@apple.com
Message:

Synthetic bold additional advances need to be applied after shaping
https://bugs.webkit.org/show_bug.cgi?id=189448
<rdar://problem/40994395>

Reviewed by Alan Bujtas.

Source/WebCore:

We implement synthetic bold by drawing every glyph twice, the second time 1px to the right of the
first time. This effectively means that the advance of such glyphs needs to be increased by 1px.
Previously, we were doing this before shaping, which is a problem for some fonts which clobber the
input advances during shaping, and emit totally new advances. Osaka is one such font. In order to
make sure that these fonts have their synthetic bold advances correctly increased, we need to do
the increasing after text shaping, rather than before it.

This patch temporarily disables LFC when synthetic bold is in effect. I will teach LFC how to handle
synthetic bold in a follow-up patch.

Test: fast/text/osaka-synthetic-bold.html

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForText):

  • platform/graphics/Font.h:

(WebCore::Font::syntheticBoldOffset const):
(WebCore::Font::widthForGlyph const):

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::adjustForSyntheticBold):
(WebCore::WidthIterator::applyCSSVisibilityRules):

  • platform/graphics/WidthIterator.h:
  • platform/graphics/coretext/FontCoreText.cpp:

(WebCore::Font::platformWidthForGlyph const):
(WebCore::Font::platformBoundsForGlyph const):

LayoutTests:

These tests are progressions.

  • fast/text/osaka-synthetic-bold-expected.txt: Added.
  • fast/text/osaka-synthetic-bold.html: Added.
  • platform/ios/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt:
  • platform/mac-catalina/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt:
  • platform/mac-mojave/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt:
  • platform/mac/fast/text/atsui-multiple-renderers-expected.png: Added.
  • platform/mac/fast/text/atsui-multiple-renderers-expected.txt:
  • platform/mac/fonts/cursive-expected.png: Added.
  • platform/mac/fonts/cursive-expected.txt:
  • platform/mac/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt:
  • platform/mac/TestExpectations:
  • platform/win/fast/text-indicator/text-indicator-estimated-color-with-implicit-newline-expected.txt: Added.
  • platform/win/svg/W3C-SVG-1.1-SE/svgdom-over-01-f-expected.txt:
Location:
trunk
Files:
6 added
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r281685 r281687  
     12021-08-26  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Synthetic bold additional advances need to be applied after shaping
     4        https://bugs.webkit.org/show_bug.cgi?id=189448
     5        <rdar://problem/40994395>
     6
     7        Reviewed by Alan Bujtas.
     8
     9        These tests are progressions.
     10
     11        * fast/text/osaka-synthetic-bold-expected.txt: Added.
     12        * fast/text/osaka-synthetic-bold.html: Added.
     13        * platform/ios/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt:
     14        * platform/mac-catalina/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt:
     15        * platform/mac-mojave/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt:
     16        * platform/mac/fast/text/atsui-multiple-renderers-expected.png: Added.
     17        * platform/mac/fast/text/atsui-multiple-renderers-expected.txt:
     18        * platform/mac/fonts/cursive-expected.png: Added.
     19        * platform/mac/fonts/cursive-expected.txt:
     20        * platform/mac/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt:
     21        * platform/mac/TestExpectations:
     22        * platform/win/fast/text-indicator/text-indicator-estimated-color-with-implicit-newline-expected.txt: Added.
     23        * platform/win/svg/W3C-SVG-1.1-SE/svgdom-over-01-f-expected.txt:
     24
    1252021-08-26  Joone Hur  <joone@webkit.org>
    226
  • trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt

    r267658 r281687  
    2525PASS menclose layout is not affected by width: 100px !important; height: 200px !important;
    2626PASS merror preferred width calculation is not affected by writing-mode: vertical-rl;
    27 FAIL merror layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 1) expected 9.03125 +/- 1 but got 0
     27FAIL merror layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 1) expected 8.03125 +/- 1 but got 0
    2828PASS merror preferred width calculation is not affected by white-space: normal;
    2929PASS merror layout is not affected by white-space: normal;
  • trunk/LayoutTests/platform/mac-catalina/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt

    r278733 r281687  
    2525PASS menclose layout is not affected by width: 100px !important; height: 200px !important;
    2626PASS merror preferred width calculation is not affected by writing-mode: vertical-rl;
    27 FAIL merror layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 1) expected 9.03125 +/- 1 but got 0
     27FAIL merror layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 1) expected 8.03125 +/- 1 but got 0
    2828PASS merror preferred width calculation is not affected by white-space: normal;
    2929PASS merror layout is not affected by white-space: normal;
  • trunk/LayoutTests/platform/mac-mojave/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt

    r278733 r281687  
    2525PASS menclose layout is not affected by width: 100px !important; height: 200px !important;
    2626PASS merror preferred width calculation is not affected by writing-mode: vertical-rl;
    27 FAIL merror layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 1) expected 9.03125 +/- 1 but got 0
     27FAIL merror layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 1) expected 8.03125 +/- 1 but got 0
    2828PASS merror preferred width calculation is not affected by white-space: normal;
    2929PASS merror layout is not affected by white-space: normal;
  • trunk/LayoutTests/platform/mac/TestExpectations

    r281682 r281687  
    23882388webkit.org/b/228176 [ Mojave Catalina BigSur Monterey ] fast/text/variable-system-font-2.html [ Pass ]
    23892389
    2390 # This test opens apparently unskippable prompts on Catalina.
     2390# These tests open apparently unskippable prompts on Catalina.
    23912391webkit.org/b/229391 [ Mojave Catalina ] fast/text/mobileasset-font.html [ Skip ]
     2392webkit.org/b/189448 [ Mojave Catalina ] fast/text/osaka-synthetic-bold.html [ Skip ]
  • trunk/LayoutTests/platform/mac/fast/text/atsui-multiple-renderers-expected.txt

    r248424 r281687  
    1717        RenderText {#text} at (0,0) size 611x18
    1818          text run at (0,0) width 611: "The two columns should be identical except for the accent over the e and the umlaut over the u."
    19       RenderTable {TABLE} at (0,104) size 259x147 [border: none]
    20         RenderTableSection {TBODY} at (0,0) size 258x146
    21           RenderTableRow {TR} at (0,0) size 258x30
    22             RenderTableCell {TD} at (0,0) size 129x30 [border: (1px solid #008000)] [r=0 c=0 rs=1 cs=1]
     19      RenderTable {TABLE} at (0,104) size 258x147 [border: none]
     20        RenderTableSection {TBODY} at (0,0) size 257x146
     21          RenderTableRow {TR} at (0,0) size 257x30
     22            RenderTableCell {TD} at (0,0) size 128x30 [border: (1px solid #008000)] [r=0 c=0 rs=1 cs=1]
    2323              RenderText {#text} at (2,3) size 68x25
    2424                text run at (2,3) width 68: "Lore\x{300}m "
     
    2727                  text run at (69,5) width 50: "ipsu\x{308}m"
    2828              RenderText {#text} at (0,0) size 0x0
    29             RenderTableCell {TD} at (128,0) size 130x30 [border: (1px solid #008000)] [r=0 c=1 rs=1 cs=1]
     29            RenderTableCell {TD} at (127,0) size 130x30 [border: (1px solid #008000)] [r=0 c=1 rs=1 cs=1]
    3030              RenderText {#text} at (2,3) size 68x25
    3131                text run at (2,3) width 68: "Lorem "
     
    3434                  text run at (69,5) width 50: "ipsum"
    3535              RenderText {#text} at (0,0) size 0x0
    36           RenderTableRow {TR} at (0,30) size 258x30
    37             RenderTableCell {TD} at (0,30) size 129x30 [border: (1px solid #008000)] [r=1 c=0 rs=1 cs=1]
    38               RenderText {#text} at (2,3) size 74x25
    39                 text run at (2,3) width 74: "Lore\x{300}m "
     36          RenderTableRow {TR} at (0,30) size 257x30
     37            RenderTableCell {TD} at (0,30) size 128x30 [border: (1px solid #008000)] [r=1 c=0 rs=1 cs=1]
     38              RenderText {#text} at (2,3) size 73x25
     39                text run at (2,3) width 73: "Lore\x{300}m "
    4040              RenderInline {SPAN} at (0,0) size 53x23
    41                 RenderText {#text} at (75,5) size 53x23
    42                   text run at (75,5) width 53: "ipsu\x{308}m"
     41                RenderText {#text} at (74,5) size 53x23
     42                  text run at (74,5) width 53: "ipsu\x{308}m"
    4343              RenderText {#text} at (0,0) size 0x0
    44             RenderTableCell {TD} at (128,30) size 130x30 [border: (1px solid #008000)] [r=1 c=1 rs=1 cs=1]
     44            RenderTableCell {TD} at (127,30) size 130x30 [border: (1px solid #008000)] [r=1 c=1 rs=1 cs=1]
    4545              RenderText {#text} at (2,3) size 74x25
    4646                text run at (2,3) width 74: "Lorem "
     
    4949                  text run at (75,5) width 53: "ipsum"
    5050              RenderText {#text} at (0,0) size 0x0
    51           RenderTableRow {TR} at (0,60) size 258x30
    52             RenderTableCell {TD} at (0,60) size 129x30 [border: (1px solid #008000)] [r=2 c=0 rs=1 cs=1]
     51          RenderTableRow {TR} at (0,60) size 257x30
     52            RenderTableCell {TD} at (0,60) size 128x30 [border: (1px solid #008000)] [r=2 c=0 rs=1 cs=1]
    5353              RenderText {#text} at (2,3) size 68x25
    5454                text run at (2,3) width 68: "Lore\x{300}m "
     
    5757                  text run at (69,5) width 49: "ipsu\x{308}m"
    5858              RenderText {#text} at (0,0) size 0x0
    59             RenderTableCell {TD} at (128,60) size 130x30 [border: (1px solid #008000)] [r=2 c=1 rs=1 cs=1]
     59            RenderTableCell {TD} at (127,60) size 130x30 [border: (1px solid #008000)] [r=2 c=1 rs=1 cs=1]
    6060              RenderText {#text} at (2,3) size 68x25
    6161                text run at (2,3) width 68: "Lorem "
     
    6464                  text run at (69,5) width 49: "ipsum"
    6565              RenderText {#text} at (0,0) size 0x0
    66           RenderTableRow {TR} at (0,90) size 258x30
    67             RenderTableCell {TD} at (0,90) size 129x30 [border: (1px solid #008000)] [r=3 c=0 rs=1 cs=1]
    68               RenderText {#text} at (2,3) size 74x25
    69                 text run at (2,3) width 74: "Lore\x{300}m "
     66          RenderTableRow {TR} at (0,90) size 257x30
     67            RenderTableCell {TD} at (0,90) size 128x30 [border: (1px solid #008000)] [r=3 c=0 rs=1 cs=1]
     68              RenderText {#text} at (2,3) size 73x25
     69                text run at (2,3) width 73: "Lore\x{300}m "
    7070              RenderInline {SPAN} at (0,0) size 51x23
    71                 RenderText {#text} at (75,5) size 51x23
    72                   text run at (75,5) width 51: "ipsu\x{308}m"
     71                RenderText {#text} at (74,5) size 51x23
     72                  text run at (74,5) width 51: "ipsu\x{308}m"
    7373              RenderText {#text} at (0,0) size 0x0
    74             RenderTableCell {TD} at (128,90) size 130x30 [border: (1px solid #008000)] [r=3 c=1 rs=1 cs=1]
     74            RenderTableCell {TD} at (127,90) size 130x30 [border: (1px solid #008000)] [r=3 c=1 rs=1 cs=1]
    7575              RenderText {#text} at (2,3) size 74x25
    7676                text run at (2,3) width 74: "Lorem "
     
    7979                  text run at (75,5) width 51: "ipsum"
    8080              RenderText {#text} at (0,0) size 0x0
    81           RenderTableRow {TR} at (0,120) size 258x26
    82             RenderTableCell {TD} at (0,120) size 129x26 [border: (1px solid #008000)] [r=4 c=0 rs=1 cs=1]
     81          RenderTableRow {TR} at (0,120) size 257x26
     82            RenderTableCell {TD} at (0,120) size 128x26 [border: (1px solid #008000)] [r=4 c=0 rs=1 cs=1]
    8383              RenderText {#text} at (2,2) size 101x23
    8484                text run at (2,2) width 101: "Lore\x{300}m ipsu\x{308}m"
    85             RenderTableCell {TD} at (128,120) size 130x26 [border: (1px solid #008000)] [r=4 c=1 rs=1 cs=1]
     85            RenderTableCell {TD} at (127,120) size 130x26 [border: (1px solid #008000)] [r=4 c=1 rs=1 cs=1]
    8686              RenderText {#text} at (2,2) size 101x23
    8787                text run at (2,2) width 101: "Lorem ipsum"
  • trunk/LayoutTests/platform/mac/fonts/cursive-expected.txt

    r268520 r281687  
    304304              text run at (0,25) width 21: "!!!!"
    305305            RenderBR {BR} at (20,25) size 1x25
    306             RenderText {#text} at (0,50) size 25x25
    307               text run at (0,50) width 25: "\"\"\"\""
    308             RenderBR {BR} at (24,50) size 1x25
     306            RenderText {#text} at (0,50) size 29x25
     307              text run at (0,50) width 29: "\"\"\"\""
     308            RenderBR {BR} at (28,50) size 1x25
    309309            RenderText {#text} at (0,75) size 40x25
    310310              text run at (0,75) width 40: "####"
     
    319319              text run at (0,150) width 61: "&&&&"
    320320            RenderBR {BR} at (60,150) size 1x25
    321             RenderText {#text} at (0,175) size 14x25
    322               text run at (0,175) width 14: "''''"
    323             RenderBR {BR} at (13,175) size 1x25
     321            RenderText {#text} at (0,175) size 18x25
     322              text run at (0,175) width 18: "''''"
     323            RenderBR {BR} at (17,175) size 1x25
    324324            RenderText {#text} at (0,200) size 26x25
    325325              text run at (0,200) width 26: "(((("
     
    508508              text run at (0,1725) width 28: "eeee"
    509509            RenderBR {BR} at (27,1725) size 1x25
    510             RenderText {#text} at (0,1750) size 20x25
    511               text run at (0,1750) width 20: "ffff"
    512             RenderBR {BR} at (19,1750) size 1x25
    513             RenderText {#text} at (0,1775) size 30x25
    514               text run at (0,1775) width 30: "gggg"
    515             RenderBR {BR} at (29,1775) size 1x25
     510            RenderText {#text} at (0,1750) size 22x25
     511              text run at (0,1750) width 22: "ffff"
     512            RenderBR {BR} at (21,1750) size 1x25
     513            RenderText {#text} at (0,1775) size 32x25
     514              text run at (0,1775) width 32: "gggg"
     515            RenderBR {BR} at (31,1775) size 1x25
    516516            RenderText {#text} at (0,1800) size 39x25
    517517              text run at (0,1800) width 39: "hhhh"
     
    526526              text run at (0,1875) width 34: "kkkk"
    527527            RenderBR {BR} at (33,1875) size 1x25
    528             RenderText {#text} at (0,1900) size 18x25
    529               text run at (0,1900) width 18: "llll"
    530             RenderBR {BR} at (17,1900) size 1x25
     528            RenderText {#text} at (0,1900) size 20x25
     529              text run at (0,1900) width 20: "llll"
     530            RenderBR {BR} at (19,1900) size 1x25
    531531            RenderText {#text} at (0,1925) size 55x25
    532532              text run at (0,1925) width 55: "mmmm"
     
    550550              text run at (0,2075) width 27: "ssss"
    551551            RenderBR {BR} at (26,2075) size 1x25
    552             RenderText {#text} at (0,2100) size 21x25
    553               text run at (0,2100) width 21: "tttt"
    554             RenderBR {BR} at (20,2100) size 1x25
     552            RenderText {#text} at (0,2100) size 23x25
     553              text run at (0,2100) width 23: "tttt"
     554            RenderBR {BR} at (22,2100) size 1x25
    555555            RenderText {#text} at (0,2125) size 40x25
    556556              text run at (0,2125) width 40: "uuuu"
  • trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt

    r278733 r281687  
    2525PASS menclose layout is not affected by width: 100px !important; height: 200px !important;
    2626PASS merror preferred width calculation is not affected by writing-mode: vertical-rl;
    27 FAIL merror layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 1) expected 9.03125 +/- 1 but got 0
     27FAIL merror layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 1) expected 8.03125 +/- 1 but got 0
    2828PASS merror preferred width calculation is not affected by white-space: normal;
    2929PASS merror layout is not affected by white-space: normal;
  • trunk/LayoutTests/platform/win/svg/W3C-SVG-1.1-SE/svgdom-over-01-f-expected.txt

    r236447 r281687  
    141141    RenderSVGContainer {g} at (0,0) size 480x23
    142142      RenderSVGRect {rect} at (0,0) size 480x22 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=1.00] [y=1.00] [width=478.00] [height=20.00]
    143       RenderSVGText {text} at (205,2) size 70x20 contains 1 chunk(s)
    144         RenderSVGInlineText {#text} at (0,0) size 70x20
    145           chunk 1 (middle anchor) text run 1 at (205.00,18.00) startOffset 0 endOffset 5 width 70.00: "DRAFT"
     143      RenderSVGText {text} at (202,2) size 76x20 contains 1 chunk(s)
     144        RenderSVGInlineText {#text} at (0,0) size 75x20
     145          chunk 1 (middle anchor) text run 1 at (202.50,18.00) startOffset 0 endOffset 5 width 75.00: "DRAFT"
  • trunk/Source/WebCore/ChangeLog

    r281685 r281687  
     12021-08-26  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Synthetic bold additional advances need to be applied after shaping
     4        https://bugs.webkit.org/show_bug.cgi?id=189448
     5        <rdar://problem/40994395>
     6
     7        Reviewed by Alan Bujtas.
     8
     9        We implement synthetic bold by drawing every glyph twice, the second time 1px to the right of the
     10        first time. This effectively means that the advance of such glyphs needs to be increased by 1px.
     11        Previously, we were doing this before shaping, which is a problem for some fonts which clobber the
     12        input advances during shaping, and emit totally new advances. Osaka is one such font. In order to
     13        make sure that these fonts have their synthetic bold advances correctly increased, we need to do
     14        the increasing after text shaping, rather than before it.
     15
     16        This patch temporarily disables LFC when synthetic bold is in effect. I will teach LFC how to handle
     17        synthetic bold in a follow-up patch.
     18
     19        Test: fast/text/osaka-synthetic-bold.html
     20
     21        * layout/integration/LayoutIntegrationCoverage.cpp:
     22        (WebCore::LayoutIntegration::canUseForText):
     23        * platform/graphics/Font.h:
     24        (WebCore::Font::syntheticBoldOffset const):
     25        (WebCore::Font::widthForGlyph const):
     26        * platform/graphics/WidthIterator.cpp:
     27        (WebCore::WidthIterator::adjustForSyntheticBold):
     28        (WebCore::WidthIterator::applyCSSVisibilityRules):
     29        * platform/graphics/WidthIterator.h:
     30        * platform/graphics/coretext/FontCoreText.cpp:
     31        (WebCore::Font::platformWidthForGlyph const):
     32        (WebCore::Font::platformBoundsForGlyph const):
     33
    1342021-08-26  Joone Hur  <joone@webkit.org>
    235
  • trunk/Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp

    r281432 r281687  
    435435    OptionSet<AvoidanceReason> reasons;
    436436    auto& primaryFont = fontCascade.primaryFont();
     437
     438    // FIXME: Teach FontCascade::widthForSimpleText() how to deal with synthetic bold, so we can use LFC.
     439    if (primaryFont.syntheticBoldOffset())
     440        SET_REASON_AND_RETURN_IF_NEEDED(FlowPrimaryFontIsInsufficient, reasons, includeReasons);
    437441
    438442    for (unsigned i = 0; i < length; ++i) {
  • trunk/Source/WebCore/platform/graphics/Font.h

    r281294 r281687  
    161161    }
    162162
    163 #if USE(CG) || USE(DIRECT2D) || USE(CAIRO)
    164163    float syntheticBoldOffset() const { return m_syntheticBoldOffset; }
    165 #endif
    166164
    167165    Glyph spaceGlyph() const { return m_spaceGlyph; }
     
    339337    float m_adjustedSpaceWidth { 0 };
    340338
    341 #if USE(CG) || USE(DIRECT2D) || USE(CAIRO)
    342339    float m_syntheticBoldOffset { 0 };
    343 #endif
    344340
    345341    unsigned m_treatAsFixedPitch : 1;
     
    398394
    399395#if ENABLE(OPENTYPE_VERTICAL)
    400     if (m_verticalData) {
    401 #if USE(CG) || USE(DIRECT2D) || USE(CAIRO)
    402         width = m_verticalData->advanceHeight(this, glyph) + m_syntheticBoldOffset;
    403 #else
     396    if (m_verticalData)
    404397        width = m_verticalData->advanceHeight(this, glyph);
    405 #endif
    406     } else
     398    else
    407399#endif
    408400        width = platformWidthForGlyph(glyph);
  • trunk/Source/WebCore/platform/graphics/WidthIterator.cpp

    r281423 r281687  
    557557}
    558558
     559void WidthIterator::adjustForSyntheticBold(GlyphBuffer& glyphBuffer, unsigned index)
     560{
     561    auto glyph = glyphBuffer.glyphAt(index);
     562    static constexpr const GlyphBufferGlyph deletedGlyph = 0xFFFF;
     563    auto syntheticBoldOffset = glyph == deletedGlyph ? 0 : glyphBuffer.fontAt(index).syntheticBoldOffset();
     564    m_runWidthSoFar += syntheticBoldOffset;
     565    auto& advance = glyphBuffer.advances(index)[0];
     566    setWidth(advance, width(advance) + syntheticBoldOffset);
     567}
     568
    559569void WidthIterator::applyCSSVisibilityRules(GlyphBuffer& glyphBuffer, unsigned glyphBufferStartIndex)
    560570{
     
    578588            // FIXME: Is this actually necessary? If the font specifically has a glyph for NBSP, I don't see a reason not to use it.
    579589            glyphBuffer.glyphs(i)[0] = glyphBuffer.fonts(i)[0]->spaceGlyph();
     590            adjustForSyntheticBold(glyphBuffer, i);
    580591            continue;
    581592        }
     
    594605            continue;
    595606        }
     607
     608        adjustForSyntheticBold(glyphBuffer, i);
    596609
    597610        if ((characterResponsibleForThisGlyph >= nullCharacter && characterResponsibleForThisGlyph < space)
     
    624637        }
    625638    }
    626 
    627    
    628639}
    629640
  • trunk/Source/WebCore/platform/graphics/WidthIterator.h

    r281423 r281687  
    7777    void applyExtraSpacingAfterShaping(GlyphBuffer&, unsigned characterStartIndex, unsigned glyphBufferStartIndex, unsigned characterDestinationIndex, float startingRunWidth);
    7878    void applyCSSVisibilityRules(GlyphBuffer&, unsigned glyphBufferStartIndex);
     79    void adjustForSyntheticBold(GlyphBuffer&, unsigned index);
    7980
    8081    struct AdditionalWidth {
  • trunk/Source/WebCore/platform/graphics/coretext/FontCoreText.cpp

    r281650 r281687  
    580580        }
    581581    }
    582     return advance.width + m_syntheticBoldOffset;
     582    return advance.width;
    583583}
    584584
     
    712712    boundingBox = CTFontGetBoundingRectsForGlyphs(m_platformData.ctFont(), platformData().orientation() == FontOrientation::Vertical ? kCTFontOrientationVertical : kCTFontOrientationHorizontal, &glyph, &ignoredRect, 1);
    713713    boundingBox.setY(-boundingBox.maxY());
    714     if (m_syntheticBoldOffset)
    715         boundingBox.setWidth(boundingBox.width() + m_syntheticBoldOffset);
     714    boundingBox.setWidth(boundingBox.width() + m_syntheticBoldOffset);
    716715
    717716    return boundingBox;
Note: See TracChangeset for help on using the changeset viewer.