Ports: Make substitution character less confusing

This commit is contained in:
Jeffrey Pfau 2015-11-01 09:17:01 -08:00
parent b99b680ca2
commit d357b93285
3 changed files with 5 additions and 5 deletions

View File

@ -60,7 +60,7 @@ void GUIFontDrawGlyph(const struct GUIFont* font, int glyph_x, int glyph_y, uint
ctrActivateTexture(&font->texture);
if (glyph > 0x7F) {
glyph = 0;
glyph = '?';
}
struct GUIFontGlyphMetric metric = defaultFontMetrics[glyph];

View File

@ -40,14 +40,14 @@ unsigned GUIFontHeight(const struct GUIFont* font) {
unsigned GUIFontGlyphWidth(const struct GUIFont* font, uint32_t glyph) {
UNUSED(font);
if (glyph > 0x7F) {
glyph = 0;
glyph = '?';
}
return defaultFontMetrics[glyph].width * 2;
}
void GUIFontDrawGlyph(const struct GUIFont* font, int x, int y, uint32_t color, uint32_t glyph) {
if (glyph > 0x7F) {
glyph = 0;
glyph = '?';
}
struct GUIFontGlyphMetric metric = defaultFontMetrics[glyph];
vita2d_draw_texture_tint_part_scale(font->tex, x, y + (-GLYPH_HEIGHT + metric.padding.top) * 2,

View File

@ -48,7 +48,7 @@ unsigned GUIFontHeight(const struct GUIFont* font) {
unsigned GUIFontGlyphWidth(const struct GUIFont* font, uint32_t glyph) {
UNUSED(font);
if (glyph > 0x7F) {
glyph = 0;
glyph = '?';
}
return defaultFontMetrics[glyph].width;
}
@ -66,7 +66,7 @@ void GUIFontDrawGlyph(const struct GUIFont* font, int x, int y, uint32_t color,
GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0);
if (glyph > 0x7F) {
glyph = 0;
glyph = '?';
}
struct GUIFontGlyphMetric metric = defaultFontMetrics[glyph];
s16 tx = (glyph & 15) * CELL_WIDTH + metric.padding.left;