add arabic, hebrew, chinese and others stuff.

This commit is contained in:
fiatjaf
2023-10-19 21:10:58 -03:00
parent 3e762a8eea
commit 8c7333e49f
7 changed files with 30 additions and 0 deletions

BIN
fonts/NotoSansArabic.ttf Normal file

Binary file not shown.

BIN
fonts/NotoSansBengali.ttf Normal file

Binary file not shown.

BIN
fonts/NotoSansHebrew.ttf Normal file

Binary file not shown.

BIN
fonts/NotoSansKR.ttf Normal file

Binary file not shown.

BIN
fonts/NotoSansTC.ttf Normal file

Binary file not shown.

BIN
fonts/NotoSansThai.ttf Normal file

Binary file not shown.

View File

@@ -268,6 +268,36 @@ func getLanguage(text string) (*truetype.Font, bool, error) {
"fonts/NotoSansJP.ttf",
true,
},
{
unicode.Han,
"fonts/NotoSansTC.ttf",
true,
},
{
unicode.Hangul,
"fonts/NotoSansKR.ttf",
true,
},
{
unicode.Arabic,
"fonts/NotoSansArabic.ttf",
false,
},
{
unicode.Hebrew,
"fonts/NotoSansHebrew.ttf",
false,
},
{
unicode.Bengali,
"fonts/NotoSansBengali.ttf",
false,
},
{
unicode.Thai,
"fonts/NotoSansThai.ttf",
false,
},
} {
for _, rune := range text {
rune16 := uint16(rune)