diff options
author | Adrian Cumiskey <acumiskey@apache.org> | 2008-11-05 13:44:40 +0000 |
---|---|---|
committer | Adrian Cumiskey <acumiskey@apache.org> | 2008-11-05 13:44:40 +0000 |
commit | c4b1cf56cd9fa706a20765ad2078e040eb4c67bc (patch) | |
tree | 241e2602082877ebd6b361ad4b2139b7fb3b78bb /src/java | |
parent | 9db4cd299225d337c263aede1ef038cec001d8bc (diff) | |
download | xmlgraphics-fop-c4b1cf56cd9fa706a20765ad2078e040eb4c67bc.tar.gz xmlgraphics-fop-c4b1cf56cd9fa706a20765ad2078e040eb4c67bc.zip |
Deprecated method.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@711564 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/org/apache/fop/svg/PDFGraphics2D.java | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/java/org/apache/fop/svg/PDFGraphics2D.java b/src/java/org/apache/fop/svg/PDFGraphics2D.java index 172fafd0c..cafb5f4d3 100644 --- a/src/java/org/apache/fop/svg/PDFGraphics2D.java +++ b/src/java/org/apache/fop/svg/PDFGraphics2D.java @@ -62,7 +62,6 @@ import org.apache.batik.gvt.PatternPaint; import org.apache.fop.fonts.Font; import org.apache.fop.fonts.FontInfo; import org.apache.fop.fonts.FontSetup; -import org.apache.fop.fonts.FontTriplet; import org.apache.fop.pdf.BitmapImage; import org.apache.fop.pdf.PDFAnnotList; import org.apache.fop.pdf.PDFColor; @@ -1454,19 +1453,10 @@ public class PDFGraphics2D extends AbstractGraphics2D { * Returns a suitable internal font given an AWT Font instance. * @param awtFont the AWT font * @return the internal Font + * @deprecated use FontInfo.getFontInstanceForAWTFont(java.awt.Font awtFont) instead */ protected Font getInternalFontForAWTFont(java.awt.Font awtFont) { - Font fontState; - String n = awtFont.getFamily(); - if (n.equals("sanserif")) { - n = "sans-serif"; - } - float siz = awtFont.getSize2D(); - String style = awtFont.isItalic() ? "italic" : "normal"; - int weight = awtFont.isBold() ? Font.WEIGHT_BOLD : Font.WEIGHT_NORMAL; - FontTriplet triplet = fontInfo.fontLookup(n, style, weight); - fontState = fontInfo.getFontInstance(triplet, (int)(siz * 1000 + 0.5)); - return fontState; + return fontInfo.getFontInstanceForAWTFont(awtFont); } /** |