From dcd394c171d860d033e021597ec2c759cb9e889d Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 13 Jun 2018 10:40:59 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-8178=20=20chunk=E7=9A=84=E5=AE=BD?= =?UTF-8?q?=E5=BA=A6=E8=AE=A1=E7=AE=97=E5=81=8F=E5=B7=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/third/v2/lowagie/text/pdf/PdfFont.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/fine-itext/src/com/fr/third/v2/lowagie/text/pdf/PdfFont.java b/fine-itext/src/com/fr/third/v2/lowagie/text/pdf/PdfFont.java index 76933a99c..da9d4743d 100644 --- a/fine-itext/src/com/fr/third/v2/lowagie/text/pdf/PdfFont.java +++ b/fine-itext/src/com/fr/third/v2/lowagie/text/pdf/PdfFont.java @@ -178,7 +178,14 @@ public class PdfFont implements Comparable { } public java.awt.Font getAwtFont() { - return new java.awt.Font(oriFont.getFontName(), oriFont.getStyle(), (int)oriFont.getSize()); + int style = Font.NORMAL; + if (oriFont.isBold()) { + style |= Font.BOLD; + } + if(oriFont.isItalic()){ + style |= Font.ITALIC; + } + return new java.awt.Font(oriFont.getFontName(), style, (int)oriFont.getSize()); } public Font getOriFont(){