HOWTO install infinality font-settings for Debian

Share your own howto's etc. Not for support questions!

Re: HOWTO install infinality font-settings for Debian

Postby bester69 » 2017-01-17 01:35

joefso wrote:can someone updated the infinality packages for stretch? I do not know how to do it myself.srry


Im using older version Infinallity-jessie version in Streetch+KDE 5,
fontconfig-infinality_1-2_all.deb
freetype-infinality_2.4.12-1_all.deb
libfreetype-infinality6_2.4.12-1_amd64.deb

they're easyier to manage and in my case seems to work better than new ones, i dont like newer version :? It has a extrange configurattion/setting
User avatar
bester69
 
Posts: 813
Joined: 2015-04-02 13:15

Re: HOWTO install infinality font-settings for Debian

Postby jim_p » 2017-01-18 07:13

As it seems, there won't be any infinality patches for freetype 2.7+, so I guess this is the end of the road for infinality or it will be when freetype 2.7+ enters the debian repos...

https://github.com/bohoomil/fontconfig- ... issues/171

Any suggestions on what we do next? I did try the freetype 2.7 packages that bubuxp provides from his google drive on a fresh installation, but, as I mailed him, plain freetype is still no match to infinality...
For the record, I am using ms fonts (verdana 10 on the apps and andale mono 12 on the terminal) and numix as my gtk theme, so I have the "white fonts on dark background" experience, which is really really bad on plain freetype.
jim_p
 
Posts: 21
Joined: 2008-02-07 14:07

Re: HOWTO install infinality font-settings for Debian

Postby joefso » 2017-01-18 08:37

There are infinality freetype 2.7 debs but for ubuntu https://launchpad.net/~no1wantdthisname ... ter=xenial . I read that not all infinality patches went into 2.7, hence these builds. I think this guy used fedora infinality patches. Not sure though. Perhaps rebuilding for Debian is an idea?

Looking into this myself ATM.

The replies so far have been of help so thank you all for that.
joefso
 
Posts: 11
Joined: 2006-06-26 10:19

Re: HOWTO install infinality font-settings for Debian

Postby BubuXP » 2017-01-18 09:35

A couple quote from here:
cryzed wrote:Since the future of the infinality-bundle is uncertain this is a good time as any to bite the bullet and remove it completely from your system until more is known. The font rendering won't be exactly the same, but with a few tweaks it will at least be similar.

stevenbenner wrote:I'll miss Infinality, it was easy to set up and looked great. The standard font rendering simply isn't as good. But it was always a hack, so I knew this day would come. Hopefully we can look forward to some new guides and tools to improve font rendering

In my GDrive there are now latest versions of FreeType [2.7.1], Harfbuzz [1.4.1] and Fontconfig (all vanilla of course). You should install both FT and HB, as they got new features (interdependece, this build of HB depends on FT >=2.7.1).


jim_p wrote:As it seems, there won't be any infinality patches for freetype 2.7+, so I guess this is the end of the road for infinality or it will be when freetype 2.7+ enters the debian repos...
https://github.com/bohoomil/fontconfig- ... issues/171

Debian is now in freeze state, I suppose there will not be new versions of FreeType until Stretch will be officially released (maybe 6 months).

jim_p wrote:Any suggestions on what we do next? I did try the freetype 2.7 packages that bubuxp provides from his google drive on a fresh installation, but, as I mailed him, plain freetype is still no match to infinality...
For the record, I am using ms fonts (verdana 10 on the apps and andale mono 12 on the terminal) and numix as my gtk theme, so I have the "white fonts on dark background" experience, which is really really bad on plain freetype.

You could try installing the latest vanilla FT, HB and FC and then install the fontconfig-infinality package.
Or, without fontconfig-infinality, add the following code to your ~/.config/fontconfig/fonts.conf, adding other settings and changing them to make Verdana font looks better:
Code: Select all
  <!-- Verdana -->
  <match target="font">
    <test name="family">
      <string>Verdana</string>
    </test>
    <edit name="hintstyle">
      <const>hintslight</const>
    </edit>
    <edit name="autohint">
      <bool>false</bool>
    </edit>
  </match>

Because some fonts looks better with hintfull, others with hintslight, some of them with autohint enabled, some others with a legacy lcdfilter, etc.
I suggest also to use a recent version of Verdana and other MS fonts (from Win10), as they got better rendering instruction than the mscorefonts installed in Debian/Ubuntu, that are ~15 years old (I made a package with those new fonts, you can find it in my GDrive).


joefso wrote:There are infinality freetypr 2.7 debs but for ubuntu https://launchpad.net/~no1wantdthisname ... ubuntu/ppa . I read that not all infinality patches went into 2.7. perhaps rebuilding for Debian is an idea?

I could recompile easily, but 2.7+ introduces many changes in the rendering code and, while Infinality is essentially a hack, adapting it to the new code without knowing what you're really doing could lead to unexpected results (bohoomil itself didn't know how Infinality code works, only the original Infinality developer really knew what his code do in details). So, re-read the two comments on top of this post and if you still want to stay with Infinality, keep the FT 2.6.3 version (in the meantime, FreeType default rendering could improve further).

For everyone considering to return to vanilla rendering I can help as much as I can (it depends on my real job duties) searching for your ideal fontconfig configuration (the page linked at the beginning of this post could be helpful, even if referred to ArchLinux).
User avatar
BubuXP
 
Posts: 29
Joined: 2014-10-27 00:41
Location: Oriental Sicily

Re: HOWTO install infinality font-settings for Debian

Postby DebbyIan » 2017-01-18 15:44

After resisting much hankering I decided to take the plunge and upgrade from Jessie to Stretch. It was too much holding back until the official release date. I couldn't hold it any longer. These font package updates certainly give sharper results on both Jessie and Stretch. In order to install on Jessie however beware that there is a hack involved of installing libpng16-16_1.6.28-1_amd64.deb which is a package which only exists in the Stretch and newer repositories. NB. The harfbuzz (HB) packages won't install on Jessie.
DebbyIan
 
Posts: 106
Joined: 2013-05-09 12:12

Re: HOWTO install infinality font-settings for Debian

Postby BubuXP » 2017-02-06 13:30

I just uploaded a new FreeType vanilla subversion (no Infinality, but partially related).
In this I enabled the possiblity to choose between the v35, v38 and v40 TrueType interpreter modes.
Read here if you don't know what that means (v38 is a lite version of Infinality built in the standard library):
https://www.freetype.org/freetype2/docs ... nting.html

You can choose also between the legacy CFF engine and the new Adobe CFF engine.

To change those parameters and others not directly listed, look at the new config file /etc/X11/Xsession.d/99freetype

The defaults values are "v40" TT interpreter and "Adobe" CFF engine (upstream defaults also).
You can try the "v38" TT interpreter to get an Infinality-like rendering.

More info on other changeable parameters as soon as I can study them.

You can get the compiled debs and sources of the new FreeType version from here.
For a better result I suggest to use also the new HarfBuzz version from here.
And if possible, use also the Fontconfig version from here.


EDIT:
I compared some v38 screenshots with some v40 ones and I cannot find any difference. There could be something wrong in my deb package or v38 and v40 look essentially the same. I'm investigating.


EDIT2:
Setting the old v35 interpreter I can see differences in rendering compared to v40, but only if using "hintfull" (rendering with "hintslight" looks the same).
Comparing the v38 interpreter with the v40 I cannot see any difference, both when using "hintfull" or "hintslight".

v40 is described as a simplified, speedy version of v38. v38 was never used by default in FreeType because of its slowness.
The v38 rendering could be changed by modifying some parameters, like Infinality does. But I don't know if those parameters could be changed via environment variables (like Infinality does) or only by changing the source code and recompiling (I can't find any information about this aspect, I should probably dive into the source code to find an answer).
The v40 interpreter has been simplified by removing the possibility to change the parameters and setting them to default values that should be good for all fonts.
FreeType developers wrote:The existing code base in FreeType (the `Infinality code') was stripped to the bare minimum and all configurability removed in the name of speed and simplicity. The configurability was mainly aimed at legacy fonts like Arial, Times New Roman, or Courier. [Legacy fonts are fonts that modify vertical stems to achieve clean black-and-white bitmaps.] The new mode focuses on applying a minimal set of rules to all fonts indiscriminately so that modern and web fonts render well while legacy fonts render okay.

I will search if it's possible to change v38 rendering parameters and how to do it.
User avatar
BubuXP
 
Posts: 29
Joined: 2014-10-27 00:41
Location: Oriental Sicily

Re: HOWTO install infinality font-settings for Debian

Postby jim_p » 2017-02-26 19:38

I checked your gdrive infinality folder* today and I noticed there is a recent build of libfreetype6 there, but on the same version I already have (2.6.3-infinality5).. I also noticed thare are no infinality patched versions of libcairo-gobject2 and libcairo2. And I also read the new instructions, where it mentions the usual infinality guidelines.

So what shall I do now? Do I update libfreetype6 only? Do I update it and remove the other 2 by replacing them with their versions in the repo? Do I keep what I already have?

* https://drive.google.com/drive/folders/ ... 2FpLWhPTkk
jim_p
 
Posts: 21
Joined: 2008-02-07 14:07

Re: HOWTO install infinality font-settings for Debian

Postby BubuXP » 2017-03-03 10:12

As the Infinality project is almost dead, I don't maintain those packages anymore and I suggest people to stay with vanilla FreeType, that has improved much in the last versions.

There are no new version, I simply recompiled the same source code, it's only a binary update (I should have appended a "+b1" to the version of the packages).
I also removed the libcairo packages, because they were optional and there is a new version now in testing, so better remove my modified libcairo packages if you have them still installed, and use the Debian vanilla packages.
User avatar
BubuXP
 
Posts: 29
Joined: 2014-10-27 00:41
Location: Oriental Sicily

Re: HOWTO install infinality font-settings for Debian

Postby jim_p » 2017-03-06 14:21

Thanks. I upgraded to the most recent freeetype infinality patched package and replaced the infinality patched cairo ones with the originals in the repo. So far so good.

It is sad to see a project like infinality die because it is the only of its kind. I will stay with it as long as freetype 2.6 is in the repos. When 2.7 moves in there, I will make an appointment with my eye doctor, probably get new glasses, and then upgrade.
jim_p
 
Posts: 21
Joined: 2008-02-07 14:07

Re: HOWTO install infinality font-settings for Debian

Postby jim_p » 2017-03-09 14:59

I looked at my panel's clock a few moments ago and I realised it's numbers seemed a bit slim...
I found an old screenshot from early December 2016, like 3 months ago, when all the infinality patched packages were installed and it seems the letters were not only thicker, but better looking. Could it be because of the removal of the 2 libcairo infinality patched packages? I do not see any major difference anywhere else.

The panel is fbpanel, the gtk theme is numix and the font is verdana 10 and no change has been made to this setup for 2+ years. In fact, numix has been my gtk theme for the last 2-3 years, fbpanel is my panel since late 2011 and verdana 10 is what I use since I first started with linux, back in December 2006. Even the font on the conky above has stayed the same since 2008!

http://imgur.com/a/EwoBP
Last edited by jim_p on 2017-03-11 16:50, edited 1 time in total.
jim_p
 
Posts: 21
Joined: 2008-02-07 14:07

Re: HOWTO install infinality font-settings for Debian

Postby DebbyIan » 2017-03-09 16:17

To me that looks like Slight versus Full Hinting of the DejaVu/Vera/Verdana face. A settings question.
DebbyIan
 
Posts: 106
Joined: 2013-05-09 12:12

Re: HOWTO install infinality font-settings for Debian

Postby jim_p » 2017-03-11 16:49

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.
jim_p
 
Posts: 21
Joined: 2008-02-07 14:07

Re: HOWTO install infinality font-settings for Debian

Postby DebbyIan » 2017-03-11 19:05

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>
DebbyIan
 
Posts: 106
Joined: 2013-05-09 12:12

Re: HOWTO install infinality font-settings for Debian

Postby jim_p » 2017-03-12 05:51

I have neither of the two. In fact, I don't even have the ~/.config/fontconfig folder :P
jim_p
 
Posts: 21
Joined: 2008-02-07 14:07

Re: HOWTO install infinality font-settings for Debian

Postby BubuXP » 2017-03-12 13:32

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
BubuXP
 
Posts: 29
Joined: 2014-10-27 00:41
Location: Oriental Sicily

PreviousNext

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable