<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - REGRESSION(r200094): [FreeType] Vertical text is broken after r200094"
   href="https://bugs.webkit.org/show_bug.cgi?id=157066#c12">Comment # 12</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - REGRESSION(r200094): [FreeType] Vertical text is broken after r200094"
   href="https://bugs.webkit.org/show_bug.cgi?id=157066">bug 157066</a>
              from <span class="vcard"><a class="email" href="mailto:cgarcia&#64;igalia.com" title="Carlos Garcia Campos &lt;cgarcia&#64;igalia.com&gt;"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=157066#c9">comment #9</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=277470&amp;action=diff" name="attach_277470" title="Try to fix EFL build">attachment 277470</a> <a href="attachment.cgi?id=277470&amp;action=edit" title="Try to fix EFL build">[details]</a></span>
&gt; Try to fix EFL build
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=277470&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=277470&amp;action=review</a></span >

Thanks for the review!

<span class="quote">&gt; &gt; Source/WebCore/platform/graphics/cairo/CairoUtilities.h:64
&gt; &gt; +#if USE(FREETYPE)
&gt; &gt; +class CairoFtFaceLocker {
&gt; &gt; +public:
&gt; &gt; +    CairoFtFaceLocker(cairo_scaled_font_t*);
&gt; &gt; +    ~CairoFtFaceLocker();
&gt; &gt; +
&gt; &gt; +    FT_Face ftFace() const { return m_ftFace; }
&gt; &gt; +
&gt; &gt; +private:
&gt; &gt; +    cairo_scaled_font_t* m_scaledFont { nullptr };
&gt; &gt; +    FT_Face m_ftFace { nullptr };
&gt; &gt; +};
&gt; 
&gt; One note is that by not putting the implementation of the constructor and
&gt; destructor here, it is impossible for the compiler to inline them. It might
&gt; be better to avoid changing that.</span >

It was my initial idea to do the implementation in the header, but I wanted to avoid including cairo-ft header in the header file. I didn't know this prevented the compiler from inline the implementation.

<span class="quote">&gt; &gt; Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp:253
&gt; &gt; +    // We need to reinitialize the instance, because the difference in size
&gt; &gt; +    // necessitates a new scaled font instance.
&gt; &gt; +    ASSERT(copy.m_scaledFont.get());
&gt; &gt; +    copy.buildScaledFont(cairo_scaled_font_get_font_face(copy.m_scaledFont.get()));
&gt; 
&gt; Why don't you also check if the size is different here similar to the
&gt; methods above?</span >

I followed the previous code, tried to cleanup everything but keeping the same behavior to avoid introducing new regressions.

<span class="quote">&gt; &gt; Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp:291
&gt; &gt; -    return m_scaledFont == other.m_scaledFont
&gt; &gt; -        &amp;&amp; m_size == other.m_size
&gt; &gt; -        &amp;&amp; m_syntheticOblique == other.m_syntheticOblique
&gt; &gt; -        &amp;&amp; m_orientation == other.m_orientation
&gt; &gt; -        &amp;&amp; m_syntheticBold == other.m_syntheticBold; 
&gt; &gt; +    return m_scaledFont == other.m_scaledFont;
&gt; &gt;  }
&gt; 
&gt; Yay!
&gt; 
&gt; &gt; Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp:349
&gt; &gt; +    ASSERT(m_scaledFont.get());
&gt; 
&gt; I'm not sure you need .get() here.</span >

I don't, it doesn't hurt either, though.

<span class="quote">&gt; &gt; Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp:-412
&gt; &gt; -    cairo_ft_scaled_font_unlock_face(m_scaledFont);
&gt; 
&gt; Wow. Really nice fix here.</span ></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>