CVSROOT: /cvs/directfb
Module name: DirectFB
Changes by: dok 20060506 17:25:42
Modified files:
. : configure.in
include : directfb.h
interfaces/IDirectFBFont: idirectfbfont_ft2.c
lib/direct : tree.c tree.h
src/core : fonts.c fonts.h gfxcard.c gfxcard.h
src/display : idirectfbsurface.c idirectfbsurface.h
src/media : idirectfbfont.c idirectfbfont.h
Log message:
Welcome 0.9.26
Added support for other encodings than UTF8. Encodings are (or can be) provided
with each font implementation. This model reduces code sharing slightly, but
allows higher efficiency via optimized combination of decoding and translation.
Every encoding just has a name and an ID, where the name can be chosen freely,
except for DTEID_UTF8 which is always available and has the name "UTF8".
Added interface methods
- IDirectFBFont::EnumEncodings() enumerates all provided encodings.
- IDirectFBFont::FindEncoding() looks up an encoding directly by its name.
- IDirectFBFont::SetEncoding() for local methods and as a default for surfaces.
- IDirectFBSurface::SetEncoding() chooses an encoding for the text routines,
will be
overwritten by SetFont() which takes the default encoding of the new font.
Reworked all loops dealing with strings, characters and glyph information.
Implemented UTF8 and "Latin1" encoding in FT2 font loader. Nice demonstration
how
different encodings can be used, while still having a single glyph cache, which
is
no longer based on character codes, but on their raw indices.
---
Added dfb_font_register_encoding( id, name, funcs ) that is called by the font
module to register implementations. The 'id' can be DTEID_UTF8 or DTEID_OTHER,
where in the latter case the actual id will be allocated dynamically.
Added CoreEncodingFuncs only containing GetCharacterIndex() and DecodeText() to
do character to index translation and text decoding (including translation).
Other functions like GetGlyphInfo() or GetKerning() take raw indices instead
of unicode character codes now.
In the case of DTEID_UTF8 it's allowed in an implementation to
just provide GetCharacterIndex() and let the core do the DecodeText(),
but that would cause one GetCharacterIndex() call per decoded unicode
character. So implementing both functions is advisable.
If nothing is registered for DTEID_UTF8 at all, the core will
pass the raw unicode characters to GetGlyphInfo(), RenderGlyph() etc.
That's the old behaviour, fully compatible with old modules. It's
also a good choice if you want to avoid the character translation,
having an efficient font module which is based natively on unicode
characters only.
When registering an encoding implementation using DTEID_OTHER,
both GetCharacterIndex() and DecodeText() must be provided.
Added dfb_font_decode_character() to get the raw index of a single character
and dfb_font_decode_text() which decodes an encoded sequence of characters,
stores all their indices in the provided array and returns the amount.
Both functions have a parameter to select the encoding for the operation.
---
Changed DirectTree's fast key range from 32-128 to 0-128 as we are no longer
having ASCII values but zero based glyph indices.
Added some debug messages and domains, like Core/Font.
Cleanups.
_______________________________________________
directfb-cvs mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-cvs