FastDirectWrite consists of a lightweight C++17 native dynamic link library (fastdirectwrite.dll) and a Java 25 Foreign Function & Memory (FFM) library.
- Windows 10 / 11 (64-bit)
- Microsoft Visual Studio 2022+ (Community or Build Tools) with Desktop development with C++
- GraalVM JDK 25+ or Oracle JDK 25+ (Java 22+ with Foreign Function & Memory API)
- Apache Maven 3.9+
FastDirectWrite includes an automated batch script compile.bat that automatically discovers your Visual Studio MSVC environment:
cd FastDirectWrite
.\compile.batThe build script invokes MSVC cl.exe:
cl.exe /O2 /LD /EHsc /std:c++17 /W3 /DUNICODE /D_UNICODE ^
native\FastDirectWrite.cpp ^
/link /DLL /OUT:fastdirectwrite.dll user32.lib gdi32.lib dwrite.lib d2d1.lib ole32.libIt places the resulting fastdirectwrite.dll into:
./fastdirectwrite.dll(root)src/main/resources/native/fastdirectwrite.dll(packaged inside JAR)target/classes/native/fastdirectwrite.dll(immediate test runtime)
Build the JAR using Maven:
mvn clean package -DskipTestsStart the hardware-accelerated Windows 11 typography demo:
.\run-demo.bat