After reading through evas_font_dir.c I found the solution (see below).

On Wed, Oct 07, 2009 at 12:22:08PM +0200, Marc Andre Tanner wrote:
> Hi,
> 
> I am trying to build a minimal elementary with framebuffer backend based
> initramfs for my Freerunner. I so far cross compiled all the required 
> elementary dependencies and tested the result in a chroot with the dialog 
> app from the elementary wiki page. The app starts up but all fonts are
> missing which makes sense since I haven't yet copied any into the chroot.
> 
> Unfortunately I don't really know how the font handling is supposed to work
> with the framebuffer backend (I disabled fontconfig support at compile time).
> I then took a look at the default elementary theme and saw that it specifys
> "Sans" as default font, is this correct so far?
> 
> I then did:
> 
> export ELM_ENGINE=fb
> export ELM_FONT_PATH=/usr/share/fonts
> strace -f -e trace=file -o log dialog "This is a test"
> 
> This showed that it tried to open the files fonts.dir and fonts.alias in 
> /usr/share/fonts. Did some google search about these and then copied the
> the truetype fonts from my normal SHR system to the host. On the host I
> executed:
> 
> ttmkfdir
> mkfontdir
> 
> which generated a fonts.scale (which didn't who up under strace so I ingored
> it for now) and a fonts.dir file. This looks like this:
> 
> ...
> DejaVuSans.ttf -misc-dejavu sans-medium-r-normal--0-0-0-0-c-0-ascii-0
> DejaVuSans.ttf -misc-dejavu sans-medium-r-normal--0-0-0-0-c-0-iso10646-1
> DejaVuSans.ttf -misc-dejavu sans-medium-r-normal--0-0-0-0-c-0-iso8859-1
> DejaVuSans.ttf -misc-dejavu sans-medium-r-normal--0-0-0-0-c-0-iso8859-10
> DejaVuSans.ttf -misc-dejavu sans-medium-r-normal--0-0-0-0-c-0-iso8859-13
> DejaVuSans.ttf -misc-dejavu sans-medium-r-normal--0-0-0-0-c-0-iso8859-15
> DejaVuSans.ttf -misc-dejavu sans-medium-r-normal--0-0-0-0-c-0-iso8859-2
> DejaVuSans.ttf -misc-dejavu sans-medium-r-normal--0-0-0-0-c-0-iso8859-3
> DejaVuSans.ttf -misc-dejavu sans-medium-r-normal--0-0-0-0-c-0-iso8859-4
> DejaVuSans.ttf -misc-dejavu sans-medium-r-normal--0-0-0-0-c-0-iso8859-5
> DejaVuSans.ttf -misc-dejavu sans-medium-r-normal--0-0-0-0-c-0-iso8859-6
> DejaVuSans.ttf -misc-dejavu sans-medium-r-normal--0-0-0-0-c-0-iso8859-7
> DejaVuSans.ttf -misc-dejavu sans-medium-r-normal--0-0-0-0-c-0-iso8859-8
> DejaVuSans.ttf -misc-dejavu sans-medium-r-normal--0-0-0-0-c-0-iso8859-9
> DejaVuSans.ttf -misc-dejavu sans-medium-r-normal--0-0-0-0-c-0-koi8-r
> DejaVuSans.ttf -misc-dejavu sans-medium-r-normal--0-0-0-0-c-0-koi8-ru
> ...
> 
> I then created a fonts.alias file with the following content
> (are the fonts case sensitive?):
> 
> default -misc-dejavu sans-medium-r-normal--0-0-0-0-c-0-ascii-0 
> Sans    -misc-dejavu sans-medium-r-normal--0-0-0-0-c-0-ascii-0 
> sans    -misc-dejavu sans-medium-r-normal--0-0-0-0-c-0-ascii-0 
                                                                ^
The space at the end of the line actually was the problem. Because of this
the last component didn't match '0 ' != '0' and evas dropped the alias.

Maybe all trailing white spaces should be stripped?

Another possibly simpler solution which also seems to work is a symlink

 ln -s DejaVuSans.ttf Sans.ttf

evas then uses the filename without the extension as font name. This
way there is no need for the fonts.alias and fonts.dir files.

Marc

-- 
 Marc Andre Tanner >< http://www.brain-dump.org/ >< GPG key: CF7D56C0

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to