You can see MSDN : Text Rendering with Direct2D and DirectWrite
I had also uploaded a test in WinU 3 for some basic animation effects that can be done in DirectWrite (DWriteCore) : WinUI3_SwapChainPanel_DWriteCore
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
there is DrawTextW in d2d1 and DWrite can also draw text.
what is the difference?
You can see MSDN : Text Rendering with Direct2D and DirectWrite
I had also uploaded a test in WinU 3 for some basic animation effects that can be done in DirectWrite (DWriteCore) : WinUI3_SwapChainPanel_DWriteCore
There are several differences:
Use Direct2D's DrawTextW for simple, quick text rendering.
Use DirectWrite for advanced text layouts, complex scripts, or when you need fine-grained control over typography and rendering...
DrawTextW is mostly CPU-based while DirectWrite is GPU-accelerated.
DrawTextW has a basic Unicode support while DirectWrite has full supprt.
Font support is limited in DrawTextW but DirectWrite has advanced Font support.
HiDPI Support is excellent in DirectWrite.