Display all styles from STAT table

This commit is contained in:
Kovid Goyal
2024-05-04 08:02:13 +05:30
parent 96c17b0a67
commit ffed63a048
2 changed files with 50 additions and 14 deletions

View File

@@ -89,9 +89,11 @@ func (h *handler) draw_family_summary(start_x int, sz loop.ScreenSize) (err erro
}
if has_variable_data_for_font(fonts[0]) {
s := styles_in_family(family, fonts)
styles := "Styles: " + strings.Join(s.styles, ", ")
add_line(styles)
add_line("")
for _, sg := range s.style_groups {
styles := sg.name + ": " + strings.Join(sg.styles, ", ")
add_line(styles)
add_line("")
}
add_line(fmt.Sprintf("Press the %s key to choose this family", h.lp.SprintStyled("fg=yellow", "Enter")))
} else {
lines = append(lines, "Reading font data, please wait…")