mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-03 19:33:07 +03:00
Employ same condition used to set glyph
This commit is contained in:
parent
2694564d08
commit
a2225ae961
|
@ -791,7 +791,7 @@ font_render(FontObject* self, PyObject* args)
|
||||||
int index, error, ascender, horizontal_dir;
|
int index, error, ascender, horizontal_dir;
|
||||||
int load_flags;
|
int load_flags;
|
||||||
unsigned char *source;
|
unsigned char *source;
|
||||||
FT_Glyph glyph = NULL;
|
FT_Glyph glyph;
|
||||||
FT_GlyphSlot glyph_slot;
|
FT_GlyphSlot glyph_slot;
|
||||||
FT_Bitmap bitmap;
|
FT_Bitmap bitmap;
|
||||||
FT_BitmapGlyph bitmap_glyph;
|
FT_BitmapGlyph bitmap_glyph;
|
||||||
|
@ -951,9 +951,8 @@ font_render(FontObject* self, PyObject* args)
|
||||||
}
|
}
|
||||||
x += glyph_info[i].x_advance;
|
x += glyph_info[i].x_advance;
|
||||||
y -= glyph_info[i].y_advance;
|
y -= glyph_info[i].y_advance;
|
||||||
if (glyph != NULL) {
|
if (stroker != NULL) {
|
||||||
FT_Done_Glyph(glyph);
|
FT_Done_Glyph(glyph);
|
||||||
glyph = NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user