Custom Font Sample

Illustrates how to distribute custom fonts in your applications executable, load the fonts, and then display text in the loaded fonts. The following screen shot illustrates this sample.

This topic has the following parts:

Screen shot of text in a loaded font

The Custom Font Sample consists of the following files.

File
Layout.h
CustomFont.h
ResourceFontCollectionLoader.h
ResourceFontContext.h
ResourceFontFileEnumerator.h
ResourceFontFileLoader.h
ResourceFontFileStream.h
resource.h
Common.h
Layout.cpp
CustomFont.cpp
ResourceFontCollectionLoader.cpp
ResourceFontContext.cpp
ResourceFontFileEnumerator.cpp
ResourceFontFileLoader.cpp
ResourceFontFileStream.cpp
CustomFont.rc
CustomFont.sln
CustomFont.vcproj
CustomFont.manifest
Fonts\kooten.ttf
Fonts\peric.ttf

 

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 location.

Note   It is not available on Code Gallery.

LocationPath/URL
Windows SDK\Program Files\Microsoft SDKs\Windows\v7.0\Samples\Multimedia\DirectWrite\CustomFont

 

 

 

Community Additions

ADD
Show:
© 2014 Microsoft