public int getAccentHeight() { if (accentHeight == -1) accentHeight = getAscent(); return accentHeight; }
public int getVertAdvY() { if (vertAdvY != -1) { return vertAdvY; } vertAdvY = fontFace.getUnitsPerEm(); return vertAdvY; }
fm = c.getFontMetrics(sysFont); FontFace face = new FontFace(); face.setAscent(fm.getAscent()); face.setDescent(fm.getDescent()); face.setUnitsPerEm(fm.charWidth('M')); setFontFace(face);
/** * Called by the Font element to let the universe know that a font has been * loaded and is available. */ void registerFont(Font font) { loadedFonts.put(font.getFontFace().getFontFamily(), font); }
protected void build() throws SVGException { super.build(); StyleAttribute sty = new StyleAttribute(); if (getPres(sty.setName("font-family"))) fontFamily = sty.getStringValue(); if (getPres(sty.setName("units-per-em"))) unitsPerEm = sty.getIntValue(); if (getPres(sty.setName("ascent"))) ascent = sty.getIntValue(); if (getPres(sty.setName("descent"))) descent = sty.getIntValue(); if (getPres(sty.setName("accent-height"))) accentHeight = sty.getIntValue(); if (getPres(sty.setName("underline-position"))) underlinePosition = sty.getIntValue(); if (getPres(sty.setName("underline-thickness"))) underlineThickness = sty.getIntValue(); if (getPres(sty.setName("strikethrough-position"))) strikethroughPosition = sty.getIntValue(); if (getPres(sty.setName("strikethrough-thickenss"))) strikethroughThickness = sty.getIntValue(); if (getPres(sty.setName("overline-position"))) overlinePosition = sty.getIntValue(); if (getPres(sty.setName("overline-thickness"))) overlineThickness = sty.getIntValue(); }
fm = c.getFontMetrics(sysFont); FontFace face = new FontFace(); face.setAscent(fm.getAscent()); face.setDescent(fm.getDescent()); face.setUnitsPerEm(fm.charWidth('M')); setFontFace(face);
/** * Called by the Font element to let the universe know that a font has been * loaded and is available. */ void registerFont(Font font) { loadedFonts.put(font.getFontFace().getFontFamily(), font); }
if (getPres(sty.setName("font-family"))) if (getPres(sty.setName("units-per-em"))) if (getPres(sty.setName("ascent"))) if (getPres(sty.setName("descent"))) if (getPres(sty.setName("accent-height"))) if (getPres(sty.setName("underline-position"))) if (getPres(sty.setName("underline-thickness"))) if (getPres(sty.setName("strikethrough-position"))) if (getPres(sty.setName("strikethrough-thickenss"))) if (getPres(sty.setName("overline-position"))) if (getPres(sty.setName("overline-thickness")))
public int getAccentHeight() { if (accentHeight == -1) { accentHeight = getAscent(); } return accentHeight; }
public int getVertAdvY() { if (vertAdvY != -1) return vertAdvY; vertAdvY = fontFace.getUnitsPerEm(); return vertAdvY; }
/** * Called by the Font element to let the universe know that a font has been * loaded and is available. */ void registerFont(Font font) { loadedFonts.put(font.getFontFace().getFontFamily(), font); }
if (getPres(sty.setName("font-family"))) if (getPres(sty.setName("units-per-em"))) if (getPres(sty.setName("ascent"))) if (getPres(sty.setName("descent"))) if (getPres(sty.setName("accent-height"))) if (getPres(sty.setName("underline-position"))) if (getPres(sty.setName("underline-thickness"))) if (getPres(sty.setName("strikethrough-position"))) if (getPres(sty.setName("strikethrough-thickenss"))) if (getPres(sty.setName("overline-position"))) if (getPres(sty.setName("overline-thickness")))
public int getVertOriginY() { if (vertOriginY != -1) { return vertOriginY; } vertOriginY = fontFace.getAscent(); return vertOriginY; }
public int getVertAdvY() { if (vertAdvY != -1) { return vertAdvY; } vertAdvY = fontFace.getUnitsPerEm(); return vertAdvY; }
/** * Called by the Font element to let the universe know that a font has been * loaded and is available. */ void registerFont(Font font) { loadedFonts.put(font.getFontFace().getFontFamily(), font); }
if (getPres(sty.setName("font-family"))) if (getPres(sty.setName("units-per-em"))) if (getPres(sty.setName("ascent"))) if (getPres(sty.setName("descent"))) if (getPres(sty.setName("accent-height"))) if (getPres(sty.setName("underline-position"))) if (getPres(sty.setName("underline-thickness"))) if (getPres(sty.setName("strikethrough-position"))) if (getPres(sty.setName("strikethrough-thickenss"))) if (getPres(sty.setName("overline-position"))) if (getPres(sty.setName("overline-thickness")))
public int getVertOriginY() { if (vertOriginY != -1) { return vertOriginY; } vertOriginY = fontFace.getAscent(); return vertOriginY; }
public int getVertAdvY() { if (vertAdvY != -1) { return vertAdvY; } vertAdvY = fontFace.getUnitsPerEm(); return vertAdvY; }
public int getAccentHeight() { if (accentHeight == -1) { accentHeight = getAscent(); } return accentHeight; }
public int getVertAdvY() { if (vertAdvY == -1) { vertAdvY = ((Font) parent).getFontFace().getUnitsPerEm(); } return vertAdvY; }