You are not logged in.

#1 2013-05-08 16:12:21

husainaloos
Member
Registered: 2013-03-23
Posts: 26

[Solved] Font Rendering Does not Work

Hello,

I think I am doing it wrong. I want to configure the font rendering on Arch. I added this file in /etc/fonts/local.conf:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
	<match target="font">
    		<edit name="antialias" mode="assign">
      			<bool>true</bool>
    		</edit>
	</match>
	<match target="font">
    		<edit name="hinting" mode="assign">
      			<bool>true</bool>
    		</edit>
  	</match>
	<match target="font">
    		<edit name="hintstyle" mode="assign">
      			<const>hintslight</const>
    		</edit>
 	</match>
	<match target="font">
   		<edit name="rgba" mode="assign">
      			<const>rgb</const>
    		</edit>
  	</match>
</fontconfig>

I restart the computer and it does not work. I do not know how to make it run. What am I doing wrong?

Last edited by husainaloos (2013-05-15 23:07:02)

Offline

#2 2013-05-13 09:54:05

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [Solved] Font Rendering Does not Work

The easiest you could do is to install the infinality-bundle which takes care of all the font configuration:

https://bbs.archlinux.org/viewtopic.php?id=162098

Offline

#3 2013-05-13 10:41:17

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [Solved] Font Rendering Does not Work

husainaloos wrote:

What am I doing wrong?

Probably missing /etc/fonts/conf.d/51-local.conf, which calls /etc/fonts/local.conf

Offline

#4 2013-05-15 20:14:21

husainaloos
Member
Registered: 2013-03-23
Posts: 26

Re: [Solved] Font Rendering Does not Work

brebs wrote:
husainaloos wrote:

What am I doing wrong?

Probably missing /etc/fonts/conf.d/51-local.conf, which calls /etc/fonts/local.conf

Thanks for responding. I am still struggling with rendering the font. I tried many things but can't figure it out. Here is where I am at:

I have two identical folders ~/.config/fontconfig/ and ~/fontconfig that contain the file fonts.conf, which is basically this:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<fontconfig>


  <!-- Font hinting and configurations -->

  <match target="font">

    <edit name="antialias" mode="assign">
      <bool>true</bool>
    </edit>

    <edit name="hinting" mode="assign">
      <bool>true</bool>
    </edit>

    <edit name="hintstyle" mode="assign">
      <const>hintslight</const>
    </edit>

    <edit name="rgba" mode="assign">
      <const>rgb</const>
    </edit>

  </match>

</fontconfig>

My /etc/fonts/conf.d/51-local.conf  contains this line:

    <include ignore_missing="yes">local.conf</include>

and I don't know how to modify it. I am stuck here and I do not know what to do. Any help is appreciated.

Offline

#5 2013-05-15 21:16:26

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: [Solved] Font Rendering Does not Work

If you want to use a user defined fonts.conf, you need to place it in:
~/.config/fontconfig/fonts.conf

Then you need the link:
/etc/fonts/conf.d/50-user.conf -> /etc/fonts/conf.avail/50-user.conf

In that case you don't need:
~/fontconfig (which is not the correct place)

You can use either a local.conf for all users on the machine
or a fonts.conf for each users.

local.conf works with the link:
/etc/fonts/conf.d/51-local.conf -> /etc/fonts/conf.avail/51-local.conf

I hope that will clarify things for you.

Offline

#6 2013-05-15 21:26:52

silenc3r
Member
From: Poland
Registered: 2009-08-29
Posts: 149

Re: [Solved] Font Rendering Does not Work

berbae wrote:

If you want to use a user defined fonts.conf, you need to place it in:
~/.config/fontconfig/fonts.conf

also make sure you have defined $XDG_CONFIG_HOME:

echo $XDG_CONFIG_HOME

(should be /home/<username>/.config/)

Youre also missing lcdfilter option in your fonts.conf (not sure if it's needed tho)
my fonts.conf:

<?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>
</fontconfig>

Offline

#7 2013-05-15 23:06:47

husainaloos
Member
Registered: 2013-03-23
Posts: 26

Re: [Solved] Font Rendering Does not Work

Thank you so  much berbae & silenc3r. It works now!

All I needed is to make links:

ln -s /etc/fonts/conf.avail/* .config/fontconfig/conf.d/

Thanks again!

Offline

#8 2013-05-16 09:59:34

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: [Solved] Font Rendering Does not Work

@husainaloos

ln -s /etc/fonts/conf.avail/* .config/fontconfig/conf.d/

I don't think that is a good solution; where did you see that?

silenc3r wrote:

also make sure you have defined $XDG_CONFIG_HOME

I think XDG_CONFIG_HOME defaults to $HOME/.config, so no need to declare it for the default value.

Offline

#9 2013-05-16 13:13:51

silenc3r
Member
From: Poland
Registered: 2009-08-29
Posts: 149

Re: [Solved] Font Rendering Does not Work

berbae wrote:

I think XDG_CONFIG_HOME defaults to $HOME/.config

Only if you use some kind of session manager.

Since libx11 1.5.0-2 global configuration for those variables is dropped:
XDG_DATA_HOME
XDG_CONFIG_HOME
XDG_CACHE_HOME
XDG_DATA_DIRS
XDG_CONFIG_DIRS

In case of standalone WMs you have to set it manually.

Offline

#10 2013-05-16 16:51:33

husainaloos
Member
Registered: 2013-03-23
Posts: 26

Re: [Solved] Font Rendering Does not Work

silenc3r is right. One has to define the variable. I am not sure if some desktop environments define it.

Apparently the command line does not solve the issue. I restarted the session after deleting the links and the fonts worked normally. I think I made something different that I can't think of. So weird.

Offline

#11 2013-05-16 19:40:49

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: [Solved] Font Rendering Does not Work

From http://standards.freedesktop.org/basedi … atest.html

$XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used

I understand that to be equivalent to a default value, if a program not finding the variable XDG_CONFIG_HOME uses $HOME/.config.

Offline

Board footer

Powered by FluxBB