You are not logged in.

#1 2013-10-13 00:58:45

donuon
Member
Registered: 2013-08-28
Posts: 31

Distorted fonts

I'm having an issue with font distortion that I can't seem to find a fix for yet.  By distorted fonts I mean the characters look like corrupted pixmaps. It isn't constant, certain programs like firefox will refresh the characters if the window focus changes and the distortion is corrected. Distortion will also disappear if I highlight the text area. This also happens in emacs, where if I set a visible mark and move over the distortion it will fix the character.

I'm running xmonad, and haven't noticed the font issue showing in xmobar or any of the app menu bars. I have tried installing the infinality patchset and also created ~/.config/fontconfig/conf.d/20-no-embeded.conf with the following:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <match target="font">
    <edit name="embeddedbitmap" mode="assign">
      <bool>false</bool>
    </edit>
  </match>
</fontconfig>

I think I tried some other things that haven't worked. I started troubleshooting this about 6 weeks ago when I was setting this system up. Unfortunately life got busy and I didn't take quality notes so I'm trying to go off memory of what I've done up to this point. I hope this is enough info to get started on trying to pinpoint the issue.

Offline

#2 2013-10-13 01:03:56

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Distorted fonts

Soooo... I don't know shit really about font configuration.  But bohoomil is something of a master at it.  He provides infinality patched and configured patches in his own personal repo with signed packages and all.  Check out the infinality-bundle and infinality-bundle-fonts.  There are a couple threads in these forums about it (started by bohoomil) which provide instructions on how to set this up. <-- Hint, its super easy, and in Community Contributions.

Offline

#3 2013-10-13 01:14:05

donuon
Member
Registered: 2013-08-28
Posts: 31

Re: Distorted fonts

Sorry, I meant infinality-bundle not patchset. It was the first thing I tried, unless I misconfigured it, nothing changed.

Offline

#4 2013-10-13 01:51:28

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Distorted fonts

Which fonts do you have installed?  Do you use the windows fonts or the free fonts?  I think that with the newest package, bohoomil has added a simple script to switch between the various font families, and maybe yours is set to something you don't have.  Just a guess though.  The command is fc-presets and needs to be run as root.  So if you do fc-presets set it will give you three options.

Offline

#5 2013-10-13 02:05:12

donuon
Member
Registered: 2013-08-28
Posts: 31

Re: Distorted fonts

I have the ms fonts installed but I use free fonts as my defaults, Deja Vu Sans/Serif. In emacs I use Inconsolata. Just ran fc-presets set and selected free. It changed the menu font used by emacs but am still getting distortions in firefox.

Offline

#6 2013-10-13 02:11:28

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

Re: Distorted fonts

Did you install the free fonts as bohoomil explained in his post on setting this up? That is, make sure you have his packages installed where applicable.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#7 2013-10-13 03:10:23

donuon
Member
Registered: 2013-08-28
Posts: 31

Re: Distorted fonts

cfr, are you referring to this post? I don't see anything specific to the free fonts in the post.

Offline

#8 2013-10-13 03:22:49

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

Re: Distorted fonts

If you are upgrading: https://bbs.archlinux.org/viewtopic.php … 3#p1336233. Whether or not, see the linked post in the "sister thread" for info on installing the font packages.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#9 2013-10-13 04:05:09

donuon
Member
Registered: 2013-08-28
Posts: 31

Re: Distorted fonts

Thanks cfr, going to have to call it a night. I installed everything according to those links (sister thread incl.) I'll have to spend some time browsing tomorrow and see if any distortions still occur. First things I've noticed are changes occuring in emacs. I'm sure its just some of the replacements in a config file I need to fix. Also the menu in emacs used to be like 10pt now it seems to have grown.

Offline

#10 2013-10-13 16:23:35

donuon
Member
Registered: 2013-08-28
Posts: 31

Re: Distorted fonts

So unfortunately I'm still seeing the distortions, I'm not sure what else to try here.
Could it maybe be something related to the graphics driver? Here's the details of lspci -k

VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
	Subsystem: Acer Incorporated [ALI] Device 047f
	Kernel driver in use: i915
	Kernel modules: i915

Offline

#11 2013-10-13 22:37:33

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

Re: Distorted fonts

Does the font you are using include those characters?

Is the encoding etc. set correctly? Check this in your terminal emulator or check vconsole.conf etc.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#12 2013-10-14 08:43:32

jcristovao
Member
Registered: 2013-10-14
Posts: 10

Re: Distorted fonts

Hi,
I'm not sure this is the same problem, but...
In my case it is not so much 'distorted text', but 'non-antialiasing' on just some fonts on firefox. For example, when seeing a readme on github.
The same problem does not manifest itself on other sites, or in chromium on the same (github) pages.

A downgrade to  fontconfig-2.10.95-1 solved the problem for now, but I wonder if the new font config 2.11 added or modified some of its settings.

Offline

#13 2013-10-14 12:57:39

anthon
Member
Registered: 2013-05-13
Posts: 14

Re: Distorted fonts

jcristovao wrote:

Hi,
I'm not sure this is the same problem, but...
In my case it is not so much 'distorted text', but 'non-antialiasing' on just some fonts on firefox. For example, when seeing a readme on github.
The same problem does not manifest itself on other sites, or in chromium on the same (github) pages.

A downgrade to  fontconfig-2.10.95-1 solved the problem for now, but I wonder if the new font config 2.11 added or modified some of its settings.

It doesn't seem to be the same problem. What happened to you is that the latest fonconfig package doesn't contain the file 29-replace-bitmap-fonts.conf anymore. This bug report suggests to install tex-gyre-fonts to fix this (if I understand correctly), but it didn't work for me.
So you can either recreate the file (cf fonconfig wiki to do things properly), or append its content in ~/.config/fontconfig/fonts.conf.

Offline

#14 2013-10-14 15:58:02

donuon
Member
Registered: 2013-08-28
Posts: 31

Re: Distorted fonts

I had thought I set my encodings correctly, here is the output of localectl status

   System Locale: LANG=en_US.UTF-8
                  LC_COLLATE=C
       VC Keymap: personal
      X11 Layout: n/a

I noticed some weird behaviour within urxvt now too.
  1) The leading character no longer shows
  2) There seems to be a delay between typing and what is shown in the term
  3) When backspacing to the beginning a single character remains on screen even when it is not actually there.

The 3rd issue I've seen before and is usually an issue with the PS output. It was a problem I had months ago which I had fixed and has only reappeared now.

As far as the fonts containing characters I would assume yes since they are all just standard roman alphabet characters.

Offline

#15 2013-10-14 18:06:25

fdservices
Member
From: France
Registered: 2012-02-06
Posts: 323

Re: Distorted fonts

I have the same problem here. My helvetica font no longer renders correctly after upgrading fontconfig.

The answer is above, that is that the updated fontconfig no longer includes 29-replacement-fonts.conf. This configures font aliases for certain fonts which render better in windows.

My solution was to place the missing file in ~/.fonts.conf.d - the contents of that file, 29-replacement-fonts.conf , being

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <!-- Prefer Microsoft versions of PostScript fonts, as these typically render a lot better on-screen 
       30-metric-aliases.conf will then also add the free clones of these fonts -->
  <alias binding="same">
    <family>Helvetica</family>
    <prefer><family>Arial</family></prefer>
  </alias>
  <alias binding="same">
    <family>Times</family>
    <prefer><family>Times New Roman</family></prefer>
  </alias>
  <alias binding="same">
    <family>Courier</family>
    <prefer><family>Courier New</family></prefer>
  </alias>
</fontconfig>

And now helvetica renders correctly again.

The question is why they removed this alias and why they did not replace it with something else?


Andrew

Offline

#16 2013-10-14 20:23:34

balta2ar
Member
From: Russia, Moscow
Registered: 2010-03-23
Posts: 25
Website

Re: Distorted fonts

fdservices wrote:

The question is why they removed this alias and why they did not replace it with something else?

I'm asking the same question, bro. Well, according to this commit: "Remove bitmap font replacement, upstream handles font quality good now". I don't know... Helvetica looks like shit to me now. I know this is Linux and I can fix it but seriously WTF?

Offline

#17 2013-10-15 07:51:01

Loose_Control
Member
From: Germany
Registered: 2011-01-11
Posts: 129

Re: Distorted fonts

thanks fdservices this problem was seriously annoying >.<

Online

#18 2013-10-15 15:02:12

heftig
Developer
From: Germany
Registered: 2010-04-19
Posts: 136

Re: Distorted fonts

We used to unconditionally replace Helvetica with Arial, but that's a wrong thing to do™ (see https://bugs.archlinux.org/task/25499 ). To get a nicer display, either:

- Install tex-gyre-fonts and enable 70-no-bitmaps.conf; This uses TeX Gyre Heros, a metric-compatible Helvetica replacement

- Install tex-gyre-fonts and uninstall xorg-fonts-{75,100}dpi; This uses TeX Gyre Heros, a metric-compatible Helvetica replacement

- Install ttf-liberation and grab 29-replace-bitmap-fonts.conf from the older fontconfig package; This uses Liberation Sans, an Arial replacement, but not metric-compatible with Helvetica

Offline

#19 2013-10-15 15:08:35

aexoxea
Member
Registered: 2012-11-17
Posts: 62

Re: Distorted fonts

Many thanks to anton, FDServices and heftig for your info above; I was wondering why my rendering quality had gone down in some circumstances just in the past few days! I've noted the particular issue you mentioned on wiki at Talk:Font_Configuration for reference by others who may not see this thread (and for potential incorporation into the main article, if that is eventually warranted).

That said, it's not clear from the above whether donuon's font rendering issues have been resolved, so I will refrain from adding anything further here unless it has to do with that (and will cross my fingers that there is an explanation -- and thus a solution -- out there somewhere for him/her!).

Last edited by aexoxea (2013-10-16 07:09:39)

Offline

#20 2013-10-15 15:17:31

acrox999
Member
From: /dev/null
Registered: 2011-10-30
Posts: 6

Re: Distorted fonts

donuon wrote:

I'm having an issue with font distortion that I can't seem to find a fix for yet.  By distorted fonts I mean the characters look like corrupted pixmaps. It isn't constant, certain programs like firefox will refresh the characters if the window focus changes and the distortion is corrected. Distortion will also disappear if I highlight the text area. This also happens in emacs, where if I set a visible mark and move over the distortion it will fix the character.

I'm running xmonad, and haven't noticed the font issue showing in xmobar or any of the app menu bars. I have tried installing the infinality patchset and also created ~/.config/fontconfig/conf.d/20-no-embeded.conf with the following:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <match target="font">
    <edit name="embeddedbitmap" mode="assign">
      <bool>false</bool>
    </edit>
  </match>
</fontconfig>

I think I tried some other things that haven't worked. I started troubleshooting this about 6 weeks ago when I was setting this system up. Unfortunately life got busy and I didn't take quality notes so I'm trying to go off memory of what I've done up to this point. I hope this is enough info to get started on trying to pinpoint the issue.

I'm having the exact same problem as you. This happened right after I have infinality-bundle installed. I have everything from all bohoomil's repository installed, including his own font packages. Before I had infinality installed, my fonts weren't anti-aliased, but that's after some updates, which I forgot. I believe it's after the new fontconfig update.

- Original fontconfig breaks anti-aliasing.
- fontconfig-infinality makes some characters looks distorted, or boxed but not constant and are 'fixed' as you scroll or change focus.

Offline

#21 2013-10-15 18:04:02

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: Distorted fonts

@acrox999, a link to a valid screenshot, please?


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#22 2013-10-15 18:29:53

balta2ar
Member
From: Russia, Moscow
Registered: 2010-03-23
Posts: 25
Website

Re: Distorted fonts

heftig wrote:

We used to unconditionally replace Helvetica with Arial, but that's a wrong thing to do™ (see https://bugs.archlinux.org/task/25499 ). To get a nicer display, either:

- Install tex-gyre-fonts and enable 70-no-bitmaps.conf; This uses TeX Gyre Heros, a metric-compatible Helvetica replacement

- Install tex-gyre-fonts and uninstall xorg-fonts-{75,100}dpi; This uses TeX Gyre Heros, a metric-compatible Helvetica replacement

- Install ttf-liberation and grab 29-replace-bitmap-fonts.conf from the older fontconfig package; This uses Liberation Sans, an Arial replacement, but not metric-compatible with Helvetica

Thanks, this is very useful! Maybe add these advices to the wiki?

Offline

#23 2013-10-15 22:51:03

donuon
Member
Registered: 2013-08-28
Posts: 31

Re: Distorted fonts

Alright so the issues with the terminal were actually related to the graphics driver. Specifically, switching to UXA for the acceleration method. I haven't noticed any distorted fonts in a while either, so maybe it was related to the graphics card afterall. Still have the above issue with xemacs, but this isn't really a big deal since its only the splash page. Regular buffers use the proper fonts set by emacs.

Offline

#24 2013-10-16 02:12:38

acrox999
Member
From: /dev/null
Registered: 2011-10-30
Posts: 6

Re: Distorted fonts

bohoomil wrote:

@acrox999, a link to a valid screenshot, please?

I can't, it gets 'fixed' once I press the screenshot. I'll grab one from my phone when I can. But then again, I think it might be the radeon graphics driver. I've been having these weird artifacts ever since I switched to glamor from EXA. I'll switch to EXA later and see how it goes.

Offline

#25 2013-10-17 17:42:00

anthon
Member
Registered: 2013-05-13
Posts: 14

Re: Distorted fonts

heftig wrote:

We used to unconditionally replace Helvetica with Arial, but that's a wrong thing to do™ (see https://bugs.archlinux.org/task/25499 ). To get a nicer display, either:

- Install tex-gyre-fonts and enable 70-no-bitmaps.conf; This uses TeX Gyre Heros, a metric-compatible Helvetica replacement

- Install tex-gyre-fonts and uninstall xorg-fonts-{75,100}dpi; This uses TeX Gyre Heros, a metric-compatible Helvetica replacement

- Install ttf-liberation and grab 29-replace-bitmap-fonts.conf from the older fontconfig package; This uses Liberation Sans, an Arial replacement, but not metric-compatible with Helvetica

Thanks for the details. I have some questions:
Is there a way to use something else than TeX Gyre Heros? (I'm not a fan of this font)
Is there a downside to uninstalling xorg-fonts-{75,100}dpi?
I noticed that removing those packages (without installing tex-gyre-fonts) makes firefox fallback to Arial. Besides being the wrong thing to do™, and since I'm not using gsfonts anyway, is it that bad if I keep things like this?

Offline

Board footer

Powered by FluxBB