android-native: real-server login by default, readable CJK text, 16 KB pages
- FreeType: add the cff/psaux/pshinter modules (from the pinned 2.13.3 tarball, same sha256). Android's only CJK font is the CFF2 NotoSansCJK-Regular.ttc, which the TrueType-only build could not open, so every Chinese glyph drew as a box. - Font oversample rounds the UI density up: Android's 1760x800 UI on a 2376x1080 screen is 1.35, which rounded to 1x bilevel glyphs stretched 1.35x. Now 2x anti-aliased glyphs are scaled down. macOS 2.0 unchanged. - MainActivity: a launcher start (no intent args) opens the login screen against 192.168.21.203 instead of auto-logging into the in-process fake server; explicit args still select the fake-server smoke flow. - build-android-native.sh: ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON for SDL3 and libmain (LOAD alignment 0x1000 -> 0x4000), with a stamp that rebuilds a cached pre-flag SDL3. Clears Android's 16 KB compat warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
3c52ced02e
commit
53d06c3c26
@@ -3307,9 +3307,11 @@ int run_live_client(
|
||||
|
||||
{
|
||||
// HiDPI text: rasterise glyph pages at the swapchain's pixels per UI pixel (before any font
|
||||
// exists). MT_FONT_OVERSAMPLE=1 keeps the 40250 bilevel 1x glyphs.
|
||||
// exists). Rounded up: a fractional density (Android 1760x800 UI on 2376x1080 = 1.35) then
|
||||
// scales finer glyphs down instead of stretching 1x ones. MT_FONT_OVERSAMPLE=1 keeps the
|
||||
// 40250 bilevel 1x glyphs.
|
||||
const float density = float(renderer.width()) / float(std::max(1u, renderer.logical_width()));
|
||||
int oversample = std::clamp(int(std::lround(density)), 1, 4);
|
||||
int oversample = std::clamp(int(std::ceil(density - 0.05f)), 1, 4);
|
||||
if (const char* env = std::getenv("MT_FONT_OVERSAMPLE")) oversample = std::max(1, std::atoi(env));
|
||||
UISetFontOversample(oversample);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user