Font configuration for elementary + framebuffer backend

08.10.2009 at 22:04

I found out what the problem with the elementary hello world application was. The fonts were missing. So how does font configurtion work? To answer this the XFree86 Font De-uglification HOWTO's TrueType Fonts section is useful. You basically have to copy your fonts into a directory and then run:


This generates a fonts.scale file (which you can ignore because evas doesn't care about it) and a fonts.dir file which is read by evas.

The default elementary theme uses Sans as default font so we have to set up an alias for this. This can be done by creating a fonts.alias file containing for example:

Sans -misc-dejavu sans-medium-r-normal--0-0-0-0-c-0-ascii-0

However it is important that there is now trailing white space at the end of the line. Otherwise evas will reject the alias because it doesn't match with a font from the fonts.dir file which doesn't have any trailing spaces. Of course I only found this out after reading through evas source code and in the meantime I was told to just use X -- Sigh.

Anyway while reading through the source I actually noticed that evas also uses the filename without extension as a font name. So a simple symlink like:

ln -s DejaVuSans.ttf Sans.ttf

also works as alias and in this case we don't need the fonts.alias and fonts.dir files.

On a completely unrelated thing whoever came up with the idea to use XML for the fontconfig configuration files should be taken away from computers better sooner than later.

While the font problem is now solved the next thing to investigate is probably touchscreen handling which doesn't quite work the way it should.


I have never been a heavy user of irc (if you are not paying attention you can just waste too much time with senseless flamewars) but sometimes it's actually a useful medium to get some answers in real time. Anyway because I haven't used my original irc nick for quite some time someone else has overtaken it's ownership. Yeah I really should add a few lines to my login scripts which authenticate my irc nick on freenode and oftc. Anyway registered some new nicks, I am now known as }mat or ]mat.


Comments (0)

There are currently no comments available