You are not logged in.

#1 2010-11-02 15:49:04

Marcel-
Member
From: Utrecht, NL
Registered: 2006-12-03
Posts: 266

Select specific OpenType feature in GTK/Pango

Hi,

Thanks to a few screenshots I found the wonderful Aller font. So I installed it to my system and instructed GTK to use it. After an hour I became a bit distracted by the 0s that were shown (yes, I'm a nit-picker in the field of typography).

Usually with non-lining figures the 0 fits perfectly between the base line and the mean line, just like the 1. When creating a sample in OpenOffice, this seems perfectly all right (top part):

tNjBveg

But within GTK widgets (like the file selector) and windows drawn by my WM (IceWM), I noticed that GTK chooses the wrong 0s (middle part). I also noticed this when looking at several screenshots posted on this forum, e.g. those by caligo.

However, when opening this font in FontForge, I concluded that the correct 0 is at the correct position (bottom part; though I know that what you see in these examples is the bold variant (except in the file name), this issue also occurs when using the regular style). I also saw other 0s, of which one could be chosen by GTK: zero.alt, zero.plnf and zero.tlnf.

Moreover, it occurred to me that the kerning is absent, as the 'ij'-combination stands too far apart (it could also be that GTK bluntly puts a box around the entire character and doesn't respect the bounding box defined in the font). Again, this also looks alright in Open Office.

So, my question is: how do I instruct GTK to use the default, non-lining, proportional figures and respect the usual kerning?

Here is current my ~/.gtkrc-2.0:

include "/usr/share/themes/Bluecurve/gtk-2.0/gtkrc"

style "user-font"
{
    font_name = "Aller 10"
}
widget_class "*" style "user-font"
gtk-font-name = "Aller 10"

Edit: Improved title

Last edited by Marcel- (2010-11-02 23:49:47)

Offline

Board footer

Powered by FluxBB