Merge pull request #7 from Bubble791/chinese_branch

修复字体代码缺失
This commit is contained in:
Bubble 2025-04-02 02:06:10 +08:00 committed by GitHub
commit 4c768d3c4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 6 deletions

View File

@ -54,13 +54,9 @@ u8 GetChineseFontWidthFunc(u8 fontId)
{
case FONT_SMALL:
case FONT_SMALL_NARROW:
case FONT_SMALL_NARROWER:
return 10;
case FONT_NORMAL:
case FONT_SHORT:
case FONT_SHORT_COPY_1:
case FONT_SHORT_COPY_2:
case FONT_SHORT_COPY_3:
case FONT_NARROW:
default:
return 12;
}
return 0;

View File

@ -1266,6 +1266,18 @@ static u16 RenderText(struct TextPrinter *textPrinter)
case FONT_SMALL_NARROW:
DecompressGlyph_SmallNarrow(currChar, textPrinter->japanese);
break;
case FONT_NARROWER:
DecompressGlyph_Narrower(currChar, textPrinter->japanese);
break;
case FONT_SMALL_NARROWER:
DecompressGlyph_SmallNarrower(currChar, textPrinter->japanese);
break;
case FONT_SHORT_NARROW:
DecompressGlyph_ShortNarrow(currChar, textPrinter->japanese);
break;
case FONT_SHORT_NARROWER:
DecompressGlyph_ShortNarrower(currChar, textPrinter->japanese);
break;
case FONT_BRAILLE:
break;
}