- java.lang.Object
-
- com.github.weisj.jsvg.attributes.font.FontSpec
-
- com.github.weisj.jsvg.attributes.font.MeasurableFontSpec
-
public final class MeasurableFontSpec extends FontSpec
-
-
Field Summary
Fields Modifier and Type Field Description private @NotNull LengthcurrentSizeprivate intcurrentWeight-
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, @NotNull Percentage stretch, int currentWeight, @NotNull Length currentSize)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static @NotNull MeasurableFontSpeccreateDefault()@NotNull LengthcurrentSize()intcurrentWeight()@NotNull MeasurableFontSpecderive(@Nullable AttributeFontSpec other)floateffectiveSize(@NotNull MeasureContext context)booleanequals(java.lang.Object o)@NotNull java.lang.String[]families()inthashCode()@NotNull Percentagestretch()@NotNull FontStylestyle()java.lang.StringtoString()@NotNull MeasurableFontSpecwithFontSize(@Nullable FontSize size, @Nullable Length sizeAdjust)
-
-
-
Field Detail
-
currentWeight
private final int currentWeight
-
currentSize
@NotNull private final @NotNull Length currentSize
-
-
Constructor Detail
-
MeasurableFontSpec
MeasurableFontSpec(@NotNull @NotNull java.lang.String[] families, @Nullable @Nullable FontStyle style, @Nullable @Nullable Length sizeAdjust, @NotNull @NotNull Percentage stretch, int currentWeight, @NotNull @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
@NotNull public @NotNull Percentage 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)
-
-