Class FontConfiguration
java.lang.Object
net.sourceforge.plantuml.klimt.font.FontConfiguration
-
Method Summary
Modifier and TypeMethodDescriptionbigger(double delta) static FontConfigurationblackBlueTrue(UFont font) bold()changeAttributes(SvgAttributes toBeAdded) changeColor(HColor newHtmlColor) changeExtendedColor(HColor newExtendedColor) changeFamily(String family) Returns a newFontConfigurationidentical to this one except that the font family (typeface name) has been replaced.changeFontPosition(FontPosition fontPosition) changeSize(float size) booleancontainsStyle(FontStyle style) static FontConfigurationstatic FontConfigurationcreate(UFont font, HColor color, HColor hyperlinkColor, UStroke hyperlinkUnderlineStroke, int tabSize) static FontConfigurationcreate(ISkinParam skinParam, FontParam fontParam, Stereotype stereo) static FontConfigurationcreate(ISkinParam skinParam, Style style) static FontConfigurationcreate(ISkinParam skinParam, Style style, Colors colors) booleangetColor()getFont()Returns theUFontFace(weight + italic axis) carried by the current font of this configuration.doubleintgetSpace()intinthashCode()italic()toString()unbold()unitalic()withFontFace(UFontFace face) Returns a newFontConfigurationwhose underlying font has been updated to reflect the suppliedUFontFace(weight + italic axis).
-
Method Details
-
create
public static FontConfiguration create(UFont font, HColor color, HColor hyperlinkColor, UStroke hyperlinkUnderlineStroke, int tabSize) -
blackBlueTrue
-
getFont
-
getFontFace
Returns theUFontFace(weight + italic axis) carried by the current font of this configuration. The face is always consistent with the underlying font: changing the font (e.g. viawithFontFace(UFontFace)orchangeFamily(String)) automatically updates the returned value.- Returns:
- the font face; never
null
-
withFontFace
Returns a newFontConfigurationwhose underlying font has been updated to reflect the suppliedUFontFace(weight + italic axis). All other configuration properties (colour, size, tab stop, etc.) are preserved unchanged.This is the preferred way to change bold/italic/weight instead of the legacy
bold()/italic()helpers, because it preserves CSS font-weight information beyond the binary bold/non-bold distinction.- Parameters:
face- the new face to apply; ifnullthe current face is kept- Returns:
- a new
FontConfigurationwith the updated face
-
toStringDebug
-
hashCode
public int hashCode() -
equals
-
mute
-
create
public static FontConfiguration create(ISkinParam skinParam, FontParam fontParam, Stereotype stereo) -
create
-
create
-
toString
-
create
public static FontConfiguration create(UFont font, HColor color, HColor hyperlinkColor, UStroke hyperlinkUnderlineStroke) -
forceFont
-
changeAttributes
-
changeColor
-
changeExtendedColor
-
changeSize
-
bigger
-
changeFontPosition
-
changeFamily
Returns a newFontConfigurationidentical to this one except that the font family (typeface name) has been replaced. The currentUFontFace(weight + italic axis) and point size are preserved.- Parameters:
family- the new font-family string (e.g."Arial")- Returns:
- a new
FontConfigurationwith the updated family
-
resetFont
-
add
-
italic
-
bold
-
unbold
-
unitalic
-
underline
-
wave
-
hyperlink
-
remove
-
adjustColorForBackground
-
getColor
-
getExtendedColor
-
containsStyle
-
getSpace
public int getSpace() -
getAttributes
-
getSize2D
public double getSize2D() -
getTabSize
public int getTabSize() -
getUnderlineStroke
-