🎨 Improve export PDF footer font

This commit is contained in:
Liang Ding 2023-04-01 12:30:53 +08:00
parent f213d55fa9
commit 2489633760
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -36,6 +36,11 @@ var (
func GetPreferredFontFilePath(currentLanguage string) *Font {
fonts := loadFonts(currentLanguage)
for _, font := range fonts {
logging.LogInfof("font: %+v", font)
}
sort.Slice(fonts, func(i, j int) bool { return len(fonts[i].Family) > len(fonts[j].Family) })
for _, font := range fonts {
if gulu.Str.Contains(font.Family, preferredFonts) {