From 41216d5ad4c722e2ad9f15c968af454fc7566d5e Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Thu, 18 Oct 2018 15:43:06 +0200 Subject: Cleanup: Remove more #if 0 blocks Continuation of https://developer.blender.org/D3802 Reviewers: brecht Differential Revision: https://developer.blender.org/D3808 --- source/blender/blenlib/intern/freetypefont.c | 67 ---------------------------- 1 file changed, 67 deletions(-) (limited to 'source/blender/blenlib/intern/freetypefont.c') diff --git a/source/blender/blenlib/intern/freetypefont.c b/source/blender/blenlib/intern/freetypefont.c index 9045012af00..0bed7d42e9f 100644 --- a/source/blender/blenlib/intern/freetypefont.c +++ b/source/blender/blenlib/intern/freetypefont.c @@ -291,14 +291,6 @@ 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, pf->data, @@ -308,25 +300,6 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile *pf) if (err) return NULL; -#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 NULL; } - - /* 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"); @@ -410,13 +383,6 @@ 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, @@ -429,23 +395,6 @@ static int check_freetypefont(PackedFile *pf) //XXX error("This is not a valid font"); } else { - -#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; } - - /* 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) { @@ -550,22 +499,6 @@ VChar *BLI_vfontchar_copy(const VChar *vchar_src, const int UNUSED(flag)) return vchar_dst; } -#if 0 - -/* Freetype2 Outline struct */ - -typedef struct FT_Outline_ { - short n_contours; /* number of contours in glyph */ - short n_points; /* number of points in the glyph */ - - FT_Vector *points; /* the outline's points */ - char *tags; /* the points flags */ - short *contours; /* the contour end points */ - - int flags; /* outline masks */ -} FT_Outline; - -#endif /* * from: http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-1 -- cgit v1.2.3