mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-02 02:35:24 +02:00
Correctly resize text on Android / non sys fonts.
This commit is contained in:
@@ -164,6 +164,8 @@ void UIContext::DrawText(const char *str, float x, float y, uint32_t color, int
|
||||
|
||||
void UIContext::DrawTextRect(const char *str, const Bounds &bounds, uint32_t color, int align) {
|
||||
if (!textDrawer_ || (align & FLAG_DYNAMIC_ASCII)) {
|
||||
float sizeFactor = (float)fontStyle_->sizePts / 24.0f;
|
||||
Draw()->SetFontScale(fontScaleX_ * sizeFactor, fontScaleY_ * sizeFactor);
|
||||
Draw()->DrawTextRect(fontStyle_->atlasFont, str, bounds.x, bounds.y, bounds.w, bounds.h, color, align);
|
||||
} else {
|
||||
textDrawer_->SetFontScale(fontScaleX_, fontScaleY_);
|
||||
|
||||
Reference in New Issue
Block a user