win32ss / supermium

Chromium fork for Windows XP/2003 and up
https://win32subsystem.live/supermium/
BSD 3-Clause "New" or "Revised" License
2.05k stars 68 forks source link

Incorrect handling of local font-face on Windows 7 and Windows 2008 R2 #286

Open busyscout opened 6 months ago

busyscout commented 6 months ago

Supermium version 121 and below incorrectly handles font-face rule if it contains local font as a source. For example this simple web page is rendered incorrectly:

<html>
<head>
    <meta charset="UTF-8">
    <title>A Simple Example</title>
    <style>
          @font-face {
             font-family: "AwesomeWebFont";
             src: local("Arial");
           }
           div.new-font {
             font-family: "AwesomeWebFont";
           }
        </style>
</head>
<body>
<div>This is a default text</div>
<div class="new-font">This must be Arial</div>
</body>
</html>

Both divs use default font (Times New Roman in my case), but the second div with class new-font must use local Arial font according to specification. I experienced this problem only on Windows 7 SP1 and Windows 2008 R2 (both x64 and x32 versions of Supermium). I've also tested it on Windows Server 2016 and there is no such problem there. All other browsers (Chrome 110, Firefox 115) render this page correctly on all these operating systems.

win32ss commented 6 months ago

Does Windows 7/2008R2 have Platform Update installed? I think this may be a DirectWrite issue.

busyscout commented 6 months ago

I used this command to check if Platform Update is installed:

Get-HotFix -Id KB2670838

On Windows 7 it is installed, but on Windows Server 2008 R2 it is not.