We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 421fd77 + 262cf05 commit 0f6c728Copy full SHA for 0f6c728
internal/fonts/tounicode.go
@@ -69,7 +69,7 @@ type glyphMapping struct {
69
// This CMap maps those glyph IDs back to Unicode code points for text extraction.
70
func writeCharMappings(buf *bytes.Buffer, subset *FontSubset) error {
71
// Build glyph ID → Unicode mappings.
72
- var mappings []glyphMapping
+ mappings := make([]glyphMapping, 0, len(subset.UsedChars))
73
74
for ch := range subset.UsedChars {
75
glyphID, ok := subset.BaseFont.CharToGlyph[ch]
0 commit comments