Improve macOS Retina UI clarity and bundle HD assets

This commit is contained in:
shen
2026-09-30 16:13:31 -07:00
parent 905f23f135
commit d1f8d3dddd
26 changed files with 505 additions and 134 deletions
@@ -48,7 +48,7 @@
"test": [
"tests/port/port_text_test.cpp"
],
"note": "40250: deletes each HFONT of the font map. Port: also deletes its oversampled twin. Invariant: 40250 teardown; no leaked GDI fonts."
"note": "40250 deletes fonts/pages. PORT also unregisters the live raster atlas and deletes oversampled twins; rebuilding preserves cached character-info node addresses. See docs/MAC-UI-CLARITY.md and audit/evidence/2026-09-30-mac-ui-clarity.md."
},
"CGraphicFontTexture::CreateDeviceObjects": {
"status": "PORTED",
@@ -76,7 +76,7 @@
"test": [
"tests/port/port_text_test.cpp"
],
"note": "40250: the page DIB is width x height. Port: width*s x height*s for oversample s (1 by default = 40250). Invariant: logical page size, metrics and UVs unchanged."
"note": "40250 retains logical font metrics and atlas dimensions. PORT allocates 1–4x raster pages and registers successful atlases for monitor-density refresh; port.text verifies unchanged width/height/advance and stable glyph pointers. See docs/MAC-UI-CLARITY.md and audit/evidence/2026-09-30-mac-ui-clarity.md."
},
"CGraphicFontTexture::GetFont": {
"status": "ADAPTED",
@@ -89,22 +89,24 @@
"note": "40250: CreateFontIndirect per code page. Port: with s > 1 also creates an s-times-height twin for drawing. Invariant: the measuring font is the 40250 one."
},
"CGraphicFontTexture::AppendTexture": {
"status": "PORTED",
"status": "ADAPTED",
"impl": [
"src/platform/EterLib/GrpFontTexture.cpp:CGraphicFontTexture::AppendTexture"
],
"test": [
"tests/port/port_text_test.cpp"
]
],
"note": "40250 creates A4R4G4B4 pages. PORT uses A8R8G8B8 for HiDPI pages to retain 256 coverage levels; 1x still uses A4R4G4B4. tests/port/port_text_test.cpp checks alpha finer than 4-bit. See docs/MAC-UI-CLARITY.md and audit/evidence/2026-09-30-mac-ui-clarity.md."
},
"CGraphicFontTexture::UpdateTexture": {
"status": "PORTED",
"status": "ADAPTED",
"impl": [
"src/platform/EterLib/GrpFontTexture.cpp:CGraphicFontTexture::UpdateTexture"
],
"test": [
"tests/port/port_text_test.cpp"
]
],
"note": "40250 copies DIB cells into 16-bit pages. PORT copies 32-bit ARGB rows for HiDPI pages; 1x retains the original conversion. Tests check actual published memory textures. See docs/MAC-UI-CLARITY.md and audit/evidence/2026-09-30-mac-ui-clarity.md."
},
"CGraphicFontTexture::GetCharacterInfomation": {
"status": "PORTED",
@@ -123,7 +125,7 @@
"test": [
"tests/port/port_text_test.cpp"
],
"note": "40250: TextOutW with the 1x font, bilevel threshold into A4R4G4B4. Port: with s > 1 draws the glyph with the twin into the s-scaled cell keeping coverage alpha; s == 1 is the 40250 path. Invariant: width/height/advance and packing are the logical 1x values."
"note": "40250 measures the logical font and caches metrics/UVs. PORT draws oversampled white glyphs with 8-bit coverage and preserves logical metrics. Monitor changes rebuild map values in place without invalidating text-instance pointers; port.text tests 1→2→3→1→2 scales. See docs/MAC-UI-CLARITY.md and audit/evidence/2026-09-30-mac-ui-clarity.md."
},
"CGraphicFontTexture::CheckTextureIndex": {
"status": "PORTED",
@@ -57,7 +57,7 @@
"test": [
"tests/port/port_grp_resource_test.cpp"
],
"note": "40250: SetPDTStream + DEFAULT_IB_FILL_RECT + stage-0 texture, DrawIndexedPrimitive. Port: the same four TPDTVertex corners/UVs/diffuse go to UIRenderAddImage. Invariant: quad = image rect at m_v2Position-0.5, UVs = rect/texture size."
"note": "40250: SetPDTStream + DEFAULT_IB_FILL_RECT + stage-0 texture, DrawIndexedPrimitive. Port: the same four TPDTVertex corners/UVs/diffuse go to UIRenderAddImage. Invariant: quad = image rect at m_v2Position-0.5, UVs = rect/texture size. 2026-09-30: native host snaps axis-aligned quad origins by at most half a physical pixel and uses point sampling only at 1:1 texel/pixel density; source layout/UVs and rotated quads unchanged. host.ui_quality + mac UI screenshots. See docs/MAC-UI-CLARITY.md."
},
"CGraphicImageInstance::GetTextureReference": {
"status": "PORTED",