You are not logged in.

#26 2012-01-15 15:14:39

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: is there any guide to a usable font configuration on arch?

@brebs - wtf?

$ cat ~/.Xresources 
Xcursor.theme: Adwaita
Xft.dpi: 100	! this is an inline comment

$ xdpyinfo | grep -B1 dot
  dimensions:    1920x1080 pixels (483x272 millimeters)
  resolution:    101x101 dots per inch

Offline

#27 2012-01-15 15:27:34

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

Re: is there any guide to a usable font configuration on arch?

Your monitor has weird values. E.g.:  1920 / 4 = 480, not 483.

Your fonts might look slightly better if you specify 100x100 in ~/.fonts.conf or xorg.conf

For xorg.conf:

Option "DPI"   "100 x 100"

Last edited by brebs (2012-01-15 15:34:24)

Offline

#28 2012-01-15 16:43:54

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: is there any guide to a usable font configuration on arch?

@brebs - very odd:

# cat /etc/X11/xorg.conf.d/20-nvidia.conf
Section "Monitor"
	Identifier "Asus MS228"
	Option "UseEdidDpi" "FALSE"
	Option "DPI"	"100 x 100"
EndSection

I dropped down to runlevel 3 then back up to 5 but I still get that odd size:

$ xdpyinfo | grep -B1 dot
  dimensions:    1920x1080 pixels (483x272 millimeters)
  resolution:    101x101 dots per inch

Offline

#29 2012-01-15 16:47:59

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

Re: is there any guide to a usable font configuration on arch?

Debug:

grep -i dpi /var/log/Xorg.0.log

Offline

#30 2012-01-15 16:53:31

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: is there any guide to a usable font configuration on arch?

@brebs -

$ grep -i dpi /var/log/Xorg.0.log
	/usr/share/fonts/100dpi/,
	/usr/share/fonts/75dpi/
[ 19730.796] (--) NVIDIA(0): DPI set to (101, 101); computed from "UseEdidDpi" X config

Offline

#31 2012-01-15 19:45:41

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: is there any guide to a usable font configuration on arch?

Ok ok, i spent another 2 hours fiddling with infinality, things start to make sense (again). It's a lot more powerful than -ubuntu, many useful tweaks, good stuff, carry on. wink


ᶘ ᵒᴥᵒᶅ

Offline

#32 2012-01-15 22:36:04

jeff story
Member
Registered: 2009-05-31
Posts: 238
Website

Re: is there any guide to a usable font configuration on arch?

My fonts look ok to me, except some websites in Firefox. An example is at http://www.osnews.com/.
I'm using the Ubuntu patched packages from AUR.


In Arch, it looks like this:

http://i1082.photobucket.com/albums/j36 … 1323AM.png

http://i1082.photobucket.com/albums/j36 … 2052AM.png

http://i1082.photobucket.com/albums/j36 … 2456AM.png


Same page in Ubuntu, looks like this:

http://i1082.photobucket.com/albums/j36 … buntu1.png

http://i1082.photobucket.com/albums/j36 … buntu2.png

Anyone else here having this issue?



I've been trying to fix this for some time off/on, and stumbled upon this thread today.

I also found this  https://bbs.archlinux.org/viewtopic.php?id=132304. Really not sure if my prob is firefox or a font conf issue.

[jeff@Arch2010p5 ~]$ sudo pacman -Q firefox xulrunner nvidia xorg-server  
firefox 9.0.1-1
xulrunner 9.0.1-1
nvidia 290.10-1
xorg-server 1.11.3-1



[jeff@Arch2010p5 ~]$ sudo pacman -Qsq font
cantarell-fonts
fontconfig-ubuntu
fontsproto
freetype2-ubuntu
gsfonts
libfontenc
libgraphite
libxfont
libxft-ubuntu
t1lib
ttf-dejavu
ttf-ms-fonts
xorg-bdftopcf
xorg-fonts-100dpi
xorg-fonts-75dpi
xorg-fonts-alias
xorg-fonts-encodings
xorg-fonts-misc
xorg-font-util
xorg-font-utils
xorg-mkfontdir
xorg-mkfontscale


[jeff@Arch2010p5 ~]$ sudo pacman -Qs font
local/cantarell-fonts 0.0.7-1
    Cantarell font family for the GNOME desktop
local/fontconfig-ubuntu 2.8.0-2
    A library for configuring and customizing font access, with Ubuntu's LCD rendering patches.
local/fontsproto 2.1.1-1
    X11 font extension wire protocol
local/freetype2-ubuntu 2.4.8-1
    TrueType font rendering library, with Ubuntu's LCD rendering patches
local/gsfonts 1.0.7pre44-2
    Ghostscript standard Type1 fonts from URW
local/libfontenc 1.1.0-1
    X11 font encoding library
local/libgraphite 2.3.1-2
    SILGraphite - a "smart font" rendering engine - the libs and headers
local/libxfont 1.4.4-1
    X11 font rasterisation library
local/libxft-ubuntu 2.2.0-2
    FreeType-based font drawing library for X, with Ubuntu's LCD rendering patches
local/t1lib 5.1.2-3
    Library for generating character- and string-glyphs from Adobe Type 1 fonts
local/ttf-dejavu 2.33-1
    Font family based on the Bitstream Vera Fonts with a wider range of characters
local/ttf-ms-fonts 2.0-8
    Core TTF Fonts from Microsoft
local/xorg-bdftopcf 1.0.3-1 (xorg xorg-apps)
    Convert X font from Bitmap Distribution Format to Portable Compiled Format
local/xorg-fonts-100dpi 1.0.1-3 (xorg)
    X.org 100dpi fonts
local/xorg-fonts-75dpi 1.0.1-3 (xorg)
    X.org 75dpi fonts
local/xorg-fonts-alias 1.0.2-2
    X.org font alias files
local/xorg-fonts-encodings 1.0.4-1 (xorg-fonts xorg)
    X.org font encoding files
local/xorg-fonts-misc 1.0.1-1
    X.org misc fonts
local/xorg-font-util 1.2.0-1 (xorg-fonts xorg)
    X.Org font utilities
local/xorg-font-utils 7.6-2
    Transitional package depending on xorg font utilities
local/xorg-mkfontdir 1.0.6-2 (xorg xorg-apps)
    Create an index of X font files in a directory
local/xorg-mkfontscale 1.0.9-1 (xorg-apps xorg)
    Create an index of scalable font files for X

Last edited by jeff story (2012-01-15 22:38:42)


Check out my website for info on the Arch Linux Installer

Offline

#33 2012-01-15 22:50:51

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

Re: is there any guide to a usable font configuration on arch?

That looks like a bitmap, so you probably want this fontconfig rule:

    <!-- Reject bitmap fonts in favour of Truetype, Postscript, etc. -->
    <match target="font" >
        <test name="allow_bitmap_fonts" qual="any" >
            <bool>false</bool>
        </test>

        <selectfont>
            <rejectfont>
                <pattern>
                    <patelt name="scalable">
                        <bool>false</bool>
                    </patelt>
                </pattern>
            </rejectfont>
        </selectfont>
    </match>

Offline

#34 2012-01-15 23:32:30

jeff story
Member
Registered: 2009-05-31
Posts: 238
Website

Re: is there any guide to a usable font configuration on arch?

brebs wrote:

That looks like a bitmap, so you probably want this fontconfig rule:

Thanks brebs,  That did it!


For anyone possibly needing the details of my fix:
Read this first:  https://wiki.archlinux.org/index.php/Fo … figuration

1) I created a ~/.fonts.conf    (could also configure globally in /etc/fonts/local.conf)
2) Put brebs fontconfig rule in it and save.
3) Log out and back in.


Check out my website for info on the Arch Linux Installer

Offline

#35 2012-01-16 05:57:38

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: is there any guide to a usable font configuration on arch?

@jeff story, you should realize that the bitmap rendering is due to fact that you have "Helvetica" installed from the xorg-fonts-{75,100}dpi packages.  Disabling bitmap just for this is NOT a good idea, IMO.  Also, it seems you don't have the ttf-ms-fonts (or similar) installed, so you are missing some common fonts like arial and tahoma.

Now, regarding DPI, I've been using 96x96 for a long time now, which I set in xorg.conf.  Now I've disabled the overriding and let X auto detect it, and it gets me 108x106 which is close to the PPI I mesured and calculated physically.  The result is that graysky's screenshots look exactly the same as before to me; in fact, everything in web pages looks the same.  The same goes for the terminal. What's changed is the fonts in Firefox and other GTK app menus - they look quite bigger now.  As I understand it, I think it's the way font sizes are specified- in web pages they're (essentially, I think) specified in pixels, while my GTK gtk-font-name is "Sans 10"...  But again, I'm not sure any of this is normal / correct, so please enlighten me smile

Last edited by lolilolicon (2012-01-16 06:01:18)


This silver ladybug at line 28...

Offline

#36 2012-01-16 06:27:05

lorin
Member
Registered: 2011-12-06
Posts: 28

Re: is there any guide to a usable font configuration on arch?

I had a similar problem with OSnews and a few other sites (Infinality forums coincidentally being one of them) that use Trebuchet MS.  The quick and dirty fix I used previously was a replacement rule in ~/.font.conf. I seem to remember disabling bitmaps prevented me from using my preferred terminal font, so that was out.

  <match target="font" >
                <test name="family" qual="any" >
                        <string>Trebuchet MS</string>
                </test>
                <edit mode="assign" name="family" >
                        <string>Arial</string>
                </edit>
        </match>
        <match target="pattern" name="family" >
                <test name="family" compare="eq" target="default">
                        <string>Trebuchet MS</string>
                </test>
                <edit binding="strong" mode="prepend" name="family" >
                        <string>Arial</string>
                </edit>
        </match>

But it seems like rendering of that font has improved in the latest Infinality patch.

Last edited by lorin (2012-01-16 06:27:41)

Offline

#37 2012-01-16 06:55:38

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: is there any guide to a usable font configuration on arch?

@lorin,
- Why do you replace *and* prepend Trebuchet MS with Arial?
- There is no rule in /etc/fonts/conf.d/* specific to Trebuchet MS, so you shouldn't *need* to make one for it.  Maybe your sans-serif is not mapped to a font you like?

Last edited by lolilolicon (2012-01-16 06:55:54)


This silver ladybug at line 28...

Offline

#38 2012-01-16 07:56:55

jeff story
Member
Registered: 2009-05-31
Posts: 238
Website

Re: is there any guide to a usable font configuration on arch?

lolilolicon wrote:

@jeff story, you should realize that the bitmap rendering is due to fact that you have "Helvetica" installed from the xorg-fonts-{75,100}dpi packages.  Disabling bitmap just for this is NOT a good idea, IMO.  Also, it seems you don't have the ttf-ms-fonts (or similar) installed, so you are missing some common fonts like arial and tahoma.

Thanks for reply lolilolicon. I do have ttf-ms-fonts and the xorg-fonts-{75,100}dpi packages installed. See in my above post pacman -Qsq font and pacman -Qs font output.

I also see in my Ubuntu install that it has an /etc/fonts/config.d/70-no-bitmaps.conf link-file. In Arch, even though I installed the ubuntu patched font related packages per below, they didn't install the link-file :

jeff@Arch2010p5 ~]$ sudo pacman -Qs ubuntu
Password: 
local/cairo-ubuntu 1.10.2-6
    Cairo vector graphics library, with Ubuntu's LCD rendering patches
local/fontconfig-ubuntu 2.8.0-2
    A library for configuring and customizing font access, with Ubuntu's LCD
    rendering patches.
local/freetype2-ubuntu 2.4.8-1
    TrueType font rendering library, with Ubuntu's LCD rendering patches
local/libxft-ubuntu 2.2.0-2
    FreeType-based font drawing library for X, with Ubuntu's LCD rendering
    patches

Arch has the 70-no-bitmaps.conf file in the /etc/fonts/conf.avail directory but no link to it in the /etc/fonts/config.d/ directory.
How would having the /etc/fonts/config.d/70-no-bitmaps.conf link-file differ from what I did user wide for different apps?

When it comes to font configuration and how different apps render fonts and from what conf files, I'm at a total loss.

Is there a way to specify what Firefox does regarding fonts without effecting all other apps?

I use monospace bold 12 (I'm old and don't see as well as I used to...lol) for terminal fonts and they look fine to me.

Edit to add info:

My system default font is Arial 12, anti-aliasing enabled, full hinting RGB custom dpi set at 86 for my 22 inch monitor.
Also have a 40 inch lcd TV attached to the hdmi output (nvidia gt220) setup via seperate x screen for playing media using XBMC.

[jeff@Arch2010p5 ~]$ xdpyinfo | grep -B1 dot
  dimensions:    1680x1050 pixels (474x303 millimeters)
  resolution:    90x88 dots per inch
--
  dimensions:    1920x1080 pixels (650x366 millimeters)
  resolution:    75x75 dots per inch

Edit to add info:

Changed the dpi from 86 to 89, re-logged in, no significant change except possibly slightly larger desktop icon fonts?

Last edited by jeff story (2012-01-16 08:38:20)


Check out my website for info on the Arch Linux Installer

Offline

#39 2012-01-16 09:47:20

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: is there any guide to a usable font configuration on arch?

jeff story wrote:

Thanks for reply lolilolicon. I do have ttf-ms-fonts and the xorg-fonts-{75,100}dpi packages installed. See in my above post pacman -Qsq font and pacman -Qs font output.

Ah, sorry for not looking closer.  The problem is Helvetica in the xorg-fonts-*dpi packages is a bitmap font, so you can either uninstall those packages or write a fontconfig rule to replace Helvetica with Arial.  Disabling bitmap fonts works, but is a bit brutal IMO, which presumably is why 70-no-bitmaps.conf is not enabled in Arch by default, but if you absolute don't want bitmap fonts, then it's fine.

How would having the /etc/fonts/config.d/70-no-bitmaps.conf link-file differ from what I did user wide for different apps?

When it comes to font configuration and how different apps render fonts and from what conf files, I'm at a total loss.

Is there a way to specify what Firefox does regarding fonts without effecting all other apps?

I don't know if this is the right way to put it, but Firefox just requests fonts from fontconfig.  All you can set in Firefox is the default fonts used when a web page does not specify a font.

I use monospace bold 12 (I'm old and don't see as well as I used to...lol) for terminal fonts and they look fine to me.

"monospace" is not a real font, but a generic name, which is likely mapped to "DejaVu Sans Mono" since you have ttf-dejavu installed.  To check, use `fc-match monospace`.  You can override it by using something like:

  <alias>
    <family>monospace</family>
    <prefer>
      <family>Monaco</family>
    </prefer>
  </alias>

Same goes for "sans-serif" and "serif".


This silver ladybug at line 28...

Offline

#40 2012-01-18 15:28:18

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: is there any guide to a usable font configuration on arch?

Tabs in chromium:
image.png

Text in chromium:
image.png

From terminal:
image.png

EDIT - wow, looking at my screenshots on my iPad just now... The console screenshot looks like shit?!   How is this possible since it is a png image?

Offline

#41 2012-01-18 18:41:49

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

Re: is there any guide to a usable font configuration on arch?

jeff story wrote:

Is there a way to specify what Firefox does regarding fonts without affecting all other apps?

No, fontconfig cannot do per-app rules.

graysky wrote:

looking at my screenshots on my iPad

Your iPod isn't 1920x1080. Its pixels don't line up the same way. Circles get deformed. And look at the letter "e" for instance - it's circular-ish. So guess what, it gets deformed.

This is why I've always been reluctant to provide screenshots - they are tied to *your* monitor dimensions and DPI, not some random viewer's. So they're terribly misleading.

Offline

#42 2012-01-18 20:49:32

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: is there any guide to a usable font configuration on arch?

Thanks for the info brebs - I feel like we have all somewhat hijacked this thread.  I am still confused by what I'm seeing.  Can you have a look at my post here?

Offline

Board footer

Powered by FluxBB