diff options
author | Rob Haarsma <phaseIV@zonnet.nl> | 2003-04-29 01:16:27 +0400 |
---|---|---|
committer | Rob Haarsma <phaseIV@zonnet.nl> | 2003-04-29 01:16:27 +0400 |
commit | d4f9678b3939a3b480005fee3b82ad8843de51e0 (patch) | |
tree | 3238f765dd57a251d9b0243d28f940e729f2fa77 /source/blender/blenkernel/intern/font.c | |
parent | 597875cb6902dfac5a82a30e2c8ab09c3d743228 (diff) |
Added a 3D font loader that uses the Freetype2 library to
parse the vector data. Freetype2 supports many font formats
including Type1, TrueType and OpenType fonts.
Enable with the WITH_FREETYPE2 compile flag, in the
source/blender/blenkernel and source/blender/blenlib dirs.
Diffstat (limited to 'source/blender/blenkernel/intern/font.c')
-rw-r--r-- | source/blender/blenkernel/intern/font.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 5ea20224fb7..62463ef1307 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -145,8 +145,11 @@ static VFontData *vfont_get_data(VFont *vfont) } if (pf) { +#ifdef WITH_FREETYPE2 + vfont->data= BLI_vfontdata_from_freetypefont(pf); +#else vfont->data= BLI_vfontdata_from_psfont(pf); - +#endif if (pf != vfont->packedfile) { freePackedFile(pf); } @@ -183,7 +186,11 @@ VFont *load_vfont(char *name) waitcursor(1); +#ifdef WITH_FREETYPE2 + vfd= BLI_vfontdata_from_freetypefont(pf); +#else vfd= BLI_vfontdata_from_psfont(pf); +#endif if (vfd) { vfont = alloc_libblock(&G.main->vfont, ID_VF, filename); |