From 8bbe7fceb667ea7b524b296f412b7e39bbf42150 Mon Sep 17 00:00:00 2001 From: "Hugh.C" Date: Wed, 10 Jun 2020 15:37:28 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-33025=20=E5=8A=A0=E7=82=B9=E6=B3=A8?= =?UTF-8?q?=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v2/lowagie/text/html/simpleparser/FactoryProperties.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/FactoryProperties.java b/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/FactoryProperties.java index 820684d02..853a09b8c 100644 --- a/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/FactoryProperties.java +++ b/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/FactoryProperties.java @@ -120,10 +120,13 @@ public class FactoryProperties { } int style = font.getStyle(); if (props.hasKvInLastChain(CSS.Property.TEXT_DECORATION, CSS.Value.NONE)) { + //含有 text-decoration 属性,且值为 none时,将下划线属性去掉 font.setStyle(style & (~Font.UNDERLINE)); } else { + //默认是有需要有下划线的 font.setStyle(style | Font.UNDERLINE); } + //没有指定颜色 or 是继承的颜色(标签不需要继承颜色,只使用自身的颜色)时,使用默认的蓝色(超链接) if (null == font.getColor() || (!font.getColor().equals(Color.BLUE) && null == props.getLastChainProperty(CSS.Property.COLOR))) { font.setColor(Color.BLUE); }