Package org.geotools.api.style
Interface Font
- All Known Implementing Classes:
FontImpl
public interface Font
The Font element identifies a font of a certain family, style, and size.
- Since:
- GeoAPI 2.2
- Author:
- Open Geospatial Consortium, Johann Sorel (Geomatys), Chris Dillard (SYS Technologies)
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Enumeration of allow font-style values.static interface
Enumeration of allow font-weight values. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionaccept
(TraversingStyleVisitor visitor, Object extraData) calls the visit method of a StyleVisitorSVG font-family parameters in preferred order.getSize()
Font size in pixels with a default of 10 pixels.getStyle()
The "font-style" SVG parameter should be "normal", "italic", or "oblique".The "font-weight" SVG parameter should be "normal" or "bold".void
setSize
(Expression size) void
setStyle
(Expression style) void
setWeight
(Expression weight)
-
Field Details
-
DEFAULT_FONTSIZE
static final int DEFAULT_FONTSIZEdefault font-size value *- See Also:
-
-
Method Details
-
getFamily
List<Expression> getFamily()SVG font-family parameters in preferred order.- Returns:
- live list of font-family parameters in preferred order
-
getStyle
Expression getStyle()The "font-style" SVG parameter should be "normal", "italic", or "oblique".If null is returned the default value should be considered "normal".
- Returns:
- Expression or null
-
setStyle
- Parameters:
style
- The "font-style" SVG parameter (one of "normal", "italic", or "oblique"
-
getWeight
Expression getWeight()The "font-weight" SVG parameter should be "normal" or "bold".If null the default should be considered as "normal"
- Returns:
- font-weight SVG parameter
-
setWeight
- Parameters:
weight
- The "font-weight" SVG parameter (one of "normal", "bold")
-
getSize
Expression getSize()Font size in pixels with a default of 10 pixels.Please note this is specified in pixels so you may need to take the resolution of your output into account when providing a size.
- Returns:
- font size
-
accept
calls the visit method of a StyleVisitor- Parameters:
visitor
- the style visitor
-
setSize
- Parameters:
size
- the font size in pixels
-