From 9d89f7c8b17c8217838d955f6c33bafba9c4a973 Mon Sep 17 00:00:00 2001 From: Chris Waldon Date: Thu, 9 Nov 2023 15:36:53 -0500 Subject: [PATCH] text: add system font loads to debug log This commit adds a GIODEBUG=text log message each time a system font is resolved. This makes it vastly easier for application authors to determine which system fonts are being used by their application. Signed-off-by: Chris Waldon --- text/gotext.go | 1 + 1 file changed, 1 insertion(+) diff --git a/text/gotext.go b/text/gotext.go index 066e18f5..a4d3b257 100644 --- a/text/gotext.go +++ b/text/gotext.go @@ -284,6 +284,7 @@ func (s *shaperImpl) addFace(f font.Face, md giofont.Font) { if _, ok := s.faceToIndex[f.Font]; ok { return } + s.logger.Printf("loaded face %s(style:%s, weight:%d)", md.Typeface, md.Style, md.Weight) idx := len(s.faces) s.faceToIndex[f.Font] = idx s.faces = append(s.faces, f)