Skip to content

Commit 97ecf06

Browse files
committed
Round down velo glyph advance
1 parent 4c6d516 commit 97ecf06

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/game_proc.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ void end_ffmpeg_proc()
12441244

12451245
s32 to_utf16(const char* value, s32 value_length, wchar* buf, s32 buf_chars)
12461246
{
1247-
auto length = MultiByteToWideChar(CP_UTF8, 0, value, value_length, buf, buf_chars);
1247+
s32 length = MultiByteToWideChar(CP_UTF8, 0, value, value_length, buf, buf_chars);
12481248

12491249
if (length < buf_chars)
12501250
{
@@ -1281,7 +1281,7 @@ static void unpremultiply(u8* bytes, s32 num)
12811281
{
12821282
for (s32 i = 0; i < num; i += 4)
12831283
{
1284-
auto a = bytes[i + 3];
1284+
u8 a = bytes[i + 3];
12851285
bytes[i + 0] /= (a / 255.0f);
12861286
bytes[i + 1] /= (a / 255.0f);
12871287
bytes[i + 2] /= (a / 255.0f);
@@ -1429,7 +1429,7 @@ bool create_velo_atlas(MovieProfile* p, ID3D11Device* d3d11_device, ID3D11Device
14291429

14301430
glyph_info.width = size_x;
14311431
glyph_info.height = size_y;
1432-
glyph_info.advance_x = aw;
1432+
glyph_info.advance_x = (s32)aw; // Always round advance down like GDI.
14331433
glyph_info.origin_y = (s32)(origin_y + 0.5f);
14341434
}
14351435

0 commit comments

Comments
 (0)