-
Notifications
You must be signed in to change notification settings - Fork 38
bitmap_label issue with lowercase letters #129
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
Comments
The Maybe the target bitmap size is wrong? I'll take a look. |
I think there's something strange with the typeface that is making the BDF file strange to me. I actually tried regenerating it from a From your BDF file:
So, taking the maximum ascent as 15, the bitmap_label creates the bounding box size with a "top" height of 15. Now, when decoding the "d" glyph, the height of the glyph is Here's the section from BDF file for the "d" glyph (encoded as 0064). The
In looking at the typeface in fontforge, it looks like the ascenders are actually off the top. I only have rudimentary knowledge of using this tool, but it definitely looks strange to me. When I re-generated the BDF file of the same typeface with fontforge, now both the UpperCase and lowercase characters are larger than the "ASCENT" value. Here's a look at the "d" glyph: Here are some other characters that show it clipped off the top. Main issueSo, I think the issue is related to your BDF file, but it's unclear to me how the font can be generated where the ascent doesn't match the glyph size and baseline positioning. Now that we're expecting the "ASCENT" and "DESCENT" values to be accurate, the For reference, here's a diagram that defines the BDF glyph size and positioning from the BDF specification: |
Maybe this is a related existing issue with fontforge? |
Ok, I've got a proposal to clip the bitmap and give a warning. Give me a few minutes to "git-ify" it. |
I have discovered this example script (it's a trimmed down example from bitmap_font):
When the text has any lower case letters in it the bitmap_label will raise this exception:
The text with all upper case letters does render correctly however. label does not have the same issue, it will render both text versions fine.
I'm not sure what the root cause of this issue is, perhaps something odd within this specific font? The font is here
Tested on:
@kmatch98 I'm interested if you have any ideas about it this if you get a moment to check it out.
The text was updated successfully, but these errors were encountered: