mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
rearranged comments
This commit is contained in:
parent
8cb58bbd72
commit
8b7b297aba
18
_imagingft.c
18
_imagingft.c
|
@ -18,17 +18,6 @@
|
||||||
* Copyright (c) 1998-2007 by Secret Labs AB
|
* Copyright (c) 1998-2007 by Secret Labs AB
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
* Notes:
|
|
||||||
* Currently, embedded bitmap fonts within truetype fonts do not work
|
|
||||||
* properly (see issue #891), truetype fonts are loaded with
|
|
||||||
* FT_LOAD_NO_BITMAP load flags, resulting in embedded bitmap fonts
|
|
||||||
* not being used.
|
|
||||||
*
|
|
||||||
* Yifu Yu<root@jackyyf.com>
|
|
||||||
* 2014-10-15
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "Imaging.h"
|
#include "Imaging.h"
|
||||||
|
|
||||||
|
@ -254,6 +243,10 @@ font_getsize(FontObject* self, PyObject* args)
|
||||||
&delta);
|
&delta);
|
||||||
x += delta.x;
|
x += delta.x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Note: bitmap fonts within ttf fonts do not work, see #891/pr#960
|
||||||
|
* Yifu Yu<root@jackyyf.com>, 2014-10-15
|
||||||
|
*/
|
||||||
error = FT_Load_Glyph(face, index, FT_LOAD_DEFAULT|FT_LOAD_NO_BITMAP);
|
error = FT_Load_Glyph(face, index, FT_LOAD_DEFAULT|FT_LOAD_NO_BITMAP);
|
||||||
if (error)
|
if (error)
|
||||||
return geterror(error);
|
return geterror(error);
|
||||||
|
@ -327,6 +320,7 @@ font_getabc(FontObject* self, PyObject* args)
|
||||||
int index, error;
|
int index, error;
|
||||||
face = self->face;
|
face = self->face;
|
||||||
index = FT_Get_Char_Index(face, ch);
|
index = FT_Get_Char_Index(face, ch);
|
||||||
|
/* Note: bitmap fonts within ttf fonts do not work, see #891/pr#960 */
|
||||||
error = FT_Load_Glyph(face, index, FT_LOAD_DEFAULT|FT_LOAD_NO_BITMAP);
|
error = FT_Load_Glyph(face, index, FT_LOAD_DEFAULT|FT_LOAD_NO_BITMAP);
|
||||||
if (error)
|
if (error)
|
||||||
return geterror(error);
|
return geterror(error);
|
||||||
|
@ -374,7 +368,7 @@ font_render(FontObject* self, PyObject* args)
|
||||||
}
|
}
|
||||||
|
|
||||||
im = (Imaging) id;
|
im = (Imaging) id;
|
||||||
|
/* Note: bitmap fonts within ttf fonts do not work, see #891/pr#960 */
|
||||||
load_flags = FT_LOAD_RENDER|FT_LOAD_NO_BITMAP;
|
load_flags = FT_LOAD_RENDER|FT_LOAD_NO_BITMAP;
|
||||||
if (mask)
|
if (mask)
|
||||||
load_flags |= FT_LOAD_TARGET_MONO;
|
load_flags |= FT_LOAD_TARGET_MONO;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user