Windows blackbox bug?

thehorseisbrown
Posts: 3

Hello,
I initially posted this at stackoverflow and github but was advised that this might be a better place:
The problem is that values gmBlackBoxX and gmBlackBoxY are supposed to give the dimensions of the rectangle enclosing the glyph. It seems like they are calculated before the hinting process takes place and this is a bug. Maybe you guys can tell me if it's something else.
Thanks
0
Comments
-
Perhaps your rendering is using some later text rendering API, but the call you are using to get the bounding box is assuming GDI?
Background: Windows has a ton of different rendering modes. Seems like the GLYPHMETRICS structure is a basic Win32 API listed here: https://docs.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-glyphmetrics
This call exists in Windows 2000, which tells me that it is very old stuff. Certainly not part of any modern rendering stack. I imagine it must assume GDI rendering.
Windows has several text modes, introduced over the years.- GDI without or without antialiasing (Windows 3.1 and later)
- GDI+ does same basic text rendering as GDI, I think?
- GDI ClearType (Windows XP and later): color subpixels in X, no anti-aliasing in Y
- WPF ClearType (Windows Vista and later): color subpixels in X, anti-aliasing in Y
- DirectWrite ClearType (Windows 8 and later): super-sampling (sub-pixel rendering) in X and Y, no color subpixels—arguably not really ClearType at all
0 -
You are right, I used the simplest thing I could find: DrawText() in GDI. I will most likely use DirectWrite and forget about these colored edges. You saved me a lot of time since I was about to try and fix ClearType's background sensitivity. Thank you so much!0
Categories
- All Categories
- 46 Introductions
- 3.8K Typeface Design
- 475 Type Design Critiques
- 555 Type Design Software
- 1.1K Type Design Technique & Theory
- 640 Type Business
- 830 Font Technology
- 29 Punchcutting
- 507 Typography
- 120 Type Education
- 313 Type History
- 74 Type Resources
- 109 Lettering and Calligraphy
- 30 Lettering Critiques
- 79 Lettering Technique & Theory
- 529 Announcements
- 84 Events
- 110 Job Postings
- 165 Type Releases
- 169 Miscellaneous News
- 274 About TypeDrawers
- 54 TypeDrawers Announcements
- 118 Suggestions and Bug Reports