After adding font classes configuration I needed to add the font fallbacks configuration to be complete.
It was a struggle to get a good looking UI. I think this looks good now. I think later the "Move Up" and "Move Down" buttons should be replaced with Drag n' Drop.
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.
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.
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.
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.
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 <- BEGIN
REPLY: DEFAULT TEXT_CLASS="menu_item" NAME="Sans" SIZE=9
REPLY: DEFAULT TEXT_CLASS="move_text" NAME="monospace" SIZE=12
REPLY: DEFAULT TEXT_CLASS="resize_text" NAME="monospace" SIZE=12
REPLY: DEFAULT TEXT_CLASS="title_bar" NAME="Serif" SIZE=12
REPLY: DEFAULT TEXT_CLASS="default" NAME="Serif" SIZE=12
REPLY <- END
[shorne@Asus themes]$ enlightenment_remote -font-fallback-list
REPLY <- BEGIN
REPLY <- END