Skip to content

Commit 0320018

Browse files
committed
add some comments about how to test the rendered images
1 parent fae2d3d commit 0320018

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/badge/badge_glyph_width.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ import "sync"
77

88
// DejaVuGlyphWidthData is generated by `sfnt.Face.GlyphAdvance(nil, <rune>, 11, font.HintingNone)` with DejaVu Sans
99
// v2.37 (https://github.com/dejavu-fonts/dejavu-fonts/releases/download/version_2_37/dejavu-sans-ttf-2.37.zip).
10+
//
11+
// Fonts defined in "DefaultFontFamily" all have similar widths (including "DejaVu Sans"),
12+
// and these widths are fixed and don't seem to change.
13+
//
14+
// A devtest page "/devtest/badge-actions-svg" could be used to check the rendered images.
15+
1016
var DejaVuGlyphWidthData = sync.OnceValue(func() map[rune]uint8 {
1117
return map[rune]uint8{
1218
32: 3,

0 commit comments

Comments
 (0)