Alex313031 / thorium-legacy

Repo for Windows XP/Vista & 7/8/8.1 Thorium Builds
https://thorium.rocks/win7
BSD 3-Clause "New" or "Revised" License
223 stars 8 forks source link

Wrong Font and Missing Icons on Site #83

Closed DaveH1 closed 4 months ago

DaveH1 commented 5 months ago

Windows XP SP3 x86 Thorium 122.0.6261.169

On this site - https://forums.digitalspy.com The font displayed is incorrect, and icons are missing at the top and bottom of the pages.

The site displays correctly in Supermium 122, and 360Chrome (which is Chromium 86).

andika207 commented 5 months ago

On this site - https://forums.digitalspy.com The font displayed is incorrect, and icons are missing at the top and bottom of the pages.

screencap for more details. https://msfn.org/board/topic/186133-thorium/?do=findComment&comment=1264430

DaveH1 commented 5 months ago

Thanks @andika207 I should have thought to add those myself!

Alex313031 commented 5 months ago

@DaveH1 @andika207 Two things. Thorium installs the dev build of UBlock Origin by default. As the guy said on msfn, this might be blocking remote fonts. Number 2 is that you should make sure you have the Noto Emoji font installed, which I have been providing with every release.

I will see if I can recreate it on my XP machine, and if I can, I will test these things to fix it and get back to you.

DaveH1 commented 5 months ago

Thanks Alex. Thorium is using uBlock Origin 1.57, as is Supermium. The 'Block Remote Fonts' option is not enabled. I have the Noto Emoji font installed. I am using Stylus to restore the correct font. However, I've done some more tests now, and it appears that it's Stylus which is casing the icons to disappear! If I disable the style which have been set up to correct the font, the icons come back, but the font is then wrong. So, it appears that it's only the font which is the problem, the missing icons were a red herring, sorry about that! Cheers, Dave.

UCyborg commented 4 months ago

Practically same error in console on Google Maps:

/maps:1 Failed to decode downloaded font: https://fonts.gstatic.com/l/font?kit=HhyAU5Ak9u-oMExPeInvcuEmPosC9zSpYaEEU68cdvrHJvcmq9PLEJIz8dTgzBT9BLQV9eAKtpW99CIiY4Uzx5dFzRNFinsyGN7Ad_KqOtUz4qwMP-ep9_kaFDxaxOtdMFDQ3KE6E-W21HY9z_c-q5EHCGcKDdMblcel9HfIQEnXlJ05xiZBQVK1mJrS-pzdSaYNIX6vwojn1TRSC9VFW_MZaXgbzAfwnMiL2WDIyTkmUQo9f9GBByJjl1WVVov8BQuLj-ko8X8T1M5d17Iw8qmTsBDlYjp81YvenMWVd4qu1mrOhdSE2WEFYML6u4m_4y6QxIfYrXxz8Y_t3KWGDm8ETtSi0AipjoNqSVTGJb6LFz9dDceggQ5l9uBuYcwJzwZVcxtUIGlzNQd6McUS6E0YDuktqhAb3ET3j4Qo4yRTvbYS20dBBg9aV5tI0RSC5pt01ecVvC5Fu0jspVuDT7mNqS...ExyYhRzvsef9uTDOyHfNfYoop6-JViwLTH0FId2AMAff5DrNEAyssclNesPAk8Jdj_KDTYNdrNXsNKI0YEJz7dgrtqU6xtURqg0WxHOtbPgAK_U42K8faEOiq3MJmWPzyHixnwwPwWCPO-ZaQk7Y_XcIGe4ing2EFoc7iZ7GoSsMO-RqKo4uH-7Mqnl98O5p8bhlt061M5mMeCvXG2ygzbRbrnvpv932E4HqgSpcnhIKLNJra4SDuNXnsEX8X-uV9SLW5dJRLtuS6YTjLg4FAxAU2g4FaxWXO6RrZpChFA4zQQbO-S51-FfLvu39EUIGYq5UNVASR0rchCVWVXLFVj8x7xmUSfNF6nI1A54RaIfxcn-k_pPFg9O7fEmcocrGlVlVRacpXS4gVJc5DeaCj2rhtfICxOHHS3CrY6-U-ENrYeQrPiRw4C0ri8CHWJzqCRY3qd-A-TFLJSloFAzdF5b0eADaUy4Mg&skey=f8ec4d50247dc1c1&v=v260
/maps:1 OTS parsing error: Unable to instantiate font face from font data.

If I remember correctly, Supermium had this issue in the beginning when GDI was used for font rendering, but was eventually fixed, but I don't recall when or with which version.

Alex313031 commented 4 months ago

@UCyborg @DaveH1 @andika207 I can confirm this bug.

Thorium has all the GDI patches from Supermium, but..... this occurs.

Also, this appears to only happen on certain sites.

For example, If I remove the Noto Font completely, then many sites are broken. For example I can't see the Emojis on reactions on Github.

When I re-add it, I can see Emojis on GitHub, and on Wikipedia too, for example.

But yes, even when installed, certain sites like Google Maps are still showing the blank "square" that Windows uses as a substitute when it doesn't know what to do with a Font. I'm going to investigate.

Alex313031 commented 4 months ago

@UCyborg @DaveH1 @andika207 OK I must have done something wrong while rebasing the M122 version. To make sure, I built Supermium M122 with the same build configuration I use for Thorium, and the browser displayed google maps correctly. So it is something on my end in the source code. I need to retrack my steps....

UPDATE: I believe I found the issue, as well as two more minor issues, sooo.

DaveH1 commented 4 months ago

Thanks Alex, good to hear that you've found the problem. I should say though that my problem (on forums.digitalspy.com) is with the font, not with the icons. Sorry for the confusion I caused earlier on by wrongly mentioning missing icons there. The icons are fine, it's the font which is wrong. Cheers, Dave.

Alex313031 commented 4 months ago

@UCyborg @DaveH1 Fixed it. As well as some other things like setting it as your default browser, and the re-added WAV support.

In particular, see this code block which fixes the font/icons > https://github.com/Alex313031/thorium-legacy/blob/main/patches/winxp-vista-support_thorium.patch#L16488

That says that if it is a Variable Font (most fonts that contain icons like on the google maps site are of this type), and if DirectWrite is disabled (always disabled on XP/Vista since we use GDI), it will issue a "success" even though it would normally issue a "fail" because of GDI. Even though we are overriding it with success, this is all that is needed to get it to work since we use the modified Noto Emoji fonts. Chromium doesn't expect these modified fonts or to be running on GDI, so that's why it normally would issue a fail. But win32ss made it so that it works. Apparently this fix was issued in the first M122 Supermium release, but somehow I missed this codeblock when I was rebasing my patches, so in Thorium it has been broken this whole time.

Thanks for bringing this to my attention! Like I said, it also forced me to retrace my steps which was time consuming, but it was ultimately worth it since I not only fixed this, but the other stuff mentioned above as well!

New M122 builds coming soon which integrate these fixes, as well as FTP support! I am particularly excited about this because they removed it in M89, and no Chromium browser has restored support for it until now. This made it where if you wanted to browse/download something from an ftp:// or ftps:// site, you had to open it in an external application, or Firefox. It will be disabled by default for security reasons, but will be behind a chrome://flags flag.

DaveH1 commented 4 months ago

Great news Alex, thanks very much, and glad to have been of help. Good to hear that FTP will be back too!

Alex313031 commented 4 months ago

@DaveH1 Hey, is your CPU capable of SSE4.1? Generally Core 2 Duo and newer.

If so, I can share with you a build that has these fixes, ahead of the public release.

DaveH1 commented 4 months ago

Thanks so much Alex! Should be OK.

Clipboard-1

Alex313031 commented 4 months ago

@DaveH1 Ahh, a Core 2 based Xeon, nice. Yup, this is the first generation of Xeons to have SSE4.1, so you're in luck.

Here you go > https://wormhole.app/kQpq4#Y8h9-c_hvr0mK8Dlhrs9Ng

DaveH1 commented 4 months ago

Looks good Alex! FTP is a nice addition to have.

The font on forums.digitalspy.com now looks correct, but is very 'thin' and quite hard to read. It's the same on the current version of Supermium.

Just to illustrate, this is what it now looks like in Thorium (and Supermium) -

Clipboard-1

And this is what it looks like in 360Chrome -

Clipboard-2

That is how it should look (it looks like that in Firefox too). So it now looks like the correct font, but the wrong 'weight'. Cheers, Dave.

Alex313031 commented 4 months ago

@DaveH1 Is that Firefox 52.9.0 or MyPal 68? If so, this has proper support for it.

In Supermium/Thorium, we are taking the more simple and modest approach of simply hooking into Windows XP's GDI, and using the Emoji fonts where applicable. For other fonts, it is limited. For example, some sites that only specify "Serif" as their font, will use XP's Times New Roman font. Variable fonts like these will not use "Light" or "Heavy" weights, instead always using the "Normal" weight.

DaveH1 commented 4 months ago

Thanks Alex. Firefox 52.9. I guess this won't be fixed from what you're saying. A shame, as that forum site is pretty unreadable on Thorium and Supermium. The other problem is that threads with new unread posts on that forum should appear in bold text, but in Thorium and Supermium everything appears the same, so you can't see what's new. I wonder how 360Chrome handles it? Cheers, Dave.

Templayer commented 4 months ago

New M122 builds coming soon which integrate these fixes, as well as FTP support! I am particularly excited about this because they removed it in M89, and no Chromium browser has restored support for it until now.

NICE! That has always bothered me!

DaveH1 commented 3 weeks ago

Hi Alex. Just a heads-up that the font display problem on forums.digitalspy.com on Windows XP has been fixed on Supermium 126. I hope you can do the same on the next version of Thorium Legacy. Cheers, Dave.