[cairo] Pango Cairo font resolution: shouldn't be specified for both horizontal and vertical?

Ivan Baldo ibaldo at adinet.com.uy
Thu Aug 17 18:08:13 PDT 2006


(I posted this to gtk-app-devel-list at gnome.org on 2006-08-08 but didn't get an answer)


    Hello.
    I am drawing text on a Cairo context with the help of Pang Cairo.
    If I use a font with 72 points then an M should be aproximately one 
inch tall (I guess, maybe I am wrong), for this, I get the resolution of 
my monitor and I tell that to Pango, so I got my expected result.
    Luckily my monitor has square pixels, so I have 81 dpi both 
horizontally and vertically.
    But now I wonder: ¿what happens on a non square pixel monitor or on 
a printer?
    My guess is that the fonts would look distorted because the diferent 
resolutions aren't taken into account by Pango.
    I looked in the documentation and header files and I didn't found a 
function to specify the resolution separately for vertical and horizontal.
    I am a bit lost now, so I appreciate if someone can iluminate my 
route to salvation  :) .
    Thanks for sharing your knowledge!


P.s.: GNOME seems to be using 96 DPI by default although my monitor 
correctly reports 81 dpi to X _and_ to GTK, so actually my fonts aren't 
the size they should be in the real physical world, but I will not bug 
about this until I get more knowledge about fonts, etc..., also, it 
doesn't have the possibility to specify diferent resolutions for 
horizontal and vertical... I wonder how fonts would look in a non square 
pixel monitor though I think those monitors are hard to find today...

-- 
Ivan Baldo - ibaldo at adinet.com.uy - http://ibaldo.codigolibre.net/
ICQ 10215364 - Phone/FAX (598) (2) 613 3223.
Caldas 1781, Malvin, Montevideo, Uruguay, South America.
We believe that we are free, but in reality we are not! We wee weee!
Alternatives: ibaldo at codigolibre.net - http://go.to/ibaldo



More information about the cairo mailing list