}
private Font createFont(java.awt.Font f) {
- String fontFamily = f.getFamily();
- if (fontFamily.equals("sanserif")) {
- fontFamily = "sans-serif";
- }
- int fontSize = 1000 * f.getSize();
- String style = f.isItalic() ? "italic" : "normal";
- int weight = f.isBold() ? Font.WEIGHT_BOLD : Font.WEIGHT_NORMAL;
-
- FontTriplet triplet = fontInfo.findAdjustWeight(fontFamily, style, weight);
- if (triplet == null) {
- triplet = fontInfo.findAdjustWeight("sans-serif", style, weight);
- }
- return fontInfo.getFontInstance(triplet, fontSize);
+ return fontInfo.getFontInstanceForAWTFont(f);
}
private void establishCurrentFont() throws IOException {
documents. Example: the fix of marks layering will be such a case when it's done.
-->
<release version="FOP Trunk" date="TBD">
+ <action context="Code" dev="GA" type="fix" fixes-bug="49302" due-to="Julien Aymé">
+ Eliminate duplicate code.
+ </action>
<action context="Code" dev="GA" type="fix" fixes-bug="49350" due-to="Julien Aymé">
Correct coding error in AFPResourceLevel#equals.
</action>