Changeset 268638 in webkit


Ignore:
Timestamp:
Oct 17, 2020 12:06:23 AM (4 years ago)
Author:
mmaxfield@apple.com
Message:

REGRESSION(r268561): Synthetic oblique text is drawn upside-down
https://bugs.webkit.org/show_bug.cgi?id=217867
<rdar://problem/70400846>

Reviewed by Darin Adler.

Source/WebCore:

I made a typo.

Test: fast/text/synthetic-oblique.html

  • platform/graphics/FontCascade.h:

(WebCore::FontCascade::syntheticObliqueAngle):

  • platform/graphics/coretext/FontCascadeCoreText.cpp:

(WebCore::computeOverallTextMatrix):

LayoutTests:

  • fast/text/synthetic-oblique-expected.html: Added.
  • fast/text/synthetic-oblique.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r268634 r268638  
     12020-10-17  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        REGRESSION(r268561): Synthetic oblique text is drawn upside-down
     4        https://bugs.webkit.org/show_bug.cgi?id=217867
     5        <rdar://problem/70400846>
     6
     7        Reviewed by Darin Adler.
     8
     9        * fast/text/synthetic-oblique-expected.html: Added.
     10        * fast/text/synthetic-oblique.html: Added.
     11
    1122020-10-16  Devin Rousso  <drousso@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r268637 r268638  
     12020-10-17  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        REGRESSION(r268561): Synthetic oblique text is drawn upside-down
     4        https://bugs.webkit.org/show_bug.cgi?id=217867
     5        <rdar://problem/70400846>
     6
     7        Reviewed by Darin Adler.
     8
     9        I made a typo.
     10
     11        Test: fast/text/synthetic-oblique.html
     12
     13        * platform/graphics/FontCascade.h:
     14        (WebCore::FontCascade::syntheticObliqueAngle):
     15        * platform/graphics/coretext/FontCascadeCoreText.cpp:
     16        (WebCore::computeOverallTextMatrix):
     17
    1182020-10-16  Said Abou-Hallawa  <sabouhallawa@apple.com>
    219
  • trunk/Source/WebCore/platform/graphics/FontCascade.h

    r268561 r268638  
    197197    bool primaryFontIsSystemFont() const;
    198198
    199     static int syntheticObliqueAngle() { return 14; }
     199    static float syntheticObliqueAngle() { return 14; }
    200200
    201201    std::unique_ptr<DisplayList::DisplayList> displayListForTextRun(GraphicsContext&, const TextRun&, unsigned from = 0, Optional<unsigned> to = { }, CustomFontNotReadyAction = CustomFontNotReadyAction::DoNotPaintIfFontNotReady) const;
  • trunk/Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp

    r268561 r268638  
    147147    result.setD(-result.d());
    148148    if (platformData.syntheticOblique()) {
    149         float obliqueSkew = tanf(FontCascade::syntheticObliqueAngle() * piFloat / 180);
     149        float obliqueSkew = tanf(deg2rad(FontCascade::syntheticObliqueAngle()));
    150150        if (platformData.orientation() == FontOrientation::Vertical) {
    151151            if (font.isTextOrientationFallback())
     
    154154                result = AffineTransform(1, -obliqueSkew, 0, 1, 0, 0) * result;
    155155        } else
    156             result = AffineTransform(1, 0, -obliqueSkew, 1, 0, 0);
     156            result = AffineTransform(1, 0, -obliqueSkew, 1, 0, 0) * result;
    157157    }
    158158
Note: See TracChangeset for help on using the changeset viewer.