Changeset 243602 in webkit


Ignore:
Timestamp:
Mar 28, 2019 6:58:38 AM (5 years ago)
Author:
Carlos Garcia Campos
Message:

[FreeType] Incorrect application of glyph positioning in the Y direction
https://bugs.webkit.org/show_bug.cgi?id=161493

Reviewed by Michael Catanzaro.

Source/WebCore:

Use the first glyph origin as the initial advance of every complex text run.

  • platform/graphics/cairo/FontCairo.cpp:

(WebCore::FontCascade::drawGlyphs): Update the yOffset using the height advance.

  • platform/graphics/cairo/GraphicsContextImplCairo.cpp:

(WebCore::GraphicsContextImplCairo::drawGlyphs): Ditto.

  • platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:

(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Set the initial advance.

LayoutTests:

Rebaseline fast/text/international/hebrew-vowels.html.

  • platform/gtk/fast/text/international/hebrew-vowels-expected.png:
  • platform/gtk/fast/text/international/hebrew-vowels-expected.txt:
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r243601 r243602  
     12019-03-28  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [FreeType] Incorrect application of glyph positioning in the Y direction
     4        https://bugs.webkit.org/show_bug.cgi?id=161493
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Rebaseline fast/text/international/hebrew-vowels.html.
     9
     10        * platform/gtk/fast/text/international/hebrew-vowels-expected.png:
     11        * platform/gtk/fast/text/international/hebrew-vowels-expected.txt:
     12
    1132019-03-27  Ryosuke Niwa  <rniwa@webkit.org>
    214
  • trunk/LayoutTests/platform/gtk/fast/text/international/hebrew-vowels-expected.txt

    r224015 r243602  
    1212          text run at (0,0) width 458: "The vowel (two vertical dots) should be centered beneath the main letter."
    1313      RenderBlock {DIV} at (0,86) size 784x91
    14         RenderText {#text} at (33,1) size 67x88
    15           text run at (33,1) width 67 RTL: "\x{5E1}\x{5B0} "
    16         RenderText {#text} at (0,1) size 34x88
    17           text run at (0,1) width 34 RTL: "\x{5E9}\x{5B0}"
     14        RenderText {#text} at (57,1) size 66x88
     15          text run at (57,1) width 66 RTL: "\x{5E1}\x{5B0} "
     16        RenderText {#text} at (0,1) size 57x88
     17          text run at (0,1) width 57 RTL: "\x{5E9}\x{5B0}"
    1818        RenderText {#text} at (0,0) size 0x0
    1919      RenderBlock {HR} at (0,185) size 784x2 [border: (1px inset #000000)]
  • trunk/Source/WebCore/ChangeLog

    r243601 r243602  
     12019-03-28  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [FreeType] Incorrect application of glyph positioning in the Y direction
     4        https://bugs.webkit.org/show_bug.cgi?id=161493
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Use the first glyph origin as the initial advance of every complex text run.
     9
     10        * platform/graphics/cairo/FontCairo.cpp:
     11        (WebCore::FontCascade::drawGlyphs): Update the yOffset using the height advance.
     12        * platform/graphics/cairo/GraphicsContextImplCairo.cpp:
     13        (WebCore::GraphicsContextImplCairo::drawGlyphs): Ditto.
     14        * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
     15        (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Set the initial advance.
     16
    1172019-03-27  Ryosuke Niwa  <rniwa@webkit.org>
    218
  • trunk/Source/WebCore/platform/graphics/cairo/FontCairo.cpp

    r237845 r243602  
    6666            glyphs[i] = { glyphsData[i], xOffset, yOffset };
    6767            xOffset += advances[i].width();
     68            yOffset -= advances[i].height();
    6869        }
    6970    }
  • trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextImplCairo.cpp

    r237886 r243602  
    249249            glyphs[i] = { glyphsData[i], xOffset, yOffset };
    250250            xOffset += advances[i].width();
     251            yOffset -= advances[i].height();
    251252        }
    252253    }
  • trunk/Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp

    r239539 r243602  
    169169        float advanceY = harfBuzzPositionToFloat(glyphPositions[i].y_advance);
    170170
     171        if (!i)
     172            m_initialAdvance = { offsetX, -offsetY };
     173
    171174        m_glyphs[i] = glyph;
    172175        m_baseAdvances[i] = { advanceX, advanceY };
Note: See TracChangeset for help on using the changeset viewer.