Class MeasurableFontSpec
- java.lang.Object
-
- com.github.weisj.jsvg.attributes.font.FontSpec
-
- com.github.weisj.jsvg.attributes.font.MeasurableFontSpec
-
@Immutable public final class MeasurableFontSpec extends FontSpec
-
-
Field Summary
Fields Modifier and Type Field Description private @NotNull Length
currentSize
private int
currentWeight
static @NotNull java.lang.String
DEFAULT_FONT_FAMILY_NAME
-
Fields inherited from class com.github.weisj.jsvg.attributes.font.FontSpec
families, sizeAdjust, stretch, style
-
-
Constructor Summary
Constructors Constructor Description MeasurableFontSpec(@NotNull java.lang.String[] families, @Nullable FontStyle style, @Nullable Length sizeAdjust, float stretch, int currentWeight, @NotNull Length currentSize)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static @NotNull MeasurableFontSpec
createDefault()
@NotNull Length
currentSize()
int
currentWeight()
@NotNull MeasurableFontSpec
derive(@Nullable AttributeFontSpec other)
float
effectiveSize(@NotNull MeasureContext context)
boolean
equals(java.lang.Object o)
@NotNull java.lang.String[]
families()
int
hashCode()
float
stretch()
@NotNull FontStyle
style()
java.lang.String
toString()
@NotNull MeasurableFontSpec
withFontSize(@Nullable FontSize size, @Nullable Length sizeAdjust)
-
-
-
Field Detail
-
DEFAULT_FONT_FAMILY_NAME
@NotNull public static final @NotNull java.lang.String DEFAULT_FONT_FAMILY_NAME
- See Also:
- Constant Field Values
-
currentWeight
private final int currentWeight
-
currentSize
@NotNull private final @NotNull Length currentSize
-
-
Method Detail
-
createDefault
@NotNull public static @NotNull MeasurableFontSpec createDefault()
-
families
@NotNull public @NotNull java.lang.String[] families()
-
style
@NotNull public @NotNull FontStyle style()
-
stretch
public float stretch()
-
currentWeight
public int currentWeight()
-
currentSize
@NotNull public @NotNull Length currentSize()
-
effectiveSize
public float effectiveSize(@NotNull @NotNull MeasureContext context)
-
withFontSize
@NotNull public @NotNull MeasurableFontSpec withFontSize(@Nullable @Nullable FontSize size, @Nullable @Nullable Length sizeAdjust)
-
derive
@NotNull public @NotNull MeasurableFontSpec derive(@Nullable @Nullable AttributeFontSpec other)
-
-