Drawer now draws tofu

Closes #2
This commit is contained in:
2024-09-03 17:59:07 -04:00
parent b0e80ce961
commit 021dd288b6
2 changed files with 46 additions and 6 deletions
+8
View File
@@ -220,3 +220,11 @@ func tofuAdvance (face font.Face) fixed.Int26_6 {
return 16
}
}
func tofuBounds (face font.Face) (fixed.Rectangle26_6, fixed.Int26_6) {
if bounds, advance, ok := face.GlyphBounds('M'); ok {
return bounds, advance
} else {
return fixed.R(0, -16, 14, 0), 16
}
}