/** * Constructs an UnresolvedFontFamily with the specified familyName. * * @param familyName The name of the font family. */ public UnresolvedFontFamily(String familyName) { this(new GVTFontFace(familyName)); }
/** * Returns a string representation of this font. * This is for debugging purposes only. * * @return A string representation of this font. */ public String toString() { return fontFace.getFamilyName() + " " + fontFace.getFontWeight() + " " + fontFace.getFontStyle(); } }
protected GVTLineMetrics getLineMetrics(int beginIndex, int limit) { if (lineMetrics != null) return lineMetrics; float fontHeight = fontFace.getUnitsPerEm(); float scale = fontSize/fontHeight; float ascent = fontFace.getAscent() * scale; float descent = fontFace.getDescent() * scale; float[] baselineOffsets = new float[3]; baselineOffsets[Font.ROMAN_BASELINE] = 0; baselineOffsets[Font.CENTER_BASELINE] = (ascent+descent)/2-ascent; baselineOffsets[Font.HANGING_BASELINE] = -ascent; float stOffset = fontFace.getStrikethroughPosition() * -scale; float stThickness = fontFace.getStrikethroughThickness() * scale; float ulOffset = fontFace.getUnderlinePosition() * scale; float ulThickness = fontFace.getUnderlineThickness() * scale; float olOffset = fontFace.getOverlinePosition() * -scale; float olThickness = fontFace.getOverlineThickness() * scale; lineMetrics = new GVTLineMetrics (ascent, Font.ROMAN_BASELINE, baselineOffsets, descent, fontHeight, fontHeight, limit-beginIndex, stOffset, stThickness, ulOffset, ulThickness, olOffset, olThickness); return lineMetrics; }
/** * Returns the font family name. * * @return The family name. */ public String getFamilyName() { return fontFace.getFamilyName(); }
TextPaintInfo tpi) { float fontHeight = fontFace.getUnitsPerEm(); float scale = fontSize/fontHeight; AffineTransform scaleTransform if (s.length() == 0) { s = String.valueOf(fontFace.getUnitsPerEm()); if (s.length() == 0) { s = String.valueOf(fontFace.getAscent());
GVTFontFace fontFace; fontFace = ((GVTFontFamily) svgFontFamily).getFontFace(); String fontFaceWeight = fontFace.getFontWeight(); fontFaceWeight = getFontWeightNumberString(fontFaceWeight); fontFamilyWeights.add(fontFaceWeight);
protected GVTLineMetrics getLineMetrics(int beginIndex, int limit) { if (lineMetrics != null) return lineMetrics; float fontHeight = fontFace.getUnitsPerEm(); float scale = fontSize/fontHeight; float ascent = fontFace.getAscent() * scale; float descent = fontFace.getDescent() * scale; float[] baselineOffsets = new float[3]; baselineOffsets[Font.ROMAN_BASELINE] = 0; baselineOffsets[Font.CENTER_BASELINE] = (ascent+descent)/2-ascent; baselineOffsets[Font.HANGING_BASELINE] = -ascent; float stOffset = fontFace.getStrikethroughPosition() * -scale; float stThickness = fontFace.getStrikethroughThickness() * scale; float ulOffset = fontFace.getUnderlinePosition() * scale; float ulThickness = fontFace.getUnderlineThickness() * scale; float olOffset = fontFace.getOverlinePosition() * -scale; float olThickness = fontFace.getOverlineThickness() * scale; lineMetrics = new GVTLineMetrics (ascent, Font.ROMAN_BASELINE, baselineOffsets, descent, fontHeight, fontHeight, limit-beginIndex, stOffset, stThickness, ulOffset, ulThickness, olOffset, olThickness); return lineMetrics; }
/** * Returns the font family name. * * @return the family name. */ public String getFamilyName() { return fontFace.getFamilyName(); }
TextPaintInfo tpi) { float fontHeight = fontFace.getUnitsPerEm(); float scale = fontSize/fontHeight; AffineTransform scaleTransform if (s.length() == 0) { s = String.valueOf(fontFace.getUnitsPerEm()); if (s.length() == 0) { s = String.valueOf(fontFace.getAscent());
GVTFontFace fontFace; fontFace = ((GVTFontFamily) svgFontFamily).getFontFace(); String fontFaceWeight = fontFace.getFontWeight(); fontFaceWeight = getFontWeightNumberString(fontFaceWeight); fontFamilyWeights.add(fontFaceWeight);
protected GVTLineMetrics getLineMetrics(int beginIndex, int limit) { if (lineMetrics != null) return lineMetrics; float fontHeight = fontFace.getUnitsPerEm(); float scale = fontSize/fontHeight; float ascent = fontFace.getAscent() * scale; float descent = fontFace.getDescent() * scale; float[] baselineOffsets = new float[3]; baselineOffsets[Font.ROMAN_BASELINE] = 0; baselineOffsets[Font.CENTER_BASELINE] = (ascent+descent)/2-ascent; baselineOffsets[Font.HANGING_BASELINE] = -ascent; float stOffset = fontFace.getStrikethroughPosition() * -scale; float stThickness = fontFace.getStrikethroughThickness() * scale; float ulOffset = fontFace.getUnderlinePosition() * scale; float ulThickness = fontFace.getUnderlineThickness() * scale; float olOffset = fontFace.getOverlinePosition() * -scale; float olThickness = fontFace.getOverlineThickness() * scale; lineMetrics = new GVTLineMetrics (ascent, Font.ROMAN_BASELINE, baselineOffsets, descent, fontHeight, fontHeight, limit-beginIndex, stOffset, stThickness, ulOffset, ulThickness, olOffset, olThickness); return lineMetrics; }
/** * Constructs an UnresolvedFontFamily with the specified familyName. * * @param familyName The name of the font family. */ public UnresolvedFontFamily(String familyName) { this(new GVTFontFace(familyName)); }
/** * Returns a string representation of this font. * This is for debugging purposes only. * * @return A string representation of this font. */ public String toString() { return fontFace.getFamilyName() + " " + fontFace.getFontWeight() + " " + fontFace.getFontStyle(); } }
/** * Returns the font family name. * * @return The family name. */ public String getFamilyName() { return fontFace.getFamilyName(); }
TextPaintInfo tpi) { float fontHeight = fontFace.getUnitsPerEm(); float scale = fontSize/fontHeight; AffineTransform scaleTransform if (s.length() == 0) { s = String.valueOf(fontFace.getUnitsPerEm()); if (s.length() == 0) { s = String.valueOf(fontFace.getAscent());
GVTFontFace fontFace; fontFace = ((GVTFontFamily)ffiter.next()).getFontFace(); String fontFaceWeight = fontFace.getFontWeight(); fontFaceWeight = getFontWeightNumberString(fontFaceWeight); fontFamilyWeights.add(fontFaceWeight);
/** * Constructs an AWTFontFamily with the specified familyName. * * @param familyName The name of the font family. */ public AWTFontFamily(String familyName) { this(new GVTFontFace(familyName)); }
/** * Returns a string representation of this font. * This is for debugging purposes only. * * @return A string representation of this font. */ public String toString() { return fontFace.getFamilyName() + " " + fontFace.getFontWeight() + " " + fontFace.getFontStyle(); } }
/** * Returns the family name of this font. * * @return The font family name. */ public String getFamilyName() { return fontFace.getFamilyName(); }
/** * Constructs an AWTFontFamily with the specified familyName. * * @param familyName The name of the font family. */ public AWTFontFamily(String familyName) { this(new GVTFontFace(familyName)); }