ArticleslgStudy

science

DirectWrite

DirectWrite is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand DirectWrite rather than just read about it. In short: DirectWrite is a text layout and glyph rendering API by Microsoft. It was designed to replace GDI/GDI+ and Uniscribe for screen-oriented rendering and was first shipped with Windows 7 and Windows Server 2008 R2, as well as Windows Vista and Windows Server 2008 (with Platform Update installed).

Key takeaways

  • DirectWrite belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect DirectWrite to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of DirectWrite from memory before moving on to harder problems.

Reference excerpt

DirectWrite is a text layout and glyph rendering API by Microsoft. It was designed to replace GDI/GDI+ and Uniscribe for screen-oriented rendering and was first shipped with Windows 7 and Windows Server 2008 R2, as well as Windows Vista 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, 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 font 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 Since DirectWrite was introduced in Windows 7, there are fewer apps using it compared to GDI. 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 Uniscribe/ClearType for display rendering and typography; DirectWrite is used by default. Google Chrome in Windows supports DirectWrite starting from version 37. Microsoft Edge with Chromium engine also supports DirectWrite and use it by default. Telegram's desktop client uses DirectWrite to render color emojis on Windows. Steam has the option to enable DirectWrite for improved font smoothing and kerning on its desktop client. Visual Studio Code supports DirectWrite for font rendering as an option besides Skia. Universal Windows Platform uses DirectWrite by default. Text editors like Notepad++, EmEditor, Sublime Text and others based on Scintilla also support DirectWrite, as does Notepad in Windows 11 and later. As of Windows 11, the file manager parts of Windows File Explorer still not using DirectWrite (use older ClearType instead) because of shell extension compatibility reasons.

See also Pango: a cross platform library for rendering text in high quality, emphasising support for multilingual text. Cairo: a vector-based cross platform graphics library that can render text.

References

Worked examples

Example 1 — a first encounter with DirectWrite

Start with the simplest possible case. Write down what DirectWrite claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to DirectWrite before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about DirectWrite ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of DirectWrite

In research
DirectWrite appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses DirectWrite in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
DirectWrite is common in secondary-school and first-year university syllabi. It links to neighbouring topics DirectX, Text rendering libraries, so understanding it makes those chapters shorter.
In everyday life
Look for DirectWrite outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “DirectWrite” →

How to study DirectWrite in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what DirectWrite means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain DirectWrite out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is DirectWrite in simple terms?

DirectWrite is a text layout and glyph rendering API by Microsoft. It was designed to replace GDI/GDI+ and Uniscribe for screen-oriented rendering and was first shipped with Windows 7 and Windows Server 2008 R2, as well as Windows Vista and Windows Server 2008 (with Platform Update installed).

Why does DirectWrite matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study DirectWrite?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on DirectWrite.

Tags

  • DirectX
  • Text rendering libraries

Keep exploring