diff --git a/src/backends/sdl2_renderer.cpp b/src/backends/sdl2_renderer.cpp index f56b579..3bd2800 100644 --- a/src/backends/sdl2_renderer.cpp +++ b/src/backends/sdl2_renderer.cpp @@ -233,8 +233,8 @@ ret_code Renderer::drawText(Context &ctx, const char *string, Font *font, const case Alignment::Left: Message_rect.x = r.top.x + margin; Message_rect.y = r.top.y + margin; - Message_rect.w = font->mSize; - Message_rect.h = font->mSize; + Message_rect.w = font->mSize*static_cast(strlen(string)); + Message_rect.h = font->mSize + margin*2; break; case Alignment::Center: Message_rect.x = r.top.x + 2 * margin + surfaceMessage->clip_rect.w / 2; diff --git a/src/tinyui.cpp b/src/tinyui.cpp index 95f51c7..3415812 100644 --- a/src/tinyui.cpp +++ b/src/tinyui.cpp @@ -38,7 +38,7 @@ static Style DefaultStyle { Color4{ 100, 100, 100, 0 }, Color4{ 200, 200, 200, 0 }, 8, - { "Arial.ttf", 35, nullptr } + { "Arial.ttf", 12, nullptr } }; static constexpr char const *SeverityToken[] = {