New [SUNSTONE MIUI14 STABLE] Web Browser Font


MrW0LF

Members
Apr 11, 2023
14
5
Hi

on SUNSTONE MIUI14 stable rom, even disabling Variable Fonts, web content in Edge browser is still using MiSans, making browsing some sites (even this one) difficult cause misans font lose a lot of boldness in web pages.
 
  • Like
Reactions: divided by zero
I second this. Same issue is present in Chrome, and I agree with you that bold formatting is near identical to regular text. It makes browsing forums for new topics particularly cumbersome.
 
yes, to clarify the issue:

web browser/webview content just uses a different font rendering from global ROM. it is not related to Variable Fonts cause it is unaffected from having them enabled or not, app menu fonts change, web content do not. Just straight up web content it seems to be using different fonts that make lot of sites quite difficult to read, especially the bold sentences, for example forums topic name
 
post screeenshots..

this is how it should be (from and android emulator unfortunately I have only 1 device right now and is on xiaomi.eu rom, but the difference in boldness is clear)

android_emulator_howitshouldbe.png




this is how it is on my sunstone with eu rom stable (xiaomi.eu_multi_SUNSTONE_V14.0.1.0.TMQCNXM_v14-13.zip)

just look at the grey ball on the left to identify the "already read" topic...

xiaomieu14sunstone.png



no matter if i select or not Variable Fonts, no matter if i try to change font with Themes, not even matter if I change font with Magisk Font Manager...
 
did you try to change font thickness in the settings?
 
I dont see any issue.. that's how bold font looks like on MIUI..
003fe3b613d59731fe74df75bf12448b.jpg
 
I dont see any issue.. that's how bold font looks like on MIUI..
003fe3b613d59731fe74df75bf12448b.jpg
don't know why but I moved to EU rom 2 days ago from offical EEA rom (that is miui14 but still android 12), and on that rom I had bold fonts as first screenshot I posted from the emulator on the stock roboto font...
 
don't know why but I moved to EU rom 2 days ago from offical EEA rom (that is miui14 but still android 12), and on that rom I had bold fonts as first screenshot I posted from the emulator on the stock roboto font...
EEA doesnt have variable font thickness support..
 
EEA doesnt have variable font thickness support..
And I know that... but then why even disabling Variable Fonts in developer options do not restore the "old" behaviour?

And I repeat, the issue is just on the web content, variable/non variable fonts work perfectly outside web pages in any app... even forcing another system font with magisk...
 
PS: I've also done a test... deleting MiSansVF.ttf from fonts kinda restore bold font behaviour in web pages, though it breaks a lot of sites loading...

To me it seems that that font is FORCED over web content (when I think it should not be that way...)
 
EEA doesnt have variable font thickness support..
i kinda fixed it myself

i created a magisk mask module for /etc/fonts.xml and /system/fonts/ folder dumped from EEA rom and forced the systemless replacing of fonts folder.

now I have same behaviour of EEA rom even on web content.

so it's definetly some settings in fonts.xml that force the usage of "non-bold" aware fonts in web-content...
 
  • Like
Reactions: Đỗ Xuân Khánh
this is the section of xiaomi.eu rom /etc/fonts.xml that forces misans over web content (generic sans-serif family font)

removing this section alone fixed my problem without needing any other replacing of fonts or anything

Code:
<!-- # MIUI Edit Start -->
    <!-- For WebView font -->
        <font weight="100" style="normal" postScriptName="MiSansVF">MiSansVF.ttf
            <axis tag="wght" stylevalue="150"/>
        </font>
        <font weight="300" style="normal" postScriptName="MiSansVF">MiSansVF.ttf
            <axis tag="wght" stylevalue="250"/>
        </font>
        <font weight="400" style="normal" postScriptName="MiSansVF">MiSansVF.ttf
            <axis tag="wght" stylevalue="340"/>
        </font>
        <font weight="500" style="normal" postScriptName="MiSansVF">MiSansVF.ttf
            <axis tag="wght" stylevalue="400"/>
        </font>
        <font weight="900" style="normal" postScriptName="MiSansVF">MiSansVF.ttf
            <axis tag="wght" stylevalue="480"/>
        </font>
        <font weight="700" style="normal" postScriptName="MiSansVF">MiSansVF.ttf
            <axis tag="wght" stylevalue="400"/>
        </font>
    </family>

    <family lang="zh-Hans">
        <font weight="400" style="normal">Roboto-Regular.ttf</font>
    </family>

    <family lang="zh-Hant">
        <font weight="400" style="normal">Roboto-Regular.ttf</font>
    </family>

    <family>
    <!-- # MIUI Edit END -->
 
Last edited by a moderator:
removing that section is effective even keeping variable fonts enabled and MiSans as system font. It just makes it skip web content rendering and fallback to stock fonts for that.

I'm really happy with this now, please consider making it a toggle...
 
removing that section is effective even keeping variable fonts enabled and MiSans as system font. It just makes it skip web content rendering and fallback to stock fonts for that.

I'm really happy with this now, please consider making it a toggle...
Known. No toggle possible for this.
 
removing that section is effective even keeping variable fonts enabled and MiSans as system font. It just makes it skip web content rendering and fallback to stock fonts for that.

I'm really happy with this now, please consider making it a toggle...
Could you share how to patch to remove that section? Do we have to make Magisk module?
 
removing that section is effective even keeping variable fonts enabled and MiSans as system font. It just makes it skip web content rendering and fallback to stock fonts for that.

I'm really happy with this now, please consider making it a toggle...
Could you share the magisk file pls?
I kinda wanna use font on some apps that doesn't use it