From 6f323875673bb24a9831df0cfd08a2f2ea65fb1b Mon Sep 17 00:00:00 2001 From: shenlei Date: Wed, 30 Sep 2026 14:21:37 +0900 Subject: [PATCH] audit: GrpFontTexture port-map (40250 bodies, HiDPI oversample adaptations) Co-Authored-By: Claude Opus 5.5 --- audit/history.jsonl | 1 + .../port-map/EterLib/GrpFontTexture.cpp.json | 124 +++++++++++++++--- 2 files changed, 110 insertions(+), 15 deletions(-) diff --git a/audit/history.jsonl b/audit/history.jsonl index 3e312067..2d40ef49 100644 --- a/audit/history.jsonl +++ b/audit/history.jsonl @@ -633,3 +633,4 @@ {"date": "2026-09-30", "unit": "EterLib/GrpVertexBuffer.cpp", "action": "port", "evidence": "CPU buffers, bodies otherwise 40250; port.grp_resource"} {"date": "2026-09-30", "unit": "EterLib/GrpImageInstance.cpp", "action": "port", "evidence": "verbatim; draw via UIRenderAddImage; port.grp_resource quad/uv/colour"} {"date": "2026-09-30", "unit": "EterLib/GrpExpandedImageInstance.cpp", "action": "port", "evidence": "verbatim; draw + blend mode via UIRenderAddImage, SCREEN/COLOR_DODGE blend fixed to INVDESTCOLOR (0x2A); OnIsType recursion avoided; port.grp_resource"} +{"date": "2026-09-30", "unit": "EterLib/GrpFontTexture.cpp", "action": "port", "evidence": "40250 bodies over Win32Gdi; HiDPI oversample adaptations noted; port.text"} diff --git a/audit/port-map/EterLib/GrpFontTexture.cpp.json b/audit/port-map/EterLib/GrpFontTexture.cpp.json index 6fa13d68..a3e421b2 100644 --- a/audit/port-map/EterLib/GrpFontTexture.cpp.json +++ b/audit/port-map/EterLib/GrpFontTexture.cpp.json @@ -5,49 +5,143 @@ "contracts": [], "functions": { "CGraphicFontTexture::CGraphicFontTexture": { - "status": "TODO" + "status": "PORTED", + "impl": [ + "src/platform/EterLib/GrpFontTexture.cpp:CGraphicFontTexture::CGraphicFontTexture" + ], + "test": [ + "tests/port/port_text_test.cpp" + ] }, "CGraphicFontTexture::~CGraphicFontTexture": { - "status": "TODO" + "status": "PORTED", + "impl": [ + "src/platform/EterLib/GrpFontTexture.cpp:CGraphicFontTexture::~CGraphicFontTexture" + ], + "test": [ + "tests/port/port_text_test.cpp" + ] }, "CGraphicFontTexture::Initialize": { - "status": "TODO" + "status": "PORTED", + "impl": [ + "src/platform/EterLib/GrpFontTexture.cpp:CGraphicFontTexture::Initialize" + ], + "test": [ + "tests/port/port_text_test.cpp" + ] }, "CGraphicFontTexture::IsEmpty": { - "status": "TODO" + "status": "PORTED", + "impl": [ + "src/platform/EterLib/GrpFontTexture.cpp:CGraphicFontTexture::IsEmpty" + ], + "test": [ + "tests/port/port_text_test.cpp" + ] }, "CGraphicFontTexture::Destroy": { - "status": "TODO" + "status": "ADAPTED", + "impl": [ + "src/platform/EterLib/GrpFontTexture.cpp:CGraphicFontTexture::Destroy" + ], + "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." }, "CGraphicFontTexture::CreateDeviceObjects": { - "status": "TODO" + "status": "PORTED", + "impl": [ + "src/platform/EterLib/GrpFontTexture.cpp:CGraphicFontTexture::CreateDeviceObjects" + ], + "test": [ + "tests/port/port_text_test.cpp" + ] }, "CGraphicFontTexture::DestroyDeviceObjects": { - "status": "TODO" + "status": "PORTED", + "impl": [ + "src/platform/EterLib/GrpFontTexture.cpp:CGraphicFontTexture::DestroyDeviceObjects" + ], + "test": [ + "tests/port/port_text_test.cpp" + ] }, "CGraphicFontTexture::Create": { - "status": "TODO" + "status": "ADAPTED", + "impl": [ + "src/platform/EterLib/GrpFontTexture.cpp:CGraphicFontTexture::Create" + ], + "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." }, "CGraphicFontTexture::GetFont": { - "status": "TODO" + "status": "ADAPTED", + "impl": [ + "src/platform/EterLib/GrpFontTexture.cpp:CGraphicFontTexture::GetFont" + ], + "test": [ + "tests/port/port_text_test.cpp" + ], + "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": "TODO" + "status": "PORTED", + "impl": [ + "src/platform/EterLib/GrpFontTexture.cpp:CGraphicFontTexture::AppendTexture" + ], + "test": [ + "tests/port/port_text_test.cpp" + ] }, "CGraphicFontTexture::UpdateTexture": { - "status": "TODO" + "status": "PORTED", + "impl": [ + "src/platform/EterLib/GrpFontTexture.cpp:CGraphicFontTexture::UpdateTexture" + ], + "test": [ + "tests/port/port_text_test.cpp" + ] }, "CGraphicFontTexture::GetCharacterInfomation": { - "status": "TODO" + "status": "PORTED", + "impl": [ + "src/platform/EterLib/GrpFontTexture.cpp:CGraphicFontTexture::GetCharacterInfomation" + ], + "test": [ + "tests/port/port_text_test.cpp" + ] }, "CGraphicFontTexture::UpdateCharacterInfomation": { - "status": "TODO" + "status": "ADAPTED", + "impl": [ + "src/platform/EterLib/GrpFontTexture.cpp:CGraphicFontTexture::UpdateCharacterInfomation" + ], + "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." }, "CGraphicFontTexture::CheckTextureIndex": { - "status": "TODO" + "status": "PORTED", + "impl": [ + "src/platform/EterLib/GrpFontTexture.cpp:CGraphicFontTexture::CheckTextureIndex" + ], + "test": [ + "tests/port/port_text_test.cpp" + ] }, "CGraphicFontTexture::SelectTexture": { - "status": "TODO" + "status": "PORTED", + "impl": [ + "src/platform/EterLib/GrpFontTexture.cpp:CGraphicFontTexture::SelectTexture" + ], + "test": [ + "tests/port/port_text_test.cpp" + ] } } }