WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] fontconfig (Helvetica)  (Read 3801 times)

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
[SOLVED] fontconfig (Helvetica)
« on: November 04, 2015, 11:28:10 AM »
Getting a bit closer to TCL, i start with finetuning. One of the points that bothers - me - post is the horrible font resolution in default setup. I installed fontconfig and migrated the nicely working local.conf i've on another laptop. It looks like this:
Code: [Select]
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <match target="font">
   <edit mode="assign" name="rgba">
     <const>rgb</const>
   </edit>
   <edit mode="assign" name="hinting">
     <bool>true</bool>
   </edit>
   <edit mode="assign" name="hintstyle">
     <const>hintslight</const>
   </edit>
   <edit mode="assign" name="antialias">
     <bool>true</bool>
   </edit>
   <edit mode="assign" name="lcdfilter">
     <const>lcddefault</const>
   </edit>
 </match>
 <match target="pattern">
   <edit mode="assign" name="dpi">
     <double>96</double>
   </edit>
 </match>

Generally this works fine, but i've still one ugly problem: The DDG site is shown with horribly pixled fonts. I can play around this by setting FF to *NOT* allow sites their own fonts. But since this is not the setting on other machines (where i not have this problem). I researched a little bit deeper, and seems to me, that there is a problem with Helvetica. When i set my default font (in FF) to Helvetica (with not allow fonts) the font resolution is the same as with the DDG font (which is Proxima).

Now, without being an expert, just guessing in the dark, i suspect, may be, Helvetica font in some way is used as systemwide similar font to those the system does not know. And eventually, there is a problem in the font handling - on the system - of Helvetica.

So, one possible solution would be to correct the handling of Helvetica. But how???

The other, might be, delete Helvetica completely and re-install it. But, in this case, from where? I do not see any Helvetica in the TCL repository? (But its there, on my system in /usr/lib/X11/fonts/75dpi/ and in /usr/local/lib/X11/fonts/75dpi/ ...

May be someone here of you more knowledged users can help me out.

Thanks a lot in advance!
« Last Edit: November 06, 2015, 04:07:50 PM by Rich »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: fontconfig (Helvetica)
« Reply #1 on: November 04, 2015, 03:33:34 PM »
Sounds like it matches a bitmap font. There's a fontconfig setting that disables bitmap fonts, maybe that is what you want.
The only barriers that can stop you are the ones you create yourself.

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: fontconfig (Helvetica)
« Reply #2 on: November 04, 2015, 05:18:51 PM »
Sounds like it matches a bitmap font. There's a fontconfig setting that disables bitmap fonts, maybe that is what you want.

I added to my local.conf:
Code: [Select]
  <match target="font">
    <edit name="embeddedbitmap" mode="assign">
      <bool>false</bool>
    </edit>
  </match>

But it had no effect to the Helvetica related problem.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: fontconfig (Helvetica)
« Reply #3 on: November 05, 2015, 06:05:32 AM »
No, that is not the option. See 70-no-bitmaps.conf
The only barriers that can stop you are the ones you create yourself.

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: fontconfig (Helvetica)
« Reply #4 on: November 05, 2015, 11:03:59 AM »
I see. But it does not have an effect as well. I'm afraid i'll have to do a larger research to solve my issue.

Just a question: Helvetica came with the default install of TCL 6?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: fontconfig (Helvetica)
« Reply #5 on: November 05, 2015, 11:55:04 AM »
Yes, some bitmap fonts are included so that the included apps can display things.
The only barriers that can stop you are the ones you create yourself.

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: fontconfig (Helvetica)
« Reply #6 on: November 05, 2015, 04:31:21 PM »
Yes, some bitmap fonts are included so that the included apps can display things.

Ah, that's an idea: The Helvetica i've are bitmaps not scalable (ttf). May be i should get somewhere Helvetica.ttf to make things smoother. Helvetica in some way, for many website specific fonts seems the substitute on the linux client side ... Especially, i've the problem on the ddg homepage (they use Proxima). Actually, i'm playing around the problem by *NOT allowing website specific fonts in FF - which in most cases is fine, but sometimes creates a problem (as for formatting of text on site of newspapers e.g.).
« Last Edit: November 05, 2015, 04:36:12 PM by emninger »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: fontconfig (Helvetica)
« Reply #7 on: November 06, 2015, 06:45:57 AM »
Using 70-no-bitmaps.conf works for me.

- load TC
- load fontconfig
- fc-match Helvetica gives helvR12-iso*pcf.gz
- symlink 70-no-bitmaps.conf into the conf.d directory
- fc-match Helvetica now gives Luxi Sans, the only TTF font included by default
The only barriers that can stop you are the ones you create yourself.

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: fontconfig (Helvetica)
« Reply #8 on: November 06, 2015, 07:35:56 AM »
Seems to work for me too:

Code: [Select]
[tc@box:~$ fc-match Helvetica
LiberationSans-Regular.ttf: "Liberation Sans" "Regular"
/code]

But there's still the problem, if i set - in FF - default font to "Helvetica" the font appears horribly pixled. The same happens, if i allow the websites to use THEIR fonts, on the duckduckgo site (which uses Proxima - which, IIRC, is "paired" to Helvetica on the linux client side (?) ).

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: fontconfig (Helvetica)
« Reply #9 on: November 06, 2015, 07:55:28 AM »
Did you run fc-cache after changing fontconfig settings?
The only barriers that can stop you are the ones you create yourself.

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: fontconfig (Helvetica) [SOLVED]
« Reply #10 on: November 06, 2015, 03:10:49 PM »
Did you run fc-cache after changing fontconfig settings?

That was it!!!! Thanks a lot for your help! I'll mark this thread as solved.

PS. I see, that's not possible, at least not to me. May be you (as an administrator) can?
« Last Edit: November 06, 2015, 03:13:49 PM by emninger »

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: [SOLVED] fontconfig (Helvetica)
« Reply #11 on: November 11, 2015, 11:47:09 AM »
Although this problem is solved, essentially (and very nicely!) one question remains:

How can the fontconfig settings be made persistent. For the moment i helped me out, putting /usr/local/etc/fonts/ in the backuplist.

In the arch wiki i read ~/.fonts nowadays is deprecated. In the fontconfig wiki it's still mentioned. What should i do to make ~/.fonts a viable solution? How and where to change path variables etc.?

Thanks a lot in advance!