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
- 479 Type Design Critiques
- 558 Type Design Software
- 1.1K Type Design Technique & Theory
- 646 Type Business
- 836 Font Technology
- 29 Punchcutting
- 512 Typography
- 119 Type Education
- 318 Type History
- 75 Type Resources
- 110 Lettering and Calligraphy
- 31 Lettering Critiques
- 79 Lettering Technique & Theory
- 540 Announcements
- 88 Events
- 112 Job Postings
- 168 Type Releases
- 171 Miscellaneous News
- 274 About TypeDrawers
- 53 TypeDrawers Announcements
- 119 Suggestions and Bug Reports