feat(强化兼容): 改进字体渲染

This commit is contained in:
2026-01-07 15:29:08 +08:00
parent 191ff30b97
commit 308076a9f6
11 changed files with 2065 additions and 344 deletions
+5 -4
View File
@@ -65,10 +65,11 @@ func NewReader(r io.ReaderAt, size int64) (*Reader, error) {
// 返回: *Renderer 渲染器实例
func NewRenderer(reader *Reader, opts ...RendererOption) *Renderer {
r := &Renderer{
Reader: reader,
DPI: 300.0,
DrawParams: reader.drawParamCache,
FontMap: make(map[string]*canvas.FontFamily),
Reader: reader,
DPI: 300.0,
DrawParams: reader.drawParamCache,
CompositeGraphicUnits: reader.compositeGraphicUnitCache,
FontMap: make(map[string]*canvas.FontFamily),
}
for _, opt := range opts {
opt(r)