You are not logged in.
I'm having a problem that's similar to a problem expressed on the fedora forums; note that I only skimmed through the fedora post. Here's a zoomed in sample of the problem that I am having with my fonts. They have all of these weird colors in 'em, and I'm not sure how to get rid of them.
I tried installing sharpfonts from the archfonts repo, but that only made all of my fonts look completely different, and only solved the problem for most and not all of my fonts.
Last edited by lspci (2013-01-03 02:10:28)
Offline
Offline
Okay, I did the subpixel rendering thing, but it didn't help. I think I know why, though. I keep on getting this error, and since the changes that I made affected the local.conf file, it must not be loading properly, or else my changes would have worked.
Fontconfig error: "local.conf", line 11: junk after document elementOkay, so part of the problem was probably that my dpi wasn't set right, I went to the dpi calculator and found out that I need the following DPI
DPI: 100.45
Dot Pitch: 0.2529mm
Size: 13.6" × 7.65" (34.54cm × 19.42cm)
Aspect Ratio: 683 × 384 (1.78:1)
Pixel Count: 1,049,088
Megapixels: 1.05MPSo I went ahead and added xrandr --dpi 100.45 & to my .xinitrc, but the font thing is still a problem.... not sure what led me to do the DPI test... oh, yeah it was so that I could take that LCDfilter test thing accurately.
#
# ~/.xinitrc
#
xrandr --dpi 100.45 &Okay, so I fixed the fontconfig error, but the weird colors are still present. The problem with fontconfig stopped after I installed the following packages.
freetype2-cleartype libxft-cleartype cairo-cleartypeHere's my local.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<edit mode="assign" name="antialias">
<bool>true</bool>
</edit>
<edit mode="assign" name="rgba">
<const>rgb</const>
</edit>
<edit mode="assign" name="lcdfilter">
<const>lcddefault</const>
</edit>
</match>
<match target="pattern">
<edit mode="assign" name="dpi">
<double>100.45</double>
</edit>
</match>
</fontconfig>But the color problems are still present, though they have greatly improved--and Courier new still doesn't look anything like Courier New should look.
New courier looks much better now, after changing the lcdfilter back to lcddefault but I'm still not sure if everything look just right or not.
--------------------------
Grepping 'dpi' from xrdb still doesn't work, though.
xdpyinfo | grep "dots"
resolution: 101x101 dots per inchI still get the following when I got to the sub-pixel test thing and click on the native resolution link.
Last edited by lspci (2012-09-13 19:01:00)
Offline
Maybe the subpixel color order is wrong. I think most monitor's are RGB, but perhaps yours needs BGR. Try looking in /etc/fonts/conf.avail/10-subpixel-bgr.conf, 10-subpixel-rgb.conf, 10-sub-pixel-vbgr.conf, and 10-sub-pixel-vrgb.conf to see the various ways of setting it. I know I get a similar effect if I have this setting wrong.
Offline
Maybe the subpixel color order is wrong. I think most monitor's are RGB, but perhaps yours needs BGR. Try looking in /etc/fonts/conf.avail/10-subpixel-bgr.conf, 10-subpixel-rgb.conf, 10-sub-pixel-vbgr.conf, and 10-sub-pixel-vrgb.conf to see the various ways of setting it. I know I get a similar effect if I have this setting wrong.
I checked those files
here they are:
$ cat 10-sub-pixel-bgr.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Enable sub-pixel rendering -->
<match target="font">
<!--
This configuration is available on the major desktop environments.
We shouldn't overwrite it with "assign" unconditionally.
Most clients may picks up the first value only. so using "append"
may simply works to avoid it.
-->
<edit name="rgba" mode="append"><const>bgr</const></edit>
</match>
</fontconfig>$ cat 10-sub-pixel-rgb.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Enable sub-pixel rendering -->
<match target="font">
<!--
This configuration is available on the major desktop environments.
We shouldn't overwrite it with "assign" unconditionally.
Most clients may picks up the first value only. so using "append"
may simply works to avoid it.
-->
<edit name="rgba" mode="append"><const>rgb</const></edit>
</match>
</fontconfig>$ cat 10-sub-pixel-vbgr.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Enable sub-pixel rendering -->
<match target="font">
<!--
This configuration is available on the major desktop environments.
We shouldn't overwrite it with "assign" unconditionally.
Most clients may picks up the first value only. so using "append"
may simply works to avoid it.
-->
<edit name="rgba" mode="append"><const>vbgr</const></edit>
</match>
</fontconfig>$ cat 10-sub-pixel-vrgb.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Enable sub-pixel rendering -->
<match target="font">
<!--
This configuration is available on the major desktop environments.
We shouldn't overwrite it with "assign" unconditionally.
Most clients may picks up the first value only. so using "append"
may simply works to avoid it.
-->
<edit name="rgba" mode="append"><const>vrgb</const></edit>
</match>
</fontconfig>What should I be looking for? I noticed that these config files use
mode="append"instead of
mode="assign"Offline
I think what you can try is to symlink one of those files into /etc/fonts/conf.d, and see if your fonts look better afterward.
To set to try BGR,
ln -s /etc/fonts/conf.avail/10-sub-pixel-bgr.conf /etc/fonts/conf.d
Also, it may be your desktop environment will let you set this instead of symlinking. I know KDE lets you select subpixel order, as well as xfce4. Probably gnome as well, but I havn't run gnome in a long time.
Offline
DPI is 2 values, not 1. And I've never heard of fractions being used in this setting.
Offline
DPI is 2 values, not 1. And I've never heard of fractions being used in this setting.
I know, but 100.45 is what the website spat back at me, so go figure.
If you have another DPI test thingy that I could go to and take, then by oh means, please tell me what it is.
So what are you saying exactly? (I visited the link and read the posts.)
Last edited by lspci (2012-09-15 09:27:00)
Offline
Read the thread linked in my sig.
Offline
Read the thread linked in my sig.
Uh... okay, but I can barely make heads or tails of it. Like, what does it actually change/do? Or where could I read about what it does?
<!-- Greyscale for small fonts -->
<match target="font">
<test name="pixelsize" compare="less_eq"><double>7</double></test>
<edit name="rgba"><const>none</const></edit>
</match>I visited another site recently that's supposed to be able to calculate DPI and here's what it spat out.
Display size: 13.6" × 7.65" (34.54cm × 19.42cm) = 100.45 PPI, 0.2529mm dot pitch, 10091 PPI²Offline
I had that problem, I fixed it and created a fonts.conf (for my user), I recommend you to try my all file and if it works, change what you want.
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font">
<edit mode="assign" name="rgba">
<const>rgb</const>
</edit>
</match>
<match target="font">
<edit mode="assign" name="hinting">
<bool>true</bool>
</edit>
</match>
<match target="font">
<edit mode="assign" name="hintstyle">
<const>hintslight</const>
</edit>
</match>
<match target="font">
<edit mode="assign" name="antialias">
<bool>true</bool>
</edit>
</match>
<match target="font">
<edit mode="assign" name="lcdfilter">
<const>lcddefault</const>
</edit>
</match>
<dir>~/.fonts</dir>
</fontconfig>You have to put it on ~/.config/fontconfig/fonts.conf (with the last fontconfig package).
Hope it works for you.
Offline
Like, what does it actually change/do? Or where could I read about what it does?
<!-- Greyscale for small fonts --> <match target="font"> <test name="pixelsize" compare="less_eq"><double>7</double></test> <edit name="rgba"><const>none</const></edit> </match>
For very small font sizes, it turns the sub-pixel rendering ("red green blue") off. Because there's so few pixels to work with, that sub-pixel rendering at that sort of scale looks *worse*.
I visited another site recently that's supposed to be able to calculate DPI and here's what it spat out.
It's a simple calculation:
1366/13.6 = 100.4 roughly
768/7.65 = 100.4 roughly
So your horizontal and vertical DPI are the same - convenient, I suppose.
Offline
The following file fixed the problem, but since I can't remember whether this problem originated on my old laptop or this one... this may or may not actually be a true fix, but it does solve the problem on my new one.
Just create your /etc/fonts/local.conf and add the below to it!
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- /etc/fonts/local.conf -->
<match target="font">
<edit mode="assign" name="antialias">
<bool>true</bool>
</edit>
<edit mode="assign" name="rgba">
<const>rgb</const>
</edit>
<edit mode="assign" name="lcdfilter">
<const>lcddefault</const>
</edit>
</match>
<match target="pattern">
<edit mode="assign" name="dpi">
<double>100.45</double>
</edit>
</match>
</fontconfig>Offline