Adjust letter/character spacing in DirectWrite
-
28-04-2021 - |
سؤال
I'm using DirectWrite. How do I adjust overall letter spacing? I think I want the equivalent of SetTextCharacterExtra in GDI.
المحلول
The built-in layout has IDWriteTextLayout1::SetCharacterSpacing on Windows 8. For Windows 7, you would need to use the lower level layers and create your own text layout (which is no small task, but it would allow complete flexibility to add any additional layout features). A base example of a custom layout is here: http://msdn.microsoft.com/en-us/library/windows/desktop/dd941711(v=vs.85).aspx
لا تنتمي إلى StackOverflow