diff --git a/src/v_font.cpp b/src/v_font.cpp index 56a7ad811..ea6feb149 100644 --- a/src/v_font.cpp +++ b/src/v_font.cpp @@ -1352,8 +1352,8 @@ FSinglePicFont::FSinglePicFont(const char *picname) FTexture *pic = TexMan[picnum]; Name = copystring(picname); - FontHeight = pic->GetHeight(); - SpaceWidth = pic->GetWidth(); + FontHeight = pic->GetScaledHeight(); + SpaceWidth = pic->GetScaledWidth(); GlobalKerning = 0; FirstChar = LastChar = 'A'; ActiveColors = 0; diff --git a/src/v_text.cpp b/src/v_text.cpp index be386e992..6cba83c9c 100644 --- a/src/v_text.cpp +++ b/src/v_text.cpp @@ -324,7 +324,7 @@ FBrokenLines *V_BreakLines (FFont *font, int maxwidth, const BYTE *string) i = w = 0; - while ( (c = *string++) && i < 128 ) + while ( (c = *string++) && i < countof(lines) ) { if (c == TEXTCOLOR_ESCAPE) { @@ -400,7 +400,7 @@ FBrokenLines *V_BreakLines (FFont *font, int maxwidth, const BYTE *string) } // String here is pointing one character after the '\0' - if (i < 128 && --string - start >= 1) + if (i < countof(lines) && --string - start >= 1) { const BYTE *s = start;