Purpose
Returns a Symbol value, using a character from a TrueType font as the symbol. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
MakeFontSymbol( shape, color, size, fontname, fontstyle, rotation )
shape is a SmallInt value, 31 or larger (31 is invisible), specifying a character code from a TrueType font.
color is an integer RGB color value; see RGB() function for details.
size is a SmallInt value from 1 to 48, dictating the point size of the symbol.
fontname is a string representing the name of a TrueType font (for example, "WingDings"). This argument is case sensitive.
fontstyle is a numeric code controlling bold, outline, and other attributes; see below.
rotation is a floating-point number indicating the symbol's rotation angle, in degrees.
Return Value
Symbol
Description
The MakeFontSymbol() function returns a Symbol value based on a character in a TrueType font. See Symbol clause for information about other symbol types.
The following table describes how the fontstyle parameter controls the symbol's style:
fontstyle value | Symbol Style |
---|---|
0 | Plain |
1 | Bold |
16 | Border (black outline) |
32 | Drop Shadow |
256 | Halo (white outline) |
To specify two or more style attributes, add the values from the left column. For example, to specify both the Bold and the Drop Shadow attributes, use a fontstyle value of 33. Border and Halo are mutually exclusive.
Example
Include "mapbasic.def"
Dim sym_marker As Symbol
sym_marker = MakeFontSymbol(65,RED,24,"WingDings",32,0)
See Also:
CurrentSymbol() function, MakeCustomSymbol() function, MakeSymbol() function, StyleAttr() function, Symbol clause