You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ac...@apache.org on 2008/11/05 14:44:40 UTC
svn commit: r711564 -
/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/PDFGraphics2D.java
Author: acumiskey
Date: Wed Nov 5 05:44:40 2008
New Revision: 711564
URL: http://svn.apache.org/viewvc?rev=711564&view=rev
Log:
Deprecated method.
Modified:
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/PDFGraphics2D.java
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/PDFGraphics2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/PDFGraphics2D.java?rev=711564&r1=711563&r2=711564&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/PDFGraphics2D.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/PDFGraphics2D.java Wed Nov 5 05:44:40 2008
@@ -62,7 +62,6 @@
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 @@
* 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);
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org