aboutsummaryrefslogtreecommitdiffstats
path: root/modules/badge/badge_glyph_width.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/badge/badge_glyph_width.go')
-rw-r--r--modules/badge/badge_glyph_width.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/badge/badge_glyph_width.go b/modules/badge/badge_glyph_width.go
index e8e43ec9cb..0d950c5a70 100644
--- a/modules/badge/badge_glyph_width.go
+++ b/modules/badge/badge_glyph_width.go
@@ -3,8 +3,6 @@
package badge
-import "sync"
-
// DejaVuGlyphWidthData is generated by `sfnt.Face.GlyphAdvance(nil, <rune>, 11, font.HintingNone)` with DejaVu Sans
// v2.37 (https://github.com/dejavu-fonts/dejavu-fonts/releases/download/version_2_37/dejavu-sans-ttf-2.37.zip).
//
@@ -13,7 +11,7 @@ import "sync"
//
// A devtest page "/devtest/badge-actions-svg" could be used to check the rendered images.
-var DejaVuGlyphWidthData = sync.OnceValue(func() map[rune]uint8 {
+func dejaVuGlyphWidthDataFunc() map[rune]uint8 {
return map[rune]uint8{
32: 3,
33: 4,
@@ -205,4 +203,4 @@ var DejaVuGlyphWidthData = sync.OnceValue(func() map[rune]uint8 {
254: 7,
255: 7,
}
-})
+}