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
- 43 Introductions
- 3.7K Typeface Design
- 803 Font Technology
- 1K Technique and Theory
- 622 Type Business
- 444 Type Design Critiques
- 542 Type Design Software
- 30 Punchcutting
- 136 Lettering and Calligraphy
- 83 Technique and Theory
- 53 Lettering Critiques
- 485 Typography
- 303 History of Typography
- 114 Education
- 68 Resources
- 499 Announcements
- 80 Events
- 105 Job Postings
- 148 Type Releases
- 165 Miscellaneous News
- 270 About TypeDrawers
- 53 TypeDrawers Announcements
- 116 Suggestions and Bug Reports