diff options
author | Alexander Ewering <blender@instinctive.de> | 2005-09-14 18:02:21 +0400 |
---|---|---|
committer | Alexander Ewering <blender@instinctive.de> | 2005-09-14 18:02:21 +0400 |
commit | 98bd4615b55bc66410764178148d91409bbf9ee1 (patch) | |
tree | 45e09576bdd916a2e1458abee75ccf7cd33c5a3a /source/blender/blenlib/BLI_vfontdata.h | |
parent | 2cb24cefb2652870a457104d4f3ce6802ef9e16c (diff) |
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!
Diffstat (limited to 'source/blender/blenlib/BLI_vfontdata.h')
-rw-r--r-- | source/blender/blenlib/BLI_vfontdata.h | 34 |
1 files changed, 29 insertions, 5 deletions
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 |