Windows Dev Center

Text Rendering Sample

Demonstrates various text rendering and measuring modes that are available with DirectWrite. Also shows transforms (rotation) and font selection, and has an optional magnifier for seeing text both scaled up and zoomed in to view pixels and subpixels. The following screen shot shows the magnifier.

This topic has the following parts:

Screen shot of the DirectWrite Text Rendering sample with a magnified view of some of the text

The Text Rendering Sample consists of the following files.

File
D2DRenderer.h
DWriteRenderer.h
IRenderer.h
RenderTest.h
TextHelpers.h
resource.h
Common.h
D2DRenderer.cpp
DWriteRenderer.cpp
RenderTest.cpp
TextHelpers.cpp
RenderTest.rc
RenderTest.sln
RenderTest.vcproj
RenderTest.manifest

 

Requirements

Minimum supported clientWindows 7 or Windows Vista with Service Pack 2 (SP2) and Platform Update for Windows Vista
Minimum supported serverWindows Server 2008 R2 or Windows Server 2008 with Service Pack 2 (SP2) and Platform Update for Windows Server 2008
Windows SDKWindows Software Development Kit (SDK) for Windows 7

 

Downloading the Sample

This sample is available in the following locations.

LocationPath/URL
Windows SDK\Program Files\Microsoft SDKs\Windows\v7.0\Samples\Multimedia\DirectWrite\RenderTest
Code GalleryDownload from MSDN Code Gallery

 

 

 

Community Additions

ADD
Show:
© 2015 Microsoft