Share via


SelectFont

Specifies a list of attributes that define the .tinyfnt font to create.

Syntax

SelectFont "selectionstring"
      
    

Parameters

  • selectionstring
    A quoted string containing comma-delimited fields that indicate the characteristics of the .tinyfnt to create. The fields correspond to fields in the LOGFONT structure and the ENUMLOGFONTEX structure. Each field in selectionstring consists of one of the prefixes below, followed by a string described below: Prefix

Remarks

TFConvert searches all TrueType fonts installed on the system, as well as any fonts specified in an AddFontToProcess argument, to find a font that matches the characteristics specified in the selectionstring argument. The .tinyfnt file is generated based on the first match.

A SelectFont statement "selects" the current font that subsequent statements in the .fntdef file refer to. A SelectFont statement must be followed by an ImportRange or ImportRangeAndMap statement that specifies the characters to import from the currently selected font. If any ImportRange or ImportRangeAndMap options appear in a .fntdef file before a font has been selected using a SelectFont statement, TFConvert fails.

Note

The comma-delimited fields in selectionstring may not be preceded by a space. For instance, SelectFont "WE:400,FN:Pericles" is a valid SelectFont option, but SelectFont "WE:400, FN:Pericles" is not.

Example

In the following .fntdef file, the SelectFont statement instructs TFConvert to look for a regular-weight font with the face name "Miramonte". Fonts installed on the system, as well as the font at the path specified in the AddFontToProcess argument, will be considered by TFConvert.

AddFontToProcess C:\SampleFonts\miramo.ttf
SelectFont "WE:400,FN:Miramonte"
#import upper case letters
ImportRange 65 90
In the following .fntdef file, the SelectFont statement instructs TFConvert to look for a bold-weight font of height 12, with the face name "Miramonte Bold". Note that the font name in the FN: field must be enclosed in quotes because it contains a space.
AddFontToProcess C:\SampleFonts\miramob.ttf
SelectFont "HE:12,WE:700,FN:"Miramonte Bold""
#import upper case letters
ImportRange 65 90

Version Information

Available in .NET Micro Framework version 2.0

See Also

Reference

AddFontToProcess