Proposal: DWriteCore - Cross-platform and Down-level DirectWrite
Summary
DWriteCore is the Project Reunion version of DirectWrite (DWrite), the text rendering and layout component that ships in the Windows SDK. DWrite supports a rich array of features that make it the font rendering tool of choice on Windows for most apps, either through direct calls or via Direct2D, including a device-independent text layout system, high quality sub-pixel ClearType text rendering, hardware-accelerated text, multi-format text, advanced OpenType typography features, wide language support, and GDI-compatible layout and rendering. It has been available since Windows Vista SP2 and has evolved over the years to include more advanced features such as variable fonts, which enables developers to apply styles, weights, and other attributes to a font with only one font resource.
Due to the long lifespan of this component, however, older versions of Windows are left behind with new development. In addition, DWrite’s status as the premier text rendering technology is limited only to Windows, leaving cross-platform applications to either write their own text rendering stack or rely on 3rd party solutions.
DWriteCore aims to solve the core problems of version feature orphaning and cross-platform compatibility by removing the library from the system and targeting all possible supported endpoints. To this end, we are integrating DWriteCore into Project Reunion with a public API that lights up all Windows endpoints down to Windows 8 and opens the door for developers to use it cross platform.
Demo
DWriteCore will be demonstrated with a FontViewer app available to developers, which will expand to add functionality as features are ported from system DWrite to DWriteCore.
Rationale
The primary value DWriteCore gives developers in Project Reunion is that it provides access to all current DWrite features to developers all the way down-level to Windows 8. All features of DwriteCore will function the same on all down-level versions; in other words, all current features will work on Windows 8, 8.1, and all versions of Windows 10 without any disparity regarding which features might work on which versions.
Staging plan
Porting system DWrite to DWrite core is a sufficiently large project to span multiple Windows release cycles. At the time of this proposal, it is divided into four Phases, each of which correspond to a chunk of functionality delivered in a release.
Disclaimer
DWriteCore is under active development by the Microsoft developer platform team and the roadmap will continue to evolve based on market changes and customer feedback, so please note that the plans outlined here aren't exhaustive or guaranteed.
Phase 1: Foundation
Phase 1 includes the basic tools a developer needs to consume DWriteCore, including:
- Font enumeration
- Font API
- Shaping
- Low-level rendering APIs (partial – does not use D2D yet but can use IDWriteGlyphRunAnalysis and IDWriteBitmapRenderTarget)
- Basic text layout functionality
With these features, developers can immediately begin to harness some of DWrite’s modern core functionality such as variable fonts down level to Windows 8. This iteration of the library can also be consumed on Android, currently being tested internally. Variable fonts are one of the most important features for DWrite customers; they were introduced in Windows 10 RS3, so accessing them in previous versions is a massive boon to developers.
This phase is complete at the time of this proposal.
Phase 2: Text Rendering and Color Fonts
Phase 2 fleshes out the text rendering aspect of DWrite:
- Text rendering APIs
- Finish bitmap render target
- Color fonts
- Miscellaneous gaps (font cache cleanup, in-memory font loader, etc.)
The banner feature for Phase 2 is color fonts. Color fonts enable developers to render their fonts with more sophisticated color functionality beyond simple single colors; for example, it is what powers the ability to render emoji and toolbar icon fonts (the latter of which is used by Office, for example). Previously, color fonts were first introduced in Windows 8.1 but were heavily expanded upon in the Windows 10 Anniversary Update.
In addition, users should see memory improvements via cleanup of the font cache, and an in-memory font loader allows for faster loading of fonts.
Phase 2 is currently under development at the time of this proposal and is estimated to arrive in Q4 2020.
Phase 3: Text Layout
Phase 3 focuses on bringing DWrite’s powerful layout features to developers:
- Advanced text layout features (e.g. vertical text)
- GDI-compatible layout
- Spacing and justification
- Finish text layout API
Vertical text is particularly important to Far East font users and should open up the audience for DWriteCore developers to these target demographics. The line spacing feature, which allows developers finer grain control over line spacing based on the largest or smallest characters in a glyph run, is also introduced here, which was not developed until Windows 10 Threshold (1511).
Phase 3 is estimated to arrive in Q1 2021.
Phase 4: Font streaming and languages
Phase 4 rounds out the DWriteCore feature set:
- Font streaming (downloadable fonts, remote font file loader, etc.)
- Additional languages
- CFF rasterizer support
Font streaming was introduced in the initial release of Windows 10; it allows users to download fonts on demand as needed, to save disk space. Expanded language support will open up DWriteCore to a wider variety of languages, and the CFF rasterizer is an important rasterizer alternative to TrueType.
Phase 4 is estimated to arrive in Q2 2021.
Invitation to DWrite Developers
DWriteCore, along with other Project Reunion components, will be developed with visibility into current work and openness to developer feedback. Once the project has migrated to GitHub, we invite developers to begin consuming DWriteCore packages and provide insights or requests into feature development.
We will update this section after the repo and demo links become available.
Scope
| Capability |
Priority |
| This proposal will allow developers to take advantage of all current and future DWrite features down level to Windows 8 |
Must |
| This proposal will allow developers to consume DWrite cross platform, currently targeting iOS, Android, and Mac |
Must |
Proposal: DWriteCore - Cross-platform and Down-level DirectWrite
Summary
DWriteCore is the Project Reunion version of DirectWrite (DWrite), the text rendering and layout component that ships in the Windows SDK. DWrite supports a rich array of features that make it the font rendering tool of choice on Windows for most apps, either through direct calls or via Direct2D, including a device-independent text layout system, high quality sub-pixel ClearType text rendering, hardware-accelerated text, multi-format text, advanced OpenType typography features, wide language support, and GDI-compatible layout and rendering. It has been available since Windows Vista SP2 and has evolved over the years to include more advanced features such as variable fonts, which enables developers to apply styles, weights, and other attributes to a font with only one font resource.
Due to the long lifespan of this component, however, older versions of Windows are left behind with new development. In addition, DWrite’s status as the premier text rendering technology is limited only to Windows, leaving cross-platform applications to either write their own text rendering stack or rely on 3rd party solutions.
DWriteCore aims to solve the core problems of version feature orphaning and cross-platform compatibility by removing the library from the system and targeting all possible supported endpoints. To this end, we are integrating DWriteCore into Project Reunion with a public API that lights up all Windows endpoints down to Windows 8 and opens the door for developers to use it cross platform.
Demo
DWriteCore will be demonstrated with a FontViewer app available to developers, which will expand to add functionality as features are ported from system DWrite to DWriteCore.
Rationale
The primary value DWriteCore gives developers in Project Reunion is that it provides access to all current DWrite features to developers all the way down-level to Windows 8. All features of DwriteCore will function the same on all down-level versions; in other words, all current features will work on Windows 8, 8.1, and all versions of Windows 10 without any disparity regarding which features might work on which versions.
Staging plan
Porting system DWrite to DWrite core is a sufficiently large project to span multiple Windows release cycles. At the time of this proposal, it is divided into four Phases, each of which correspond to a chunk of functionality delivered in a release.
Disclaimer
DWriteCore is under active development by the Microsoft developer platform team and the roadmap will continue to evolve based on market changes and customer feedback, so please note that the plans outlined here aren't exhaustive or guaranteed.
Phase 1: Foundation
Phase 1 includes the basic tools a developer needs to consume DWriteCore, including:
With these features, developers can immediately begin to harness some of DWrite’s modern core functionality such as variable fonts down level to Windows 8. This iteration of the library can also be consumed on Android, currently being tested internally. Variable fonts are one of the most important features for DWrite customers; they were introduced in Windows 10 RS3, so accessing them in previous versions is a massive boon to developers.
This phase is complete at the time of this proposal.
Phase 2: Text Rendering and Color Fonts
Phase 2 fleshes out the text rendering aspect of DWrite:
The banner feature for Phase 2 is color fonts. Color fonts enable developers to render their fonts with more sophisticated color functionality beyond simple single colors; for example, it is what powers the ability to render emoji and toolbar icon fonts (the latter of which is used by Office, for example). Previously, color fonts were first introduced in Windows 8.1 but were heavily expanded upon in the Windows 10 Anniversary Update.
In addition, users should see memory improvements via cleanup of the font cache, and an in-memory font loader allows for faster loading of fonts.
Phase 2 is currently under development at the time of this proposal and is estimated to arrive in Q4 2020.
Phase 3: Text Layout
Phase 3 focuses on bringing DWrite’s powerful layout features to developers:
Vertical text is particularly important to Far East font users and should open up the audience for DWriteCore developers to these target demographics. The line spacing feature, which allows developers finer grain control over line spacing based on the largest or smallest characters in a glyph run, is also introduced here, which was not developed until Windows 10 Threshold (1511).
Phase 3 is estimated to arrive in Q1 2021.
Phase 4: Font streaming and languages
Phase 4 rounds out the DWriteCore feature set:
Font streaming was introduced in the initial release of Windows 10; it allows users to download fonts on demand as needed, to save disk space. Expanded language support will open up DWriteCore to a wider variety of languages, and the CFF rasterizer is an important rasterizer alternative to TrueType.
Phase 4 is estimated to arrive in Q2 2021.
Invitation to DWrite Developers
DWriteCore, along with other Project Reunion components, will be developed with visibility into current work and openness to developer feedback. Once the project has migrated to GitHub, we invite developers to begin consuming DWriteCore packages and provide insights or requests into feature development.
We will update this section after the repo and demo links become available.
Scope