Re: Fw: How to have sharp fonts?
>> * Usually pure greyscale (pixel) antialasing is way better for >> me, but it also depends on whether the background is dark or >> light and whether the rendering library applies the right >> gamma correction for that > > Since many/most text setting libraries don't take this into > account... This is exactly the problem with Linux unfortunately. Look at the zebra patterns on this page: https://freetype.org/freetype2/docs/rasterinfo/rasterinfo.html They are not bard-on-light or light-on-dark. They are zebras which need to be rendered evenly without moire or color fringes. Windows lately does very good job; Linux desktops suck though. Then people bend over backwards trying to compensate for that. Instead, gamma correction should be one of the text settings.
Re: Fw: How to have sharp fonts?
> * Usually pure greyscale (pixel) antialasing is way better for > me, but it also depends on whether the background is dark or > light and whether the rendering library applies the right > gamma correction for that Since many/most text setting libraries don't take this into account, I would suggest experimenting with both black-on-light and light-on-back terminal etc. text color schemes. > * For me it is much better to turn off antialiasing entirely and > rely on the autohinter (for PS fonts) or hints to get sharp > shapes in black-white mode. This depends critically on finding > well-hinted fonts and on the screen resolution. I use these 'xrdb' settings for a 4k/QHCD 27in screen: Xft.dpi: 160 Xft.antialias: false Xft.rgba: none Xft.lcdfilter: lcddefault Xft.hinting: true Xft.autohint: false Xft.hintstyle: hintfull Similar settings for 'dconf': [org/gnome/settings-daemon/plugins/xsettings] hinting='full' rgba-order ='rgb' antialiasing ='none' Similar settings for 'gsettings': OGS='org.gnome.settings-daemon' gsettings set "$OGS".plugins.xsettings hinting'full' gsettings set "$OGS".plugins.xsettings rgba-order 'rgb' gsettings set "$OGS".plugins.xsettings antialiasing 'none' Similar settings for '~/.config/fontconfig/fonts.conf' or the global '/etc/fonts/local.conf' (most distributions will have under '/etc/fonts/conf.avail/' or similar some equivalent ready-made configuration files): 10 7 7 8 8 false true false hintfull none 2 > People with low vision [...] That's a bit of different topic from high-contrast rendering, where "fuzzy" glyphs tire even people with good vision. For low-vision cases a careful choice of simple sans-serif typefaces and bigger point sizes usually helps more; also in many cases using low-dioptre reading glasses. The "Tyresias" typeface seems designed for low-vision users, but I think that Ubuntu and DejaVu "sans" also would be good. > Perhaps somebody can recommend a monitor that actually gets > above 100dpi? [...] Any UHD/4k/3840x2160 27in monitor, some of which are fairly cheap, and there are even UHD/4k/3840x2160 24-25in monitors that get above 200DPI. Any UHD/4k/3840x2160 32in (or QHD/2K/2560x1440 24in) monitor is also above 100DPI, but not by as much. > Font creators and packagers no longer take into account users > of non-antialised fonts, and the fonts are getting worse in > this regard.. For example "fonts-liberation2" are much worse > than the older "fonts-liberation" when it comes to > non-antialiasing, Adding "hints" to TTF fonts so they work well on low DPI monitors is time consuming, and the FT TTF auto-hinter does not seem to work as well as the FT PS1 one, probably because the PS1 font format seems designed to work well with an auto-hinter. In some of the links I gave before there are lists of well hinted monitor fonts, of which I think the best are the Ubuntu and DejaVu ones among "freeware" fonts. There are also the Microsoft "gratisware" TTF Web Fonts. There are also well hinted Google Noto TTF fonts. Many commercial TTF fonts tend to be well-hinted too. The classic URW PS1 fonts work well too (with the PS1 autohinter). The TeX LM PS1 fonts also work well, but they are not that popular. Some people will find the classic Adobe "base" 14 and 35 fonts PS1 fonts.
Re: Fw: How to have sharp fonts?
>> I have problem with all linux distros about fonts generally, >> fonts are very smooth or fuzzy and it hurts my eyes when i >> read more of the texts , [...] any patches to improve the >> fonts to be like windows, very sharp Since Windows is your gold standard, this is their tunable settings: https://learn.microsoft.com/en-us/dotnet/desktop/wpf/advanced/cleartype-registry-settings There is a gamma level in those settings. What you call "fuzzy" is removed by gamma correction. The thing is that this is beyond FreeType scope. It should be done by your desktop manager (Gnome, KDE, Xfce) or your browser, or PDF reader. I would like to redirect your complaint up those avenues directly asking them if they do gamma correction. Meanwhile, try ftview or ftstring from freetype-demos that your distribution likely packages. You can explore different gamma levels and hinting algorithms offered by FreeType. Again, ftview will show you what is achievable with FreeType with proper gamma correction implemented separately in the demos. Best. Alexei
Re: Fw: How to have sharp fonts?
>> I have problem with all linux distros about fonts generally, >> fonts are very smooth or fuzzy and it hurts my eyes when i >> read more of the texts , [...] any patches to improve the >> fonts to be like windows, very sharp No need for patches. > Can someone help this guy, please? I am the right person here. I have the same problem but I don't think that MS-Windows is "very sharp" either. So the issue has several layers: * Color (subpixels) antialiasing may be enabled, which for me gives a bit too much "fringing"/"fuzzyness" in both GNU/Linux and MS-Windows. * Usually pure greyscale (pixel) antialasing is way better for me, but it also depends on whether the background is dark or light and whether the rendering library applies the right gamma correction for that (thanks to Werner for mentioning this some time ago). * For me it is much better to turn off antialiasing entirely and rely on the autohinter (for PS fonts) or hints to get sharp shapes in black-white mode. This depends critically on finding well-hinted fonts and on the screen resolution. * It is usually fairly important to set the screen resolution right "optically" (that is taking into account viewing distance. * Displays with a linear resolution higher than 100DPI help a lot. 27in 4k displays have nearlu 200DPI. The parameters related to the above are not part of FreeType but come in several additional layers depending on rendering and GUI framework. The desperate user should let us know the type of screen, the viewing distance, the type of fonts he prefers, and the GUI environment. In the meantime they can have a look at several articles and blog posts on the subject that I have written (one of my pet topics obviously): - http://www.sabi.co.uk/Notes/linuxFonts.html - http://www.sabi.co.uk/Cfg/Fontconfig/ - http://www.sabi.co.uk/blog/22-one.html?220305#220305 - https://www.sabi.co.uk/blog/14-one.html?140228#140228 Also: - http://www.sabi.co.uk/blog/12-two.html#120225 - http://www.sabi.co.uk/blog/12-two.html#120206 - http://www.sabi.co.uk/blog/anno06-2nd.html#060509
Re: Fw: How to have sharp fonts?
great response, I've been on this path for a while as well. People with low vision have an argument that Linux fonts are generally worse, by default, than ios/android/windows counterparts. In most cases it's the increased dpi/density that helps offset the blurry fonts. Perhaps somebody can recommend a monitor that actually gets above 100dpi? I take a hybrid approach, and disable antialiasing for "small" fonts, and start antialiasing at about 17 points or higher. This is extraordinarily difficult on most linux desktops, on all apps. ~/.config/fontconfig/fonts.conf should have something like this, 17 false Mozilla apps like firefox and thunderbird will ignore this, so consider their own configuration options: browser.display.auto_quality_min_font_size 14 gfx.text.disable-aa false Chrome/Brave seem to use their own rendering engine, which is better, but they do try to honor the above fontconfig values. In addition, linux uses flatpacks/snaps and increasingly different packaging/containers, which happily ignores your settings, and uses their own fonts making the problem even worse. Font creators and packagers no longer take into account users of non-antialised fonts, and the fonts are getting worse in this regard.. For example "fonts-liberation2" are much worse than the older "fonts-liberation" when it comes to non-antialiasing, so we have to remove the assuming fonts that render poorly with antialiasing diabled. I'm happy with my font situation now on ubuntu 22.04, but it took several full-time days to get it this way spread over months. in my experience, -edfardos On 2/27/23 08:22, Peter Grandi wrote: I have problem with all linux distros about fonts generally, fonts are very smooth or fuzzy and it hurts my eyes when i read more of the texts , [...] any patches to improve the fonts to be like windows, very sharp No need for patches. Can someone help this guy, please? I am the right person here. I have the same problem but I don't think that MS-Windows is "very sharp" either. So the issue has several layers: * Color (subpixels) antialiasing may be enabled, which for me gives a bit too much "fringing"/"fuzzyness" in both GNU/Linux and MS-Windows. * Usually pure greyscale (pixel) antialasing is way better for me, but it also depends on whether the background is dark or light and whether the rendering library applies the right gamma correction for that (thanks to Werner for mentioning this some time ago). * For me it is much better to turn off antialiasing entirely and rely on the autohinter (for PS fonts) or hints to get sharp shapes in black-white mode. This depends critically on finding well-hinted fonts and on the screen resolution. * It is usually fairly important to set the screen resolution right "optically" (that is taking into account viewing distance. * Displays with a linear resolution higher than 100DPI help a lot. 27in 4k displays have nearlu 200DPI. The parameters related to the above are not part of FreeType but come in several additional layers depending on rendering and GUI framework. The desperate user should let us know the type of screen, the viewing distance, the type of fonts he prefers, and the GUI environment. In the meantime they can have a look at several articles and blog posts on the subject that I have written (one of my pet topics obviously): -http://www.sabi.co.uk/Notes/linuxFonts.html -http://www.sabi.co.uk/Cfg/Fontconfig/ -http://www.sabi.co.uk/blog/22-one.html?220305#220305 -https://www.sabi.co.uk/blog/14-one.html?140228#140228 Also: -http://www.sabi.co.uk/blog/12-two.html#120225 -http://www.sabi.co.uk/blog/12-two.html#120206 -http://www.sabi.co.uk/blog/anno06-2nd.html#060509