Share via


IXRGlyphs::SetFontUri (Compact 2013)

3/28/2014

This method sets the location of the font to use for rendering the glyphs.

Syntax

virtual HRESULT STDMETHODCALLTYPE SetFontUri(
    WCHAR* FontUri
) = 0; 

Parameters

  • FontUri
    [in] Pointer to a string that contains the Universal Resource Identifier (URI) source of the font.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

Usually you specify the font by using a relative Universal Resource Identifier (URI) path. In this case, the URI that you specify must be a relative reference from the folder that contains the application executable. The number sign (#) in this string specifies a font offset in a TrueType collection.

Note

Any font specified by FontUri must reside in a font file that is embedded in a DLL as a resource on the target device.

pFontUri supports fonts in .ttf format, and supports TTC (TrueType Collection) fonts. You can index a specific font offset in the collection by using the format collectionname.ttc#n where n is the index within the collection. You can omit "#0" if you intend to reference the first font face in the collection.

Note

As with most types of software, font files are licensed, rather than sold, and licenses that govern the use of fonts vary from vendor to vendor. As a developer, it is your responsibility to ensure that you have the required license rights for any font you embed within an application, or otherwise redistribute.

.NET Framework Equivalent

System.Windows.Documents.Glyphs.FontUri

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRGlyphs
IXRGlyphs::GetFontUri