From 537b5779e159e4fffc5daec5d9f111a07b0fe487 Mon Sep 17 00:00:00 2001 From: xiaoqidun Date: Wed, 9 Sep 2026 21:45:01 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=B8=B2=E6=9F=93=E8=83=BD=E5=8A=9B):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=B2=97=E4=BD=93=E6=96=87=E5=AD=97=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=9A=84PDF=E7=BA=BF=E5=AE=BD=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=EF=BC=8C=E4=BF=9D=E6=8C=81=E9=98=85=E8=AF=BB=E4=B8=8E=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E6=95=88=E6=9E=9C=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ofdgo_renderer_text.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ofdgo_renderer_text.go b/ofdgo_renderer_text.go index 659bbcc..a1e4535 100644 --- a/ofdgo_renderer_text.go +++ b/ofdgo_renderer_text.go @@ -184,7 +184,7 @@ func (r *Renderer) renderText(ctx *canvas.Context, obj TextObject, pageH float64 } dxs, dys := parseFloats(tc.DeltaX), parseFloats(tc.DeltaY) xs, ys := parseFloats(tc.X), parseFloats(tc.Y) - drawAsPath := embeddedFont || textCodePositioned(tc, xs, ys) || fillClip != nil || shadedFill || fillPattern != nil || shouldStroke + drawAsPath := embeddedFont || face.FauxBold > 0 || textCodePositioned(tc, xs, ys) || fillClip != nil || shadedFill || fillPattern != nil || shouldStroke cx, cy := 0.0, 0.0 previousAdvance := 0.0 if len(xs) > 0 { @@ -296,6 +296,7 @@ func (r *Renderer) renderText(ctx *canvas.Context, obj TextObject, pageH float64 } if fillPaint != nil || fillPattern != nil { ctx.SetFill(fillPaint) + ctx.SetStrokeColor(canvas.Transparent) if fillClip != nil || shadedFill || fillPattern != nil { scaleX := hScale if advanceLimit > 0 && glyphWidth*scaleX > advanceLimit {