-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bitmap missing for glyph #8272
Comments
It is absolutely normal for FreeType to render a NULL-buffer without any errors returned. particularly for whitespace characters. The size of such bitmaps will also be 0x0, with advance properly assigned, however. |
The font is interesting indeed. The space character contains a degenerate contour of two points (0,0) and (0,1). So the output is NULL of size 0x1 (one raw of zero pixels each), i.e. I opened https://gitlab.freedesktop.org/freetype/freetype/-/issues/1295, if you have an opinion. |
If it is degenerate (https://lists.nongnu.org/archive/html/freetype-devel/2012-04/msg00068.html, "A degenerate contour is one that does not change the rendering if removed.") and I presume the size of the glyph doesn't affect the advance, then output makes no difference for rendering operations that use the same settings, right? |
What did you do?
Tried to call
ImageDraw.text((15, 36), "A B")
with the following font:FS Lola Medium Regular.zip
What did you expect to happen?
Either a successful call, since that font is rendered correctly on browsers and as a system font, or the usage of one of the 'unidentified characters' (□, �).
What actually happened?
Because of the whitespace, the call fails with a
OSError: Bitmap missing for glyph
exception onPIL/ImageFont.py:607
. I'm not exactly sure if there's any actual error with the font file, but as mentioned, it works fine on browsers and as a system font.What are your OS, Python and Pillow versions?
The text was updated successfully, but these errors were encountered: