feat(字体渲染): 优化字体渲染

This commit is contained in:
2026-06-25 09:56:12 +08:00
parent 8edc2a0bb5
commit a06cfe17b6
+2
View File
@@ -541,6 +541,7 @@ func (r *Renderer) renderPath(ctx *canvas.Context, obj PathObject, pageH float64
} }
if shouldFill && fillColor != nil { if shouldFill && fillColor != nil {
ctx.SetFillColor(fillColor) ctx.SetFillColor(fillColor)
ctx.SetStrokeColor(canvas.Transparent)
ctx.DrawPath(0, 0, p) ctx.DrawPath(0, 0, p)
} }
shouldStroke := true shouldStroke := true
@@ -551,6 +552,7 @@ func (r *Renderer) renderPath(ctx *canvas.Context, obj PathObject, pageH float64
if strokeColor == nil { if strokeColor == nil {
strokeColor = color.Transparent strokeColor = color.Transparent
} }
ctx.SetFillColor(canvas.Transparent)
ctx.SetStrokeColor(strokeColor) ctx.SetStrokeColor(strokeColor)
ctx.SetStrokeWidth(lineWidth) ctx.SetStrokeWidth(lineWidth)
ctx.SetStrokeCapper(lineCap) ctx.SetStrokeCapper(lineCap)