class Font extends Symbolizer
A Symbolizer for a Label Font. A Font consists of a style (normal, italic, oblique), a weight (normal or bold), a size, and a font family.
You can create a Font by specifying the style, weight, size, and family:
Or using named parameters:def f = new Font("normal", "bold", 12, "Arial")
def f = new Font(weight: "bold", size: 32)
Fields inherited from class | Fields |
---|---|
class Symbolizer |
filterFactory, styleBuilder, styleFactory, styleOptions, title |
Type | Name and description |
---|---|
Expression |
family The font family (serif, Arial, Verdana) |
Expression |
size The font size (8,10,12,24,ect...) |
Expression |
style The font style (normal, italic, oblique) |
static java.util.List<java.lang.String> |
styles Font styles (normal, italic, oblique) |
Expression |
weight The font weight (normal, bold) |
static java.util.List<java.lang.String> |
weights Font weights (normal, bold) |
Type Params | Return Type | Name and description |
---|---|---|
|
protected void |
apply(Symbolizer sym) Apply this Symbolizer to the GeoTools Symbolizer |
|
protected void |
prepare(Rule rule) Prepare the GeoTools Rule by applying this Symbolizer |
|
void |
setFamily(java.lang.Object family) The font family (serif, Arial, Verdana) |
|
void |
setSize(java.lang.Object size) The font size (8,10,12,24,ect...) |
|
void |
setStyle(java.lang.Object fontStyle) Set the font style (normal, italic, oblique) |
|
void |
setWeight(java.lang.Object weight) Set the font weight (normal, bold) |
|
java.lang.String |
toString() The string representation |
Methods inherited from class | Name |
---|---|
class Symbolizer |
and, apply, asSLD, asSLD, buildString, composite, createGeoToolsSymbolizer, getDefault, getDefault, getGeoToolsSymbolizers, getGtStyle, getSld, getTitle, plus, prepare, prepare, range, range, sortBy, sortBy, title, where, zindex |
The font family (serif, Arial, Verdana)
The font size (8,10,12,24,ect...)
The font style (normal, italic, oblique)
Font styles (normal, italic, oblique)
The font weight (normal, bold)
Font weights (normal, bold)
Create a new Font with named parameters.
def f = new Font(weight: "bold", size: 32)
map
- A Map of named parameters.Create a new Font.
def f = new Font("normal", "bold", 12, "Arial")
style
- The Font style (normal, italic, oblique)weight
- The Font weight (normal, bold)size
- The Font size (8,10,12,24,ect...)family
- The Font family (serif, Arial, Verdana)Apply this Symbolizer to the GeoTools Symbolizer
sym
- The GeoTools SymbolizerPrepare the GeoTools Rule by applying this Symbolizer
rule
- The GeoTools RuleThe font family (serif, Arial, Verdana)
The font size (8,10,12,24,ect...)
size
- The font sizeSet the font style (normal, italic, oblique)
fontStyle
- The font styleSet the font weight (normal, bold)
weight
- The font weightThe string representation
Groovy Documentation