[Bf-taskforce25] 2.5 progress, todos

Diego Hernan Borghetti bdiego at gmail.com
Fri Nov 28 06:56:54 CET 2008


On Wed, 26 Nov 2008, Ton Roosendaal wrote:

Hello all, here are a small report as how this is going:

> Hi,
>
> ...
>
> - bmfont/ftfont && translations/gettext: (Diego)
>   - full cleanup, unify, new module!

The new module is called blenfont, I already move ftfont
to it and compiled fine.

This module implement a generic font struct (FontBLF), this
struct is used in all the API, so we remove the BMF_/FTF_
mixed of function.

Second, every font is store in a global list, and this
list is used to shared the font for all the space, block,
button, etc, also every font have a reference count,
so we can track when the font is not need and unload/free.

The basic:
 	FontBLF *fn;

 	fn= BLF_load("name", FONT_TYPE_TEXTURE);

 	... work, work ...

 	BLF_destroy(fn);

The BLF_destroy function don't free the font, every font is
keep in the list (also if the reference is zero) until the
number of load font is bigger that the user settings (a
simple  cache).

So for example if we used the "notepad" font in the texteditor,
outliner, node, etc, we only have ONE font in memory and it's
shared in every place that we need it.

>   - bitmap font: just keep for while, no default
>   - texture font should be default
>   - new fixed width font for texteditor/filewindow
>   - new API for access, incl font type, sizes

The new API unify both type of fonts (BMF and FTF), every
function start with BLF:
 	BLF_draw_string
 	BLF_set_position
 	BLF_set_scale
 	BLF_get_string_bounding_box

All this function accept a FontBLF argument, so we used the
same API for all class of font.

>   - good support for UTF8/16?

I move all the language/locale/gettext/iconv code from the
blenfont module, to the interface/text.c, this still need
a full clenaup (this is the next step, first blenfont and
start from there).

>   - support for text-style icons (arrows, dots, decorations)
>

.. So, my plan is finish tomorrow with the bitmap font (remove
the bmfont module), and move to the UI code ... and also docs!!

> ...
>
> -Ton-
>
> ------------------------------------------------------------------------
> Ton Roosendaal  Blender Foundation   ton at blender.org    www.blender.org
> Blender Institute BV  Entrepotdok 57A  1018AD Amsterdam The Netherlands
>
> _______________________________________________
> Bf-taskforce25 mailing list
> Bf-taskforce25 at blender.org
> http://lists.blender.org/mailman/listinfo/bf-taskforce25
>

-- 
 			Diego


More information about the Bf-taskforce25 mailing list