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
- 47 Introductions
- 4K Typeface Design
- 495 Type Design Critiques
- 577 Type Design Software
- 1.1K Type Design Technique & Theory
- 670 Type Business
- 885 Font Technology
- 29 Punchcutting
- 539 Typography
- 125 Type Education
- 333 Type History
- 81 Type Resources
- 113 Lettering and Calligraphy
- 33 Lettering Critiques
- 80 Lettering Technique & Theory
- 569 Announcements
- 100 Events
- 116 Job Postings
- 170 Type Releases
- 182 Miscellaneous News
- 270 About TypeDrawers
- 54 TypeDrawers Announcements
- 114 Suggestions and Bug Reports
