From 98bd4615b55bc66410764178148d91409bbf9ee1 Mon Sep 17 00:00:00 2001 From: Alexander Ewering Date: Wed, 14 Sep 2005 14:02:21 +0000 Subject: On behalf of Mika Saari, the famous Unicode Font support! Further information is available here: http://wiki.blender.org/bin/view.pl/Blenderdev/UnicodeFont3D Shortlist of features: - Unicode character support for Font3D - UI to select characters from Unicode character list - UI to select Unicode table areas - Optimized character loading (Load only those characters which are used in font object) Please test extensively if it breaks anything, try also loading/saving files, packing fonts, etc. The official text regression file in the regression suite should be a good start. Thanks to mikasaari for this very useful addition! --- source/blender/blenlib/BLI_vfontdata.h | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) (limited to 'source/blender/blenlib/BLI_vfontdata.h') diff --git a/source/blender/blenlib/BLI_vfontdata.h b/source/blender/blenlib/BLI_vfontdata.h index 516bfb15f3f..1ebcd80b22b 100644 --- a/source/blender/blenlib/BLI_vfontdata.h +++ b/source/blender/blenlib/BLI_vfontdata.h @@ -41,17 +41,36 @@ #include "DNA_listBase.h" struct PackedFile; +struct VFont; #define MAX_VF_CHARS 256 typedef struct VFontData { - ListBase nurbsbase[MAX_VF_CHARS]; - float resol[MAX_VF_CHARS]; - float width[MAX_VF_CHARS]; - float *points[MAX_VF_CHARS]; - char name[128]; + ListBase characters; + // ListBase nurbsbase[MAX_VF_CHARS]; + // float resol[MAX_VF_CHARS]; + // float width[MAX_VF_CHARS]; + // float *points[MAX_VF_CHARS]; + char name[128]; } VFontData; +typedef struct VChar { + struct VChar *next, *prev; + ListBase nurbsbase; + unsigned long index; + float resol; + float width; + float *points; +} VChar; + +struct TmpFont +{ + struct TmpFont *next, *prev; + struct PackedFile *pf; + struct VFont *vfont; +}; + + /** * Construct a new VFontData structure from * PostScript font data in a PackedFile. @@ -75,5 +94,10 @@ BLI_vfontdata_from_psfont( VFontData* BLI_vfontdata_from_freetypefont( struct PackedFile *pf); + + int +BLI_vfontchar_from_freetypefont( + struct VFont *vfont, unsigned long character); + #endif -- cgit v1.2.3