diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-21 14:39:02 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-21 14:39:02 +0400 |
commit | 9a776daca8fa0aa9bfa22c0c4dd9b6e649acdb84 (patch) | |
tree | c8a7687986c108a138dd6144b87f2701074fbc93 /source/blender/blenlib | |
parent | 671e3df070c7868d8a5a445ebab5f819718270c4 (diff) |
code cleanup: vfont's used confusing and over complicated method of storing memory for loaded fonts, not store as a temp var in the fonts.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_vfontdata.h | 12 | ||||
-rw-r--r-- | source/blender/blenlib/intern/freetypefont.c | 13 |
2 files changed, 3 insertions, 22 deletions
diff --git a/source/blender/blenlib/BLI_vfontdata.h b/source/blender/blenlib/BLI_vfontdata.h index a63ec8e9f61..ed7d10ab257 100644 --- a/source/blender/blenlib/BLI_vfontdata.h +++ b/source/blender/blenlib/BLI_vfontdata.h @@ -39,14 +39,8 @@ struct PackedFile; struct VFont; -#define MAX_VF_CHARS 256 - typedef struct VFontData { 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; @@ -59,12 +53,6 @@ typedef struct VChar { float *points; } VChar; -struct TmpFont { - struct TmpFont *next, *prev; - struct PackedFile *pf; - struct VFont *vfont; -}; - /** * Construct a new VFontData structure from * Freetype font data in a PackedFile. diff --git a/source/blender/blenlib/intern/freetypefont.c b/source/blender/blenlib/intern/freetypefont.c index 60999e76c47..597a645eb9c 100644 --- a/source/blender/blenlib/intern/freetypefont.c +++ b/source/blender/blenlib/intern/freetypefont.c @@ -293,19 +293,12 @@ static int objchr_to_ftvfontdata(VFont *vfont, FT_ULong charcode) { /* Freetype2 */ FT_Face face; - struct TmpFont *tf; - - /* Find the correct FreeType font */ - tf = BKE_vfont_tmpfont_find(vfont); - - /* What, no font found. Something strange here */ - if (!tf) return FALSE; /* Load the font to memory */ - if (tf->pf) { + if (vfont->temp_pf) { err = FT_New_Memory_Face(library, - tf->pf->data, - tf->pf->size, + vfont->temp_pf->data, + vfont->temp_pf->size, 0, &face); if (err) return FALSE; |