Skip to content

Commit 9f7b130

Browse files
committed
- Fix font glyphs being slightly cutoff.
1 parent 2fb4a5d commit 9f7b130

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cube/swiss/source/gui/IPLFontWrite.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ void drawString(int x, int y, char *string, float scale, int align, GXColor font
130130
int i;
131131
GX_Begin(GX_QUADS, GX_VTXFMT1, 4);
132132
for (i=0; i<4; i++) {
133-
int s = (i & 1) ^ ((i & 2) >> 1) ? width : 1;
134-
int t = (i & 2) ? font->cell_height : 1;
133+
int s = (i & 1) ^ ((i & 2) >> 1) ? width : 0;
134+
int t = (i & 2) ? font->cell_height : 0;
135135
GX_Position2s16(x + s, y + t);
136136
GX_Color4u8(fontColor.r, fontColor.g, fontColor.b, fontColor.a);
137137
GX_TexCoord2s16(s0 + s, t0 + t);
@@ -186,8 +186,8 @@ void drawStringWithCaret(int x, int y, char *string, float scale, int align, GXC
186186
int i;
187187
GX_Begin(GX_QUADS, GX_VTXFMT1, 4);
188188
for (i=0; i<4; i++) {
189-
int s = (i & 1) ^ ((i & 2) >> 1) ? width : 1;
190-
int t = (i & 2) ? font->cell_height : 1;
189+
int s = (i & 1) ^ ((i & 2) >> 1) ? width : 0;
190+
int t = (i & 2) ? font->cell_height : 0;
191191
GX_Position2s16(x + s, y + t);
192192
if(pos == caretPosition)
193193
GX_Color4u8(caretColor.r, caretColor.g, caretColor.b, caretColor.a);
@@ -279,8 +279,8 @@ void drawStringEllipsis(int x, int y, char *string, float scale, int align, GXCo
279279
int i;
280280
GX_Begin(GX_QUADS, GX_VTXFMT1, 4);
281281
for (i=0; i<4; i++) {
282-
int s = (i & 1) ^ ((i & 2) >> 1) ? width : 1;
283-
int t = (i & 2) ? font->cell_height : 1;
282+
int s = (i & 1) ^ ((i & 2) >> 1) ? width : 0;
283+
int t = (i & 2) ? font->cell_height : 0;
284284
GX_Position2s16(x + s, y + t);
285285
GX_Color4u8(fontColor.r, fontColor.g, fontColor.b, fontColor.a);
286286
GX_TexCoord2s16(s0 + s, t0 + t);

0 commit comments

Comments
 (0)