<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>206273</bug_id>
          
          <creation_ts>2020-01-14 19:22:24 -0800</creation_ts>
          <short_desc>[Win] Remove obsolete useGDI code path and FontRenderingMode enum</short_desc>
          <delta_ts>2023-03-03 03:07:16 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Text</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Fujii Hironori">fujii</reporter>
          <assigned_to name="Fujii Hironori">fujii</assigned_to>
          <cc>achristensen</cc>
    
    <cc>bfulgham</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>pvollan</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1606767</commentid>
    <comment_count>0</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2020-01-14 19:22:24 -0800</bug_when>
    <thetext>[Win] Remove obsolete useGDI code path and FontRenderingMode enum

The code was added by r28867.
It draws texts using ExtTextOut with ETO_GLYPH_INDEX for useGDI code path.
However, r126666 removes drawGDIGlyphs, the most important part of useGDI code path.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1606770</commentid>
    <comment_count>1</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2020-01-14 19:39:45 -0800</bug_when>
    <thetext>Oh, it is being used for CGContextSetShouldUsePlatformNativeGlyphs.

https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/platform/graphics/win/FontCGWin.cpp?rev=238253

&gt; CGContextSetShouldUsePlatformNativeGlyphs(cgContext, usePlatformNativeGlyphs);

Does AppleWin port still use useGDI code path?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1606773</commentid>
    <comment_count>2</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2020-01-14 19:51:17 -0800</bug_when>
    <thetext>Oops, usePlatformNativeGlyphs is always false.
https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/platform/graphics/win/FontCGWin.cpp?rev=254556#L177</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1606774</commentid>
    <comment_count>3</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2020-01-14 19:55:09 -0800</bug_when>
    <thetext>Oh, no.  comment 2 was wrong.

isPrinterFont is always false, usePlatformNativeGlyphs is font.platformData().useGDI().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1606827</commentid>
    <comment_count>4</comment_count>
      <attachid>387758</attachid>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2020-01-15 00:01:37 -0800</bug_when>
    <thetext>Created attachment 387758
minibrowser.exe.plist to enable useGDI

There are two ways to enable useGDI code path for AppleWin MiniBrowser.

1. applying the following patch

diff --git a/Tools/MiniBrowser/win/WebKitLegacyBrowserWindow.cpp b/Tools/MiniBrowser/win/WebKitLegacyBrowserWindow.cpp
index f81a9be39f3..a062b973aca 100644
--- a/Tools/MiniBrowser/win/WebKitLegacyBrowserWindow.cpp
+++ b/Tools/MiniBrowser/win/WebKitLegacyBrowserWindow.cpp
@@ -297,6 +297,7 @@ bool WebKitLegacyBrowserWindow::setToDefaultPreferences()
     m_standardPreferences-&gt;setJavaScriptEnabled(TRUE);
     m_prefsPrivate-&gt;setAllowUniversalAccessFromFileURLs(FALSE);
     m_prefsPrivate-&gt;setAllowFileAccessFromFileURLs(TRUE);
+    m_standardPreferences-&gt;setFontSmoothing(FontSmoothingTypeWindows);
 
     m_prefsPrivate-&gt;setDeveloperExtrasEnabled(TRUE);
 

2. put this minibrowser.exe.plist to %userprofile%\AppData\Roaming\Apple Computer\Preferences</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1606828</commentid>
    <comment_count>5</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2020-01-15 00:08:20 -0800</bug_when>
    <thetext>I don&apos;t know AppleWin is still using useGDI code path, but it is still valid code path to work as expected.
Closed as INVALID.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1606972</commentid>
    <comment_count>6</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2020-01-15 10:04:06 -0800</bug_when>
    <thetext>(In reply to Fujii Hironori from comment #1)
&gt; Oh, it is being used for CGContextSetShouldUsePlatformNativeGlyphs.
&gt; 
&gt; https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/platform/
&gt; graphics/win/FontCGWin.cpp?rev=238253
&gt; 
&gt; &gt; CGContextSetShouldUsePlatformNativeGlyphs(cgContext, usePlatformNativeGlyphs);
&gt; 
&gt; Does AppleWin port still use useGDI code path?

I don&apos;t believe it is still being used.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1607172</commentid>
    <comment_count>7</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2020-01-15 14:37:48 -0800</bug_when>
    <thetext>Can i remove it ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1607174</commentid>
    <comment_count>8</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2020-01-15 14:43:09 -0800</bug_when>
    <thetext>(In reply to Fujii Hironori from comment #7)
&gt; Can i remove it ?

I think so, but it would be good to confirm with Brent or Alex.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1821247</commentid>
    <comment_count>9</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2021-12-07 15:33:40 -0800</bug_when>
    <thetext>The default is FontRenderingMode::Normal, but it looks like users can override that by setting a preference. It looks like that preference is set by placing a .plist in a specific place (as Fujii found in https://bugs.webkit.org/show_bug.cgi?id=206273#c4). I think this is a tradeoff between the pros of eliminating maintenance burden against the cons of making some (specific) Windows users&apos; text look different.

In this case, because the change is somewhat subtle, and because it&apos;s difficult to imagine someone going through the trouble of putting a plist in a specific place on the filesystem on Windows just to get their iTunes text to look slightly different, I think maintenance burden wins, and we can just delete this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1937173</commentid>
    <comment_count>10</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-02-27 13:23:53 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/10756</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1938452</commentid>
    <comment_count>11</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-03-03 03:06:08 -0800</bug_when>
    <thetext>Committed 261133@main (21e5a249467d): &lt;https://commits.webkit.org/261133@main&gt;

Reviewed commits have been landed. Closing PR #10756 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1938453</commentid>
    <comment_count>12</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-03-03 03:07:16 -0800</bug_when>
    <thetext>&lt;rdar://problem/106188944&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>387758</attachid>
            <date>2020-01-15 00:01:37 -0800</date>
            <delta_ts>2020-01-15 00:01:37 -0800</delta_ts>
            <desc>minibrowser.exe.plist to enable useGDI</desc>
            <filename>minibrowser.exe.plist</filename>
            <type>application/octet-stream</type>
            <size>223</size>
            <attacher name="Fujii Hironori">fujii</attacher>
            
              <data encoding="base64">YnBsaXN0MDDVAQIDBAUGBgYJBl8QFVdlYktpdERldmVsb3BlckV4dHJhc18QF1dlYktpdEZ1bGxT
Y3JlZW5FbmFibGVkXxAwV2ViS2l0RGlkTWlncmF0ZVdlYktpdFByZWZlcmVuY2VzVG9DRlByZWZl
cmVuY2VzXxAXV2ViS2l0Rm9udFNtb290aGluZ1R5cGVfEBlXZWJLaXRBVkZvdW5kYXRpb25FbmFi
bGVkCQkJEAQJCBMrRXiSrq+wsbMAAAAAAAABAQAAAAAAAAALAAAAAAAAAAAAAAAAAAAAtA==
</data>

          </attachment>
      

    </bug>

</bugzilla>