You are not logged in.

#1 2012-12-31 06:12:27

ds80
Member
Registered: 2012-12-31
Posts: 8

[SOLVED] Font size problem (difference Arch vs Ubuntu)

Hello,

I have just installed Arch as VirtualBox gues under Ubuntu host. And I noticed that fonts are different at the same size.

Ubuntu, Monaco 11 (I would like to have the same for Arch)
Ubuntu Monaco 11

Arch, Monaco 11 (bigger than Ubuntu, Monaco 11)
Arch Monaco 11

Arch, Monaco 10 (smaller than Ubuntu, Monaco 11)
Arch Monaco 10

I presume the problem can be with DPI.

.Xresources

URxvt.scrollstyle: plain
URxvt.scrollBar: false
URxvt.font: xft:Monaco:size=10
!URxvt.font: xft:Monaco:size=11
!URxvt.font: xft:Monaco:size=12
Xft.dpi: 96 
Xft.autohint: 0
Xft.lcdfilter:  lcdefault
Xft.hintstyle:  hintslight
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb

Arch

[ds|~]$ grep DPI /var/log/Xorg.0.log
[    22.063] (II) fglrx(0): DPI set to (131, 134)

[ds|~]$ xdpyinfo | grep resolution
  resolution:    96x96 dots per inch

Ubuntu

[ds|~]$ grep DPI /var/log/Xorg.0.log
[  3518.371] (==) VBoxVideo(0): DPI set to (96, 96)

[ds|~]$ xdpyinfo | grep resolution
  resolution:    96x96 dots per inch

Ideas how to get the same result for Arch as on the 1st picture?

Last edited by ds80 (2013-01-22 21:56:11)

Offline

#2 2012-12-31 06:38:40

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

Re: [SOLVED] Font size problem (difference Arch vs Ubuntu)

That is because Ubuntu provides extra configuration. You need to install the patched package.

See this: https://wiki.archlinux.org/index.php/Fo … ion#Ubuntu

Regards

Offline

#3 2012-12-31 08:36:52

ds80
Member
Registered: 2012-12-31
Posts: 8

Re: [SOLVED] Font size problem (difference Arch vs Ubuntu)

I did install that packages. Basically I have the same font configurations, but the difference not gone.

Offline

#4 2012-12-31 11:39:25

spupy
Member
Registered: 2009-08-12
Posts: 218

Re: [SOLVED] Font size problem (difference Arch vs Ubuntu)

In my experience the font size indirectly depends on the video drivers. On my machine there is 2 points font size difference between the nvidia drivers and the open source ones (nouveau). That's DPI, I guess? Did you change the values from your original post?
What drivers are the host and guest OSs using?

Last edited by spupy (2012-12-31 11:41:20)


There are two types of people in this world - those who can count to 10 by using their fingers, and those who can count to 1023.

Offline

#5 2012-12-31 18:30:44

ds80
Member
Registered: 2012-12-31
Posts: 8

Re: [SOLVED] Font size problem (difference Arch vs Ubuntu)

What drivers are the host and guest OSs using?

host - AMD catalyst, guest - drivers from virtualbox guest additionals.

I have installed Arch native with AMD Catalyst, to get rid of the difference.

So now I have the same DPI output on both systems:

[ds|~]$ grep DPI /var/log/Xorg.0.log
[    23.650] (II) fglrx(0): DPI set to (131, 134)

[ds|~]$ xdpyinfo | grep resolution
  resolution:    96x96 dots per inch

That's DPI, I guess? Did you change the values from your original post?

Yep, I was trying different DPI settings but no luck.

Offline

#6 2013-01-01 09:52:22

ds80
Member
Registered: 2012-12-31
Posts: 8

Re: [SOLVED] Font size problem (difference Arch vs Ubuntu)

I kinda fixed the problem using a tricky settings that reduce font height slightly. But it works only in gnome-terminal, xterm and urxvt still look bad.

<edit name="matrix" mode="assign">
     <times>
        <name>matrix</name>
        <matrix>
           <double>1</double>
           <double>0</double>
           <double>0</double>
           <double>0.97</double>
        </matrix>
     </times>
  </edit>

Last edited by ds80 (2013-01-02 06:56:21)

Offline

#7 2013-01-01 14:02:58

canolucas
Member
Registered: 2010-05-23
Posts: 34

Re: [SOLVED] Font size problem (difference Arch vs Ubuntu)

i would try decreasing the resolution of the hosted system till the sizes match. this way you assure that the font size will match in both width and height.
in my experience, font size does depend on video drivers, even with the same resolution and config in both system, AMD or NVIDIA will never match VBox. The same happens with Intel drivers. If you ask me, i would say this is a bug deep inside the driver's implementation. If it's on Nvidia side, or on Vbox side, or both, i wouldn't know.

BTW, always avoid scale mode and the auto-resize

Good luck

Last edited by canolucas (2013-01-01 14:13:15)

Offline

#8 2013-01-02 07:02:02

ds80
Member
Registered: 2012-12-31
Posts: 8

Re: [SOLVED] Font size problem (difference Arch vs Ubuntu)

canolucas wrote:

BTW, always avoid scale mode and the auto-resize

I got Ubuntu & Arch installed native at the moment - with the same configuration and the same drivers, everything... The only difference is DE - Unity on Ubuntu , i3 on Arch.
So everything looks similar now, except of the fonts... hmm

On Arch all the fonts look a little taller than in Ubuntu and it's really annoying.

Offline

#9 2013-01-02 22:27:55

coproduct
Member
Registered: 2011-09-30
Posts: 22

Re: [SOLVED] Font size problem (difference Arch vs Ubuntu)

I'm fairly certain the DE makes a big difference.  For example, in Gnome3 there is a text scaling factor, which is set to 1.0 by default, which is somewhat large for my tastes.  Unity and Gnome3, among other robust DE's, normally override all Xorg (and fontconfig) settings in order to establish a consistent "look and feel" over a wide variety of hardware.  i3 on the otherhand likely does not interfere at all with X, being a minimal wm (I assume).

Last edited by coproduct (2013-01-02 22:29:59)

Offline

#10 2013-01-03 02:13:25

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: [SOLVED] Font size problem (difference Arch vs Ubuntu)

The visual differences may also be from differences in freetype versions.  Ubuntu has often patched freetype for "better" display of fonts.  Arch does minimal patching.  There is a 'freetype-ubuntu' package in the AUR but it is currently flagged out-of-date.

In 2011, the change from freetype 2.4.5 to freetype 2.4.6 made exactly a 2-pixel change in some fonts' heights: http://sourceforge.net/projects/freetyp … pe2/2.4.6/.  Perhaps Ubuntu has reverted this change?

Edit:
Are the Ubuntu and Arch Monaco versions the same?

$ fc-list -v "Monaco" | grep fontversion

Last edited by thisoldman (2013-01-03 02:59:36)

Offline

#11 2013-01-20 23:11:10

ds80
Member
Registered: 2012-12-31
Posts: 8

Re: [SOLVED] Font size problem (difference Arch vs Ubuntu)

Yep, maybe this is because of DE or different fontconfig verstion (Ubuntu has older one).
The font itself is the same, I did copy this from Ubuntu (not install from AUR).

I removed my Ubuntu and using Arch now, so I dont have the reference any longer smile

To make the fonts looks similar I use the matrix settings above that reduces glyph in tall a little and happy with the result.

Instead of xterm & urxvt I use lilyterm. It's lightweight and vte based, so font rendering in accordance with the fontconfig settings there.

Thanks, I guess the issue can be considered as solved.

Last edited by ds80 (2013-01-20 23:14:00)

Offline

Board footer

Powered by FluxBB