Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/intern/freetypefont.c')
-rw-r--r--source/blender/blenlib/intern/freetypefont.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/blenlib/intern/freetypefont.c b/source/blender/blenlib/intern/freetypefont.c
index 3a0d44db12e..8fe081fe70b 100644
--- a/source/blender/blenlib/intern/freetypefont.c
+++ b/source/blender/blenlib/intern/freetypefont.c
@@ -322,13 +322,13 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf)
const char *fontname;
VFontData *vfd;
-/*
+#if 0
FT_CharMap found = 0;
FT_CharMap charmap;
FT_UShort my_platform_id = TT_PLATFORM_MICROSOFT;
FT_UShort my_encoding_id = TT_MS_ID_UNICODE_CS;
int n;
-*/
+#endif
// load the freetype font
err = FT_New_Memory_Face( library,
@@ -338,7 +338,8 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf)
&face );
if(err) return NULL;
-/*
+
+#if 0
for ( n = 0; n < face->num_charmaps; n++ )
{
charmap = face->charmaps[n];
@@ -355,7 +356,7 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf)
// now, select the charmap for the face object
err = FT_Set_Charmap( face, found );
if ( err ) { return NULL; }
-*/
+#endif
// allocate blender font
vfd= MEM_callocN(sizeof(*vfd), "FTVFontData");
@@ -416,13 +417,13 @@ static int check_freetypefont(PackedFile * pf)
FT_Face face;
FT_GlyphSlot glyph;
FT_UInt glyph_index;
-/*
+#if 0
FT_CharMap charmap;
FT_CharMap found;
FT_UShort my_platform_id = TT_PLATFORM_MICROSOFT;
FT_UShort my_encoding_id = TT_MS_ID_UNICODE_CS;
int n;
-*/
+#endif
int success = 0;
err = FT_New_Memory_Face( library,
@@ -435,24 +436,23 @@ static int check_freetypefont(PackedFile * pf)
//XXX error("This is not a valid font");
}
else {
-/*
- for ( n = 0; n < face->num_charmaps; n++ )
- {
- charmap = face->charmaps[n];
- if ( charmap->platform_id == my_platform_id &&
- charmap->encoding_id == my_encoding_id )
- {
- found = charmap;
- break;
- }
+
+#if 0
+ for ( n = 0; n < face->num_charmaps; n++) {
+ charmap = face->charmaps[n];
+ if (charmap->platform_id == my_platform_id && charmap->encoding_id == my_encoding_id) {
+ found = charmap;
+ break;
+ }
}
- if ( !found ) { return 0; }
+ if (!found ) { return 0; }
// now, select the charmap for the face object
err = FT_Set_Charmap( face, found );
if ( err ) { return 0; }
-*/
+#endif
+
glyph_index = FT_Get_Char_Index( face, 'A' );
err = FT_Load_Glyph(face, glyph_index, FT_LOAD_NO_SCALE | FT_LOAD_NO_BITMAP);
if(err) success = 0;