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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user