The "GdiInterop" is a sample application (source code is avaiable in [Github][source_code], relative guide in [MSDN][msdn_guide]) that demostracts how to display DirectWrite text on a GDI surface. After set dpi to 168 in `winecfg`, and run sample application with wine, the font size is normal, but the position of glyph is incorrect.
| Dpi: 96 | Dpi: 168 | |:----------------:|:-----------------:| | ![ss1][sc_96dpi] | ![ss2][sc_168dpi] |
There is the sample application after compile: [Release_x64.tar.gz](/uploads/c70e32824efcaa5d16ab39bbb4b86e30/Release_x64.tar.gz)
After change transform matrix that pass to `IDWriteFactory7_CreateGlyphRunAnalysis`, it can display glyph correctly.
[source_code]: https://github.com/microsoft/Windows-classic-samples/blob/main/Samples/Win7S... [msdn_guide]: https://learn.microsoft.com/en-us/windows/win32/directwrite/render-to-a-gdi-... [sc_96dpi]: /uploads/59cc343cfaa025f4ff4c32a84ab8cfeb/图片.png [sc_168dpi]: /uploads/938be653362bb6ac58471b69ab66099a/图片.png
-- v5: dwrite: Fix incorrect position of glyph when rendering with BitmapRenderTarget in HiDPI dwrite: Return render bounds if text not intersect to BitmapRenderTarget