DirectWrite is a text layout and glyph rendering
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
by
Microsoft
Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
. It was designed to replace
GDI/GDI+ and
Uniscribe for screen-oriented rendering and was first shipped with
Windows 7
Windows 7 is a major release of the Windows NT operating system developed by Microsoft. It was Software release life cycle#Release to manufacturing (RTM), released to manufacturing on July 22, 2009, and became generally available on October 22, ...
and
Windows Server 2008 R2, as well as
Windows Vista
Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, released five years earlier, which was then the longest time span between successive releases of Microsoft W ...
and
Windows Server 2008 (with
Platform Update installed). DirectWrite is
hardware-accelerated (using the
GPU) when running on top of
Direct2D, but can also use the CPU to render on any target, including a
GDI bitmap.
Features
* Comprehensive support for
Unicode
Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
, with over 20 scripts providing layout and rendering of every language supported in Windows. DirectWrite supports measuring, drawing, and
hit-testing of multi-format text. Supported Unicode features include
BIDI, line breaking, surrogates, UVS, language-guided script itemization, number substitution, and glyph shaping.
* Sub-pixel
ClearType text rendering with bi-directional
antialiasing which can interoperate with GDI/GDI+,
Direct2D/
Direct3D and any application-specific technology. When using with Direct2D, text rendering can be hardware-accelerated or can use
WARP software rasterizer when hardware acceleration is not available.
* Supports advanced typographic features of
OpenType, such as stylistic alternates and
swashes, which were never supported in GDI and
WinForms. These features were demoed at DirectWrite's launch (at
PDC2008) using the
Gabriola font, itself also introduced with Windows 7.
* Provides a low-level glyph rendering API for those who employ proprietary text layout and Unicode-to-glyph processing.
In
Windows 8.1, DirectWrite gained support for
color fonts.
DWriteCore
DWriteCore is the
Windows App SDK (Project Reunion) implementation of DirectWrite that runs on versions of Windows down to Windows 10, version 1809 (10.0; Build 17763), and opens the door for cross-platform usage.
Uses
The
XPS viewer in Windows 7 uses DirectWrite, but it renders the output on a GDI+ surface.
Internet Explorer 9 and later versions use DirectWrite layered over Direct2D for improved visual quality and performance. Firefox 4 also added DirectWrite support, but rendering in the DirectWrite specific style was made non-default for some fonts in Firefox 7 due to user complaints about the rendering quality.
Microsoft Office 2013 supports either Direct2D/DirectWrite or GDI/Uniscribe for display rendering and typography.
Google Chrome
Google Chrome is a web browser developed by Google. It was first released in 2008 for Microsoft Windows, built with free software components from Apple WebKit and Mozilla Firefox. Versions were later released for Linux, macOS, iOS, iPadOS, an ...
in Windows supports DirectWrite starting from version 37.
Microsoft Edge
Microsoft Edge is a Proprietary Software, proprietary cross-platform software, cross-platform web browser created by Microsoft and based on the Chromium (web browser), Chromium open-source project, superseding Edge Legacy. In Windows 11, Edge ...
with
Chromium
Chromium is a chemical element; it has Symbol (chemistry), symbol Cr and atomic number 24. It is the first element in Group 6 element, group 6. It is a steely-grey, Luster (mineralogy), lustrous, hard, and brittle transition metal.
Chromium ...
engine also supports DirectWrite and use it by default.
[https://blogs.windows.com/msedgedev/2021/06/02/improving-font-rendering-in-microsoft-edge/]
Telegram
Telegraphy is the long-distance transmission of messages where the sender uses symbolic codes, known to the recipient, rather than a physical exchange of an object bearing the message. Thus flag semaphore is a method of telegraphy, whereas pi ...
's desktop client uses DirectWrite to render color emojis on Windows.
Steam
Steam is water vapor, often mixed with air or an aerosol of liquid water droplets. This may occur due to evaporation or due to boiling, where heat is applied until water reaches the enthalpy of vaporization. Saturated or superheated steam is inv ...
has the option to enable DirectWrite for improved font smoothing and kerning on its desktop client
See also
*
Pango: a cross platform library for rendering text in high quality, emphasising support for multilingual text.
*
Cairo
Cairo ( ; , ) is the Capital city, capital and largest city of Egypt and the Cairo Governorate, being home to more than 10 million people. It is also part of the List of urban agglomerations in Africa, largest urban agglomeration in Africa, L ...
: a vector-based cross platform graphics library that can render text.
References
{{Microsoft APIs
Text rendering libraries
DirectX