|
|
|
@ -429,10 +429,11 @@ public class PdfGraphics2D extends Graphics2D {
|
|
|
|
|
// Simulate a bold font.
|
|
|
|
|
// 30有点粗 ,换成40
|
|
|
|
|
float strokeWidth = font.getSize2D() * (weight.floatValue() - TextAttribute.WEIGHT_REGULAR.floatValue()) / 40f; |
|
|
|
|
if (strokeWidth != 1) { |
|
|
|
|
if(realPaint instanceof Color){ |
|
|
|
|
//重点是这个渲染模式的设置,其他无所谓
|
|
|
|
|
cb.setTextRenderingMode(PdfContentByte.TEXT_RENDER_MODE_FILL_STROKE); |
|
|
|
|
if (strokeWidth != 1) { |
|
|
|
|
cb.setLineWidth(strokeWidth); |
|
|
|
|
if(realPaint instanceof Color){ |
|
|
|
|
Color color = (Color)realPaint; |
|
|
|
|
int alpha = color.getAlpha(); |
|
|
|
|
if (alpha != currentStrokeGState) { |
|
|
|
|