shorne in japan

blog about contact

Font Configuration

01 Apr 2006

Well, sick and tired of e_remote I decided I better try my way with config dialogs. So I started to work on a font config dialog. I also need to do Path config and Language config.



Text Classes for Edje Textblock - Working

25 Mar 2006

While edev CVS has been down I got the edje textblock to accept text_classes in the style tags. This is needed so that textblocks can use fontconfig font famlies. This also allows us to configure textblock fonts on the fly.

This code right now is solid but it could use a touch of optimization. Currently the styles are recalculated whenever an edje is loaded. This is a problem because the edjes are loaded all of the time. I hope raster can give me some ideas on this once CVS comes back online.


The screenshot says it all.


Edje Text Classes for Textblock

21 Mar 2006

Now that fontconfig is in and working well we need a way to configure fonts in Edje Textblocks. Currently the fonts for text blocks are configured using the text block styles. Styles defined by a "base" style and may have multiple "tag" additions. The following is a simple style.

style {
name: "about_style";
base: "font=Edje-Vera font_size=10 align=center";
tag:  "br" "n";
tag:  "hilight" "+ font=Edje-Vera-Bold";

The style strings are sent to evas after being parsed and fixed by edje. In order to allow text classes to be used correctly we need a way to define text classes for both the base and tag styles seperately.

I am working on adding a new, edje specific, parameter to the style string called "edje_text_style". The parameter will be parsed out before passing the style to the evas_textblock.

The text classes for textblocks will be shared with those for evas text objects. I must make sure that when text classes are updated changes are only made to the textblocks which use the changed class.

Evas Has Fontconfig Support!

19 Mar 2006

After my last post I was pretty clear on how evas font searching worked and how it could benefit from FontConfig. So, I knuckled down and put the fontconfig code into evas.

After initial testing in E17 I was disappointed to find that edje text classes were broken. The problem was that whenever a reference to an edje would be given up (when removing a border) all of the text classes would be wiped out. I found a problem with this and seem to have fixed it. The latest changes are in CVS.

Now, E17 does not have to install anyfont. This is good because now we don't have to install and package CJK fonts, which was an issue we have been working on for a long time. Of course, the old methods of font loading are still working as always.

My Font Setup

[shorne@Asus themes]$ enlightenment_remote -font-default-list
REPLY: DEFAULT TEXT_CLASS="move_text" NAME="monospace" SIZE=12
REPLY: DEFAULT TEXT_CLASS="resize_text" NAME="monospace" SIZE=12

[shorne@Asus themes]$ enlightenment_remote -font-fallback-list


E17 Fonts II

18 Mar 2006

I have started to learn a bit more about evas fonts. Actually, evas loads fonts using a name such as "Vera". If font fallbacks are wanted in evas they are encoded into the font name, like "fonts/Edje Vera Bold,ZYSong,Kochi-Gothic,Baekmuk-Dotum". The font configuration interface is just the evas_object_text interface. Fonts are found by name in the Evas font path. The evas font path is setup using evas_font_path_append. So, evas does not use the font file name to load fonts at the evas API level.

As I stated before, I am working on getting fontconfig to work in the EFL. Previously I made an error saying evas loads fonts using the font filename and that edje and ecore need to be exxtended. This is not true, evas implements the higher level font interface, only evas needs to be extended. Later, edje will have to be aware that evas supports fontconfig, this way edje could bypass having to setup font paths and font sources if desired.

New Plan

My thoughts now, as advised by raster, are to add fontconfig directly into evas. This will of course be a compile time option via configure. The evas api will not change. However, evas fonts will be easier to use. If using fontconfig there will be no need to setup the Evas font path. Also, there will be no need to send a complete fallback list to the evas_object_text. This will be handled by fontconfig.