# Can't turn off antialiasing in chromium



## Anatoly_kch (Nov 9, 2016)

chromium Version 52.0.2743.116 (64-bit) from pkg
on

```
FreeBSD asd2 10.2-RELEASE-p24 FreeBSD 10.2-RELEASE-p24 #0: Sat Oct 22 01:03:53 UTC 2016 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
```
Sorry if I posting it in wrong place,
recently I've somehow succefully fought same problem in Opera:
https://forums.freebsd.org/threads/58382/
Now, is there anyone who successed in that with chrome? Or just can tell on wich versions of chrome / FreeBSD it's possible?
From the one side I found this: http://blog.lazyhacker.com/2014/03/disabling-anti-aliasing-on-chrome.html. But this extension doesn't work for me.
From other side, I see chrome is linked against libfonconfig (that was troblesome with Opera). However, all other apps (except opera and chrome) follow antialias settings in /usr/local/etc/fonts/. Should I dig into buggy libfontconfig or into chrome?.. Any help appreciated...


----------



## drhowarddrfine (Nov 9, 2016)

I can't look for sure right now but check chrome://flags and search for "antialising".


----------



## Anatoly_kch (Nov 10, 2016)

I can see only that here:

```
LCD text antialiasing Mac, Windows, Linux, Chrome OS
If disabled, text is rendered with grayscale antialiasing instead of LCD (subpixel) when doing accelerated compositing. #lcd-text-aa
```
Yet grayscale antialiasing is what I already have, and what I want is turn it off entirely (B/W). Or I've overlooked something else here?


----------



## cpm@ (Nov 10, 2016)

Anatoly_kch said:


> Now, is there anyone who successed in that with chrome? Or just can tell on which versions of chrome/FreeBSD it's possible?
> From the one side I found this: http://blog.lazyhacker.com/2014/03/disabling-anti-aliasing-on-chrome.html. But this extension doesn't work for me.



Have you read it?
https://github.com/lazyhacker/chromecss/issues/3#issuecomment-212379053


----------



## Anatoly_kch (Nov 11, 2016)

This plugin doesn't produce errors on normal web pages (http://). It just didn't change anything. I see plugin button, but it does nothing. Indeed, it produces mentioned errors when I press button on chrome special pages (chrome://extensions/, chrome://flags...), but I don't care about antialiasing them. When I tried to set  #extensions-on-chrome-urls flag as suggested, it only does yellow nag message "You are using unsupported command line flag: --extensions-on-chrome-urls. Stability and security will suffer" and this does not eliminate mentioned errors in my case.
Also, I've tried to patch libfreetype to hard lock it to never antialias, and LD_PRELOAD with chrome. Again, nothing changes. Although chrome is linked against this library, it turns out that it doesn't use this library to render page text.


----------



## cpm@ (Nov 11, 2016)

Try the Font Rendering Enhancer extension:


> Font Rendering Enhancer comes from Opera Font Rendering by thunder13. Darker and clearer text on almost every page (http and https). Modified and ported Mac OSX Font Rendering by proxxy (from Opera on Presto engine).
> 
> The windows browsers render the fonts based on the normal sub-pixel rendering without implementing Font smoothing, anti-aliasing as noticeable as Mac OSX. This tweak applies text to be displayed more anti-aliased using CSS3 property. So modern browsers supporting CSS3 and userstyle support would be able to support it.


----------



## Anatoly_kch (Nov 13, 2016)

Thank you for reply, but I've already tried this extension, despite the fact its description claim opposite of what I want. What it does - just replaces fonts with its own woffs. Also I've tried "Smooth Fonts" and some others I didn't remember now. I feel that if I want chrome without antialiasing, I must take version below 44 or dig into chrome sources, and both means I must compile chrome from source. But size of sources makes me scare. Not only compilation probably takes forever, but also may wear my swap partition into the dust... But maybe I'll try it later. If I got more time...


----------



## Deleted member 48958 (Nov 13, 2016)

You can change www/chromium font settings with /home/user/.config/fontconfig/fonts.conf:

```
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--[b]AUTOHINT[/b]--><match target="font">
<edit name="autohint" mode="assign"><bool>[b]true[/b]</bool></edit>
</match>
<!--[b]ANTIALIAS[/b]--><match target="font">
<edit name="antialias" mode="assign"><bool>[b]true[/b]</bool></edit>
</match>
<!--[b]HINTING[/b]--><match target="font">
<edit name="hinting" mode="assign"><bool>[b]true[/b]</bool></edit>
</match>
<!--[b]HINTSTYLE[/b]--><match target="font">
<edit name="hintstyle" mode="assign"><const>[b]hintnone[/b]</const></edit>
</match>
<!--[b]RGBA[/b]--><match target="font">
<edit name="rgba" mode="assign"><const>[b]rgb[/b]</const></edit>
</match>
<!--[b]LCDFILTER[/b]--><match target="font">
<edit name="lcdfilter" mode="assign"><const>[b]lcddefault[/b]</const></edit>
</match>
</fontconfig>
```

Create, if it doesn't exist. Also restart required (chrome restart, not FreeBSD  ).

May be it will change only chromium system font (interface)… I don't remember, I don't use chrome anymore.
But may be it will be helpful for someone, this config helped me to use San Francisco Font as a system font with chrome. This font only work fine with 'hintstyle' — 'hintslight' or 'hintnone' (on FreeBSD of course, not on MacOS  ), but chromium doesn't use font settings from ~/.gtkrc-2.0 or ~/.config/gtk-3.0/settings.ini, only ~/.config/fontconfig/fonts.conf .


----------



## Anatoly_kch (Nov 13, 2016)

ILUXA said:


> <!--*ANTIALIAS*--><match target="font"> <edit name="antialias" mode="assign"><bool>*true*</bool></edit> </match>


Setting this to *false* does not affect web page text. That's the problem.


----------



## cpm@ (Nov 16, 2016)

Anatoly_kch I need to investigate further the bugs reported in chromium before I try to give you a good advice 

Anyway I suggest that you read the following post:

http://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/

It covers everything you need to know about the three font smoothing modes.


----------



## Anatoly_kch (Nov 18, 2016)

I've made a picture of what I trying to achieve.





It is 8x enlarged part of screenshot of http://savannah.nongnu.org/ page. Arial font were used, but Liberation Sans or Droid Sans basically looks the same.
Btw, must say, switching hinting (in fonts.conf, fonts.conf.d) from *hintmedium* (which were my default) to *hintfull* improves mentioned fonts greatly in chromium, just like change from *hintnone* to *hintmedium* does to other freetype2-based software.
Also, you may wonder, why I care about disabling antialiasing too much. Must say I don't care about it on displays with resolution of 125 DPI or greater. Because I can't distinct single pixels by eye on such displays anyway, antialiased text looks great. So on 125 DPI display I wish to antialias everything, otherwise. But now I typing this on 86 DPI display, where my eye can see every singe pixel. And antialiased text looks blurry and make eye strain on such.


----------



## cpm@ (Nov 22, 2016)

Well, I suggest that you update chromium to 54.0.2840.100 release.

 Go to chromium and type in: chrome://flags to enable ‘LCD text antialiasing’


----------

