LanguageLabel组件自动使用language/json/目录下的多语言TTF字体

This commit is contained in:
dgflash
2024-08-06 13:23:35 +08:00
parent 1ae3231a02
commit 739d7b16cb

View File

@@ -111,14 +111,14 @@ export class LanguageLabel extends Component {
var font: TTFFont | null = LanguageData.font
if (label) {
if (font && !label.useSystemFont) {
if (font) {
label.font = font;
}
label.string = this.string;
this.initFontSize = label.fontSize;
}
else if (richtext) {
if (font && !richtext.useSystemFont) {
if (font) {
richtext.font = font;
}
this.initFontSize = richtext.fontSize;