FontStyle
Description
The FontStyle element defines a style for a text string.
Context
Table 1 lists the elements that can contain, or be contained by, a FontStyle element.
Contained by | Element | Contains |
---|---|---|
NamedStyle or CompositeStyle |
FontStyle |
(empty) |
Attributes
Table 2 lists the attributes of a FontStyle element.
Attribute | Description |
---|---|
id |
A unique identifier for the element. |
name |
A descriptive name for the element. |
family |
A string value specifying the name of a TrueType font. The |
size |
A floating-point value specifying the font size. The |
size-unit |
A reference to a length in the mapinfo codespace, which specifies the unit of measurement used for the The |
stroke |
A string value specifying the color of the font. The value can be any valid CSS color. (See http://www.w3.org/TR/REC-CSS1#color-units.) The |
stroke-opacity |
A floating-point value from 0 to 1 specifying the opacity of the font. A value of 0 means that the font is totally transparent. A value of 1 means that the font is totally opaque. A value of 0.5 means that the font is 50% translucent. The |
font-style |
An enumeration value specifying the font style. The possible values are:
The |
effect |
A string value specifying the color of the text effect provided by the The value can be any valid CSS color. (See http://www.w3.org/TR/REC-CSS1#color-units.) The |
effect-opacity |
A floating-point value from 0 to 1 specifying the opacity of the text effect. A value of 0 means that the effect is totally transparent. A value of 1 means that the effect is totally opaque. A value of 0.5 means that the effect is 50% translucent. The |
effect-type |
An enumeration value specifying the text effect type. The possible values are:
The |
font-weight |
An enumeration value specifying the font weight. The possible values are:
Note:
normal is equivalent to 200 ; bold is equivalent to 400 .The |
text-decoration |
A string value specifying the text decoration. The value must have the following pattern: a choice of one or more of ( The |
text-case |
An enumeration value specifying the text case. The possible values are:
Note:
default means 'retain the current case'.The |
shadow |
A boolean value ( The |
expand |
A boolean value ( The |
Example
This example specifies a 12-point black sans serif font.
<?xml version="1.0" encoding="UTF-8"?>
<NamedStyle
version="MXP_WorkSpace_1_5"
xmlns="http://www.mapinfo.com/mxp">
<FontStyle
family="Microsoft Sans Serif"
font-style="normal"
effect="white"
effect-opacity="1"
effect-type="none"
font-weight="normal"
text-decoration="none"
text-case="default"
shadow="false"
expand="false"
size="12"
size-unit="mapinfo:length pt"
stroke="black"/>
</NamedStyle>