Click or drag to resize
CanvasTextFormatFontFamily Property
Specifies the font family name (Arial, Times New Roman, etc.)

Namespace:  Microsoft.Graphics.Canvas.Text
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public string FontFamily { get; set; }

Property Value

Type: String
Remarks

The FontFamily property recognizes three styles of family name:

familyname
A font family name of a font that's installed on the system.
applicationUri#familyname
Specifies a font family that's contained in a font package (such as a TTF file) that's distributed with the application. The applicationUri must begin with either ms-appx:// or ms-appdata://.
filename#familyname
As for applicationUri above, the filename is treated as a URI that starts with ms-appx:///.

Passing in an applicationUri which is well-formed, but doesn't correspond to a valid font file will still succeed. It's equivalent to having no FontFamily specified. To be stricter and test that the font file was loaded and supported, create a CanvasFontSet and verify that its Fonts count is at least one.

See Also