Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit focus mode

DirectWrite programming guide

  • 2022-05-24
Feedback

In this article

The following topics provide an overview of theDirectWrite API.

In this section

TopicDescription
Introducing DirectWrite
Tutorial: Getting Started with DirectWriteThis document shows you how to useDirectWrite andDirect2D to create simple text that contains a single format, and then text that contains multiple formats.
Text Formatting and LayoutDirectWrite provides two interfaces for formatting text:IDWriteTextFormat andIDWriteTextLayout.IDWriteTextFormat describes only the format for text and is used in cases when an entire string is to be the same font size, style, weight and so on. On the other hand,IDWriteTextLayout encapsulates both a text string and the formatting for specified ranges of the string. This document describes each interface and their uses. For more information about the creation and methods of these interfaces, see theIDWriteTextFormat andIDWriteTextLayout reference pages.
Justification, Kerning, and SpacingStarting with Windows 8,DirectWrite provides a number of features that allow you to control basic typographic, layout, and spacing features, such as character spacing, pair kerning, and justification.
Vertical TextStarting with the Windows 8,DirectWrite has a number of new APIs that allow you to use vertical text in your apps.
PerformancePerformance forDirectWrite depends largely on how you render it. See theImproving the performance of Direct2D apps topic for info on rendering performance withDirect2D.
Text MetricsIn order to assist your layout, custom font selection, and other metric intensive operations, starting in Windows 8,DirectWrite has a number of new APIs to express all the info about fonts that you might require to develop rich text apps.
Color FontsThis topic describes color fonts, their support in DirectWrite and Direct2D, and how to use them in your app.
Rendering DirectWrite
How-to TopicsThe following topics provide an overview of theDirectWrite API.
Glyphs and Glyph RunsGlyphs and glyph runs are available at the lowest layer of functionality of theDirectWrite API, the glyph-rendering layer.
Custom Font SetsThis topic describes various ways in which you can use custom fonts in your app.
Custom Font Collections (Windows 7/8)DirectWrite provides access to the system font collection by using theIDWriteFactory::GetSystemFontCollection method. This is the font collection that is most frequently used. However some applications have to use fonts that are not installed on the system, such as from included font files or font files embedded in the application. If the fonts that you want are not in the system font collection, you can create a custom font collection derived fromIDWriteFontCollection.
OpenType Variable FontsThis topic describes OpenType variable fonts, their support in DirectWrite and Direct2D, and how to use them in your app.
Win32 Text API ComparisonFor those developers that are migrating their Win32 application code, the following table lists the Win32 Text APIs and the approximate equivalent in DirectWrite.
Interoperating with GDIDirectWrite provides a migration path from, and some interoperability with, GDI's font model, as well as interfaces for rendering text to a bitmap that can then be drawn on a window.
Font selectionTheIDWriteFontSet4 interface exposes methods for selecting fonts from a font set. Those methods make it possible to transition to thetypographic font family model while maintaining compatibility with existing applications, documents, and fonts.
DirectWrite glossaryA glossary of DirectWrite terms.

Feedback

Was this page helpful?

YesNo

In this article

Was this page helpful?

YesNo