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.
This commit is contained in:
2003-04-28 21:16:27 +00:00
parent 597875cb69
commit d4f9678b39
3 changed files with 467 additions and 1 deletions

View File

@@ -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);