Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

HOWTO install infinality font-settings for Debian

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Message
Author
DebbyIan
Posts: 158
Joined: 2013-05-09 12:12

Re: HOWTO install infinality font-settings for Debian

#101 Post by DebbyIan »

To me that looks like Slight versus Full Hinting of the DejaVu/Vera/Verdana face. A settings question.

jim_p
Posts: 28
Joined: 2008-02-07 14:07
Been thanked: 1 time

Re: HOWTO install infinality font-settings for Debian

#102 Post by jim_p »

Actually, I have not changed such setting. Does the infinality package enforce one? This is what my "xrdb -query" reports

Code: Select all

$ xrdb -query
*customization:	-color
Xft.antialias:	1
Xft.autohint:	0
Xft.dpi:	96
Xft.hinting:	1
Xft.hintstyle:	hintfull
Xft.lcdfilter:	lcddefault
Xft.rgba:	rgb
So it is set on full hinting. The problem is I can't change the setting somehow. I do not use a full desktop enviroment, just plain openbox, and lxappearance's settings on the font stuff have no effect on standalone window managers (upstream bug). I do not use fonts.conf or anything similar.

DebbyIan
Posts: 158
Joined: 2013-05-09 12:12

Re: HOWTO install infinality font-settings for Debian

#103 Post by DebbyIan »

lxappearance won't do anything for you.

There are two files in which you have apply the settings. They are ~/.Xresources and ~/.config/fontconfig/fonts.conf.

The former is for native X11 apps and the latter for toolkit-like apps (GTK and such).

Code: Select all

! ~/.XResources
! Xft settings ---------------------------------------------------------
Xft.autohint: 0
Xft.antialias: 1
Xft.hinting: 1
Xft.hintstyle: hintfull
Xft.dpi: 136
Xft.rgba: rgb
Xft.lcdfilter: lcddefault
and your local fonts.conf

Code: Select all

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <match target="pattern">

<!-- Font rasterization converts vector font data to bitmap data so that it
     can be displayed. The result can appear jagged due to aliasing.
     Anti-aliasing increases the apparent resolution of font edges. -->
        <edit mode="append" name="antialias">
            <bool>true</bool>
        </edit>

<!-- Using normal hinting, TrueType hinting instructions in the font are
     interpreted by freetype's Byte-Code Interpreter. This works best for
     fonts with good hinting instructions. -->
        <edit mode="append" name="hinting">
            <bool>true</bool>
        </edit>

<!-- Auto-discovery for hinting. This looks worse than normal hinting for
     fonts with good instructions, but better for those with poor or no
     instructions. The autohinter and subpixel rendering are not designed
     to work together and should not be used in combination. -->
        <edit mode="append" name="autohint">
            <bool>false</bool>
        </edit>

<!-- Hint style is the amount of influence the hinting mode has. Hinting
     can be set to: "hintfull", "hintmedium", "hintslight" and "hintnone".
     With BCI hinting, "hintfull" should work best for most fonts.
     With the autohinter, "hintslight" is recommended. -->
        <edit mode="append" name="hintstyle">
            <const>hintfull</const>
        </edit>

<!-- Subpixel rendering effectively triples the horizontal (or vertical)
     resolution for fonts by making use of subpixels. The autohinter and
     subpixel rendering are not designed to work together and should not
     be used in combination. Most monitors manufactured today use the
     Red, Green, Blue (RGB) specification. Fontconfig will need to know
     your monitor type to be able to display your fonts correctly.
     Values are "rgb" (most common), "bgr", "vrgb" (vertical), "vbgr",
     "unknown" or "none". -->
        <edit mode="append" name="rgba">
            <const>rgb</const>
        </edit>

<!-- When using subpixel rendering, you should enable the LCD filter,
     which is designed to reduce colour fringing. The "lcddefault" filter
     will work for most users. Other filters are available that can be
     used in special situations: "lcdlight"; a lighter filter ideal for
     fonts that look too bold or fuzzy; "lcdlegacy", the original Cairo
     filter; "lcdnone" to disable it entirely. -->
        <edit mode="append" name="lcdfilter">
            <const>lcddefault</const>
        </edit>

	 Fontconfig should be able to detect DPI parameters as discovered
     by the Xorg server. You can check Xorg's automatically discovered
     DPI with the command 'xdpyinfo | grep resolution'
     Uncomment the following to activate customized DPI

        <edit mode="append" name="dpi">
            <double>136</double>
        </edit>

<!-- Some scalable fonts have embedded bitmap versions which are rendered
     instead, mainly at smaller sizes. Force using scalable fonts at all
     sizes by disabling embedded bitmap. -->
        <edit mode="append" name="embeddedbitmap">
            <bool>true</bool>
        </edit>
<!--
	<test qual="any" name="size" compare="less">
		<double>7</double>
	</test>
	<edit name="antialias" mode="assign">
		<bool>false</bool>
	</edit>

	<test qual="any" name="pixelsize" compare="less">
		<double>12</double>
	</test>
	<edit name="antialias" mode="assign">
		<bool>false</bool>
	</edit>
-->        
</match>

jim_p
Posts: 28
Joined: 2008-02-07 14:07
Been thanked: 1 time

Re: HOWTO install infinality font-settings for Debian

#104 Post by jim_p »

I have neither of the two. In fact, I don't even have the ~/.config/fontconfig folder :P

User avatar
BubuXP
Posts: 29
Joined: 2014-10-27 00:41
Location: Oriental Sicily

Re: HOWTO install infinality font-settings for Debian

#105 Post by BubuXP »

Create only the ~/.Xresources file like the one DebbyIan posted and change the "hintfull" with "hintslight" if you prefer it.
And remove also the DPI line.

User avatar
squeeze
Posts: 299
Joined: 2010-06-14 23:16
Location: thimbleweedpark

Re: HOWTO install infinality font-settings for Debian

#106 Post by squeeze »

“Have you tried turning it off and on again?”

DebbyIan
Posts: 158
Joined: 2013-05-09 12:12

Re: HOWTO install infinality font-settings for Debian

#107 Post by DebbyIan »

It's in the Experiment/RC repo. I compiled this and the fontconfig package independently and they seem stable as hell to me.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: HOWTO install infinality font-settings for Debian

#108 Post by stevepusser »

As another data point, we released the Jessie-based MX 16 Linux with libfreetype6 2.7 and the modified fontconfig from this thread, and there have been zero problems with it.

I'll have to check to see how Debian configured their build, though.
MX Linux packager and developer

jim_p
Posts: 28
Joined: 2008-02-07 14:07
Been thanked: 1 time

Re: HOWTO install infinality font-settings for Debian

#109 Post by jim_p »

So, I was browsing aur earlier, and I came across these

https://aur.archlinux.org/packages/free ... nfinality/
https://aur.archlinux.org/packages/free ... -ultimate/

I see some patches there. Does it mean we can have infinality back with freetype 2.7.x?

DebbyIan
Posts: 158
Joined: 2013-05-09 12:12

Re: HOWTO install infinality font-settings for Debian

#110 Post by DebbyIan »

A generic question if I could pick on some of the knowledge and experiences here. With sub-pixel rgb rendering, ought to one be tripling the overall dpi resolution as well? The Xft.dpi value for Xorg.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: HOWTO install infinality font-settings for Debian

#111 Post by debiman »

DebbyIan wrote:A generic question if I could pick on some of the knowledge and experiences here. With sub-pixel rgb rendering, ought to one be tripling the overall dpi resolution as well? The Xft.dpi value for Xorg.
i think you will notice the difference (HUGE fonts) so why not just try it?

DebbyIan
Posts: 158
Joined: 2013-05-09 12:12

Re: HOWTO install infinality font-settings for Debian

#112 Post by DebbyIan »

I did but then you decrease the font size. But is tripling the dpi resolution the right thing to do? Whichever way you look at it scalable fonts never seem as sharp as bitmap fonts. There's always the overhanging issue of blurring and/or color fringing. Another issue is the way glyphs fade from their stem to a light gray at certain regions.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: HOWTO install infinality font-settings for Debian

#113 Post by debiman »

^ depends on screen resolution.
also some of the inifinality settings have now been taken over to the "normal" freetype packages, but it seems they still need some manual configging. i know at least the color fringing can be tweaked away almost compltely.

jim_p
Posts: 28
Joined: 2008-02-07 14:07
Been thanked: 1 time

Re: HOWTO install infinality font-settings for Debian

#114 Post by jim_p »

So... freetype 2.8 is out and here are its changes. Can someone explain in plain words what should we expect? Will font rendering reach (at least) cleartype levels?

http://phoronix.com/scan.php?page=news_ ... 8-Released

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: HOWTO install infinality font-settings for Debian

#115 Post by debiman »

^ not sure why you want to link a phoronic article.
freetype documentation is here:
https://sourceforge.net/projects/freety ... -docs/2.8/

anyhow i agree that it isn't so easy to find comprehensible advice on how to make fonts look good on linux desktops.

maybe archwiki is, once again, the best resource?

i don't know, one of these days i will have to read up on it myself. i think there's room for improvement for how fonts are rendered on my system.

jim_p
Posts: 28
Joined: 2008-02-07 14:07
Been thanked: 1 time

Re: HOWTO install infinality font-settings for Debian

#116 Post by jim_p »

The article on phoronix.com has some useful (and simple) info on the subject, while the files on sourceforge.net are just the sources to build the documentation of freetype and they do not even contain a changelog or something similar.

User avatar
BubuXP
Posts: 29
Joined: 2014-10-27 00:41
Location: Oriental Sicily

Re: HOWTO install infinality font-settings for Debian

#117 Post by BubuXP »

I compiled last vanilla FreeType release, I didn't test the appearance of fonts very well, but I found with slight hinting a little improvement (maybe with full hinting it is better).
Also, last version of HarfBuzz is present.
Changelog: https://sourceforge.net/projects/freety ... type2/2.8/

msimsek
Posts: 2
Joined: 2017-05-12 11:52

Re: HOWTO install infinality font-settings for Debian

#118 Post by msimsek »

I found 2.8 with medium hinting and lcd-default offers the best font rendering I have seen so far. Fontconfig is from Experimental. I enabled FT_CONFIG_OPTION_SUBPIXEL_RENDERING and used Infinality style.

Here is how it looks: https://i.hizliresim.com/ldn3Ap.png

Building was easy. Just use checkinstall and create a dummy package for libfreetype6-dev. Packages are here if you want to use them: https://ufile.io/0mekx But you should build them yourself, there is no reason to trust me.

DebbyIan
Posts: 158
Joined: 2013-05-09 12:12

Re: HOWTO install infinality font-settings for Debian

#119 Post by DebbyIan »

dsc:

https://github.com/doa379/libfreetype6-2.8-

Settings could be tweaked to one's wit end. But if the fonts aren't well hinted in the first place then there's little point in going mad with settings. I'm finding some issues with fonts in the Debian repos. I'm having to download the very same font families from fonts.google.com instead and getting marginally (marginally) better results.

jim_p
Posts: 28
Joined: 2008-02-07 14:07
Been thanked: 1 time

Re: HOWTO install infinality font-settings for Debian

#120 Post by jim_p »

Despite the fact that my last question on freetype 2.7 and infinality remains unanswered, I will make a new one.

Freetype 2.8 + infinality patches on aur. Any chance of making one for debian?
https://aur.archlinux.org/packages/free ... -ultimate/

Post Reply