• OS
  • I am using Linux comfortably

bz12 Oh, you mean visually uncomfortable? Yes, font renedering is worst on Ubuntu based distros. The most likable font renderer for my taste are on OpenSUSE and Manjaro.

11 days later

KM Disabling anti-aliasing was definitely the key to solving my eyestrain problems on all the operating systems I use (Windows, Ubuntu, Android). It took me months of searching and looking down many blind alleys before I discovered that anti-aliasing was the cause of my problem (Why is this so hard? Why is there so little discussion of this as a cause of eystrain in mainstream media?) Months more research to find reliable, comprehensive ways to disable it but once I did - bliss. I can now use my devices for as long I want with zero eyestrain.

    George357 I'd be interested in trying this if you have any sources to share for guidance.

      George357 Why is there so little discussion of this as a cause of eystrain in mainstream media?) Months more research to find reliable, comprehensive ways to disable it but once I did - bliss. I can now use my devices for as long I want with zero eyestrain.

      I wrote on this forum about certain forms of font antialisting and potential negative effects a number of years ago.

      ryans It's pretty simple in Ubuntu as long as you have basic knowledge of using the terminal / command line. I wrote a guide on how to do it in the ubuntu forum a while back in response to someone's question. Here is the page address:

      https://askubuntu.com/questions/1199155/how-do-i-disable-font-antialiasing-in-some-apps-e-g-vlc-telegram-viber

      copy and paste that into your address bar and scroll down to the answer beginning with:

      'I had the same issue in Linux Mint 19.2…'

      and then follow the instructions there.

      bz12 I've written up a guide that explains how to disable anti-aliasing in Windows 10. It took me a bit longer than expected to write, hence the delay in replying. It's too long to enter here so I've put it up on another site. Here is the link:

      https://superuser.com/questions/1762568/how-to-disable-font-smoothing-anti-aliasing-in-windows-10

      Don't be put off by the length, most of that is just my wordy explanations. The actual technique is quick and easy to apply.

      The same cannot be said for disabling anti-aliasing in Android, that's altogether more challenging.

      There is no setting to 'turn off' anti-aliasing in Android, nor is there an app for that. Anti-aliasing is hardcoded 'on' deep in the Android code, the only way to turn it off is to modify that code.

      My method relies on replacing one of the core Android system files with one that I've modified to block the system call that turns on anti-aliasing. On most Android phones this is impossible, you can only do it on phones that have the option to unlock the bootloader (xiaomi/poco, google pixel, motorola, oneplus, sony, possibly some others). Furthermore, my method will only work on phones that are running close to stock Android (ie no or minimal modifications from standard Google Pixel Android). Once your bootloader is unlocked you will have to 'root' your phone by installing software called Magisk and then use Magisk to install a small piece of code containing my modified system file. All that requires you to connect your phone to a PC and use special software called adb and fastboot to manipulate your phone and install certain files.

      That's just a brief summary of what's involved. A detailed step-by-step guide would be far longer. You may already have decided it's way too much trouble which is fair enough. I only did it because I had to. Ten minutes of reading Android's anti-aliased text is enough to make my eyes hurt, more than thirty minutes and discomfort turns to burning pain so the choice for me was: turn off the anti-aliasing or don't have a smartphone.

      If you want the full step-by-step guide, post a reply and I'll start writing, but it might take me a while.

        George357 thanks for the dedication. I will try with Windows tomorrow. As for Android, I don't think my issues are solely text related, so it's no big deal. I alone don't want to take any more of your time unless there's several people here interested. Plus I don't have a compatible device atm but possibly in the future.

        15 days later

        ryans Do you mean Intel UHD 620 graphics @degen ? I thought 630 was just for desktops.

        UHD 620 graphics is integrated in the CPU. I have this card on my MPB Intel Core i9

        9 months later

        George357

        I just read your post where you explained you were able to disable font smoothing on android devices. Since I recognized I can solve all my problems disabling edge and font smoothing on windows 11 I'm trying to disable it on my Android devices too. The rooting process shouldn't be the problem. I'd just be interested in the code you changed on the rooted device. Can you explain which file you changed and if you did it using your computer or the smartphone directly?

          eloff66

          The file I modify is called libhwui/PaintImpl.cpp which is part of the Android graphics stack. Here is a link to the file in the Android source code:

          https://android.googlesource.com/platform/frameworks/base/+/refs/heads/android10-release/libs/hwui/hwui/PaintImpl.cpp

          you can view my modified version on my Github here:

          https://github.com/georger45/Android/blob/main/HWUI-PaintImpl-AADisabled.cpp

          the changes I made are on lines 97-100 and 168-173

          You can't modify the files in the Android system installed on your phone, not least because they are all compiled files (the human readable source code has been turned into machine code that cannot be read or edited by humans) so you have to download the source code to a linux pc (all Android development is done on linux), modify it as required, compile it, and then install the compiled file(s) on the Android phone in place of the originals. In practice you can't even do that because the system partition (which contains all the system files) is locked down and cannot be modifed. Which is where Magisk comes in. This software makes it possible to replace system files at boot time so when you boot up your phone Magisk loads into RAM your modified system file(s) rather than the original one(s) installed in the system partition. This is the 'systemless' root solution, so called because it doesn't modify the system partition. Here is an outline of the procedure:

          1. Create Android development environment in a linux VM in Virtualbox (if using Windows)
          2. Download the Android source code (30GB+)
          3. Make the necessary source code changes
          4. Compile the source code (using the Android tools that came with it)
          5. Create a Magisk module containing the desired compiled file(s)
          6. Unlock the phone's bootloader
          7. Install Magisk on the phone
          8. Use the Magisk app to install the Magisk module from step 5 and reboot

          You will need a powerful PC with a lot of RAM (at least 16GB, probably more) to compile the source code and there are a lot of complicated and important details to each step.

          Alternatively you could just download and install my Magisk module, if you don't mind installing 'unkown' software in your phone. (I know it's perfectly safe because I made it but you obviously don't know that!)

          Those changes will disable AA in the Android system and most (but not all) apps but NOT in Android browsers. For reasons I am not aware of, all Android browsers use their own internal text rendering software (separate from the Android system software) to render website text (but not the browser UI text, strangely that's rendered by the system) so website text will continue to be antialiased even after all the above unless AA is turned off inside the browser itself. Only Firefox (Beta and Nightly versions only) plus various forks of Firefox allow this. To proceed:

          type 'about:config' (without the quotes) into the Firefox address bar and in the search box that appears, enter:

          gfx.text.disable-aa

          that entry will then appear below, toggle the setting from false to true and close and re-open firefox

          I'm happy to answer any questions you might have about any of that (!).

          Also, you said in your post that you could solve all your problems disabling edge and font smoothing on Windows 11. Did you disable it everywhere? I never could get rid of it in the Windows settings app and the other modern windows 10 areas.

            George357 Did you ever check if watching screenshots of content with antialiased fonts is uncomfortable for you, too? It could be interesting to know if there's a difference.

              KM No difference for me! I often find myself having to read screenshots of antialiased text and it has the exact same effect - eye pain after a few minutes of reading. Antialiasing blurs the boundary between the text and the background meaning that there is no sharp, hard delineation between black text and white background but rather a smooth transition through shades of grey and since our eyes rely on contrast to detect focus I think this forces our eyes to work harder to maintain focus on the text which leads to eyestrain in susceptible individuals. That's my theory anyway.

              • KM likes this.

              George357

              Thank you for the explanation. I saw the code you changed has been created for Android 10. The same file is already available for the Android 13 release. Have you even tried it for this Android version?

              I think I'll try to buy another Android phone for testing. So I'm not afraid about installing files somebody else changed. Is your compiled magisk module also available on github?

              Concerning your questions about Windows 11. In my settings app there is an option "Smooth picture and text edges" (I just translated this from german, I don't know if it's named the same if you're using the US version of Windows). For me it looks like it disables all edge smoothing in Microsoft apps. In some apps distributed by other companies it's not working at all, but in the most cases it's fine for me.

                eloff66

                Android 10 was the first successful version I made, I just happened to have saved the link to the Android 10 version of the file. I've since made versions for Android 11 12 and 13. That file, libhwui/paintimpl.cpp, has hardly changed throughout that time, although the code around it that it gets linked to during the compilation process may have so you must only install the version of my module designed for the Android version on your phone.

                They are not currently available for download because I only made them for my own use and they will only work on a limited subset of Android phones. Install them on an incompatible phone and you will get boot failure or bootloop and there is no hard and fast rule about which phones they will work on.

                Essentially, I compiled them from standard or 'stock' Google Android source code from AOSP (Android Open Source Project) using the standard tool chain. So long as the Android code on your phone was also compiled from this same source, the modules will work fine but it happens to be the case that many smartphone makers make modifications to the underlying Android system which mean their code is no longer compatible with AOSP and my modules will not work on those phones. I found this out with the first phone I tried this on, a Redmi Note 8: after installing my module the phone would not boot up. This was only fixed by replacing the MIUI stock ROM with an AOSP-based custom ROM.

                So which phones will my modules work on? Impossible to say with confidence but the more highly modified the Android system is from stock or standard Android (as found on Google Pixel phones) the less likely they are to work. Definitely not on MIUI (Xiaomi/Poco/Redmi) and probably not on others will highly modified Android systems. Your best bets would be Google Pixel, Motorola, Sony, possibly some Oneplus phones but they now use a more heavily modified OS derived from Realme phones so proceed with caution. Alternatively you try a phone for which there is a Custom ROM available. Those are almost certainly all compatible.

                If you want to try my module, let me know which version of Android you want it for and I will put it up on my Github for you to download. Before you install it, make sure you know how to remove a Magisk module that is causing boot failure or bootloop so you can restore your phone if the module is incompatible with the software on it.

                  George357

                  Ok after reading this I think it would be the easiest way to choose a custom rom to get more flexibility for the installation.
                  I just bought a Galaxy S10 on eBay. I'd bet the Samsung system won't work with your modified code. So I'll install LineageOS on the device (that's the reason I decided for the S10, there's a build of LineageOS available for it).

                  I hope it'll be delivered this week and I can install LineageOS next week. I'd ask then again because of the changes that has to be made. Already many thanks for the detailed explanation you gave 🙂

                  Markus They are not listing anywhere for download at the moment. I don't mind sharing them but, if you've read my other posts you'll be aware that they are not compatible with all Android phones. Install one on an incompatible phone and you may get boot failure or bootloop. It would be a bit irresponsible to make them available for anyone to download without explaining the risks so before I put them on my Github I'm going to have to create a README so anyone who downloads one knows in what circumstances they are likely to work and what the risks of installing one are. Give me a few days to come up with something. I'll post another reply here when done.

                  dev