Repository navigation
fix(libSceFont): use current style for glyph and kerning scales - #8633
oneandonlydean merged 1 commit into
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Independent Linux testing of head
ctest --test-dir build -R '^(guest_font|guest_system_font|guest_font_writing_line|font_face_lifetime.*|guest_freetype)$' -V --timeout 30The new I also repeated the negative control locally: kept the PR's test and restored only its five production files from base Restored the exact PR implementation, rebuilt, and all seven focused tests passed again. Conventions and diff whitespace checks passed. Focused Linux runtime tests only; no full test-suite, game or console-hardware testing. No other unmerged PR was applied. AI-assisted: yes. |
|
@adriadam10 Could you run full Linux and Windows CI for #8250, #8633 and #8997 (full=true, linux=true, select=false)? My account has read-only access. I found no runs for these PRs among the latest 100 manual dispatches. Thank you. |
What
After setting a font size in points or changing its DPI, generated glyphs and ordinary kerning still use the pixel dimensions last written by sceFontSetScalePixel (or the initial 16-pixel defaults). The font's pixel getter and rendered metrics already use the current style, so those paths disagree.
Read ordinary kerning dimensions from the current style and capture each generated glyph's dimensions together with its metrics under the same font lock. Remove the obsolete duplicate dimensions from FontState, including instance copying. For example, 20 by 30 points at 144 DPI now produces a glyph reporting 40 by 60 pixels and the corresponding kerning; subsequent DPI changes are reflected consistently. Renderer-specific scaling remains independent.
#8058 is already merged and its fallback face selection is preserved. This changes sceFont behavior, separate from the native FreeType export added by #8558. No title or performance claim.
Tested
Windows 11 x64, required WinLibs MinGW-w64 GCC 15.2.0 r7 (x86_64-ucrt-posix-seh), Release, full root configuration with BUILD_TESTING=ON and bundled dependencies.
Built guest_font_tests, guest_system_font_tests, guest_font_writing_line_tests, font_face_lifetime_tests and guest_freetype_tests.
CTest focused pattern:
^(guest_font|guest_system_font|guest_font_writing_line|font_face_lifetime.*|guest_freetype)$, verbose, parallel 2, timeout 30: seven tests passed with zero skips.New runtime assertions cover point sizes, independent axis DPI, default/reset DPI, pixel sizing, generated glyph metadata, kerning, independent instances and renderer scale isolation.
Negative control: keep the new test but restore all five changed production files from main, rebuild guest_font_tests and confirm guest_font fails with the generated-glyph scale mismatch. Restore this change, rebuild, and all seven focused tests pass again.
cmake --build <build> --parallel 3 --target libs relinker: passed.python -B tools/check_conventions.py --base origin/main: passed.python -B tools/pr_overlap.py --branch codex/fix-font-point-dpi-scales: no reported conflicting lines/exports; manually inspected test: organize library tests and label CTest suites #6044, which renames GuestFont.cpp unchanged. Temporary merge-tree comparisons with our fix(libSceFont): accept overlapping render surface rows #8250 and other Font PRs fix(libSceFont): keep horizontal writing on a single baseline #5209/fix(libSceFont): open fonts and the system font directory under non-ASCII paths on Windows #8375 are clean.Final diff reviewed by Astra high with no unresolved findings.
Independent Linux validation by Filip722 on this exact head: Debian 13.7 x86-64, GCC 15.2.0, bundled FreeType 2.13.3; all seven focused tests passed without skips. The same negative control failed with the expected scale mismatch, then all seven tests passed after restoring the PR. This is contributor-reported focused runtime validation, not a full Linux build or test-suite run.
No game, console hardware, macOS runtime or complete CTest suite tested. The author's local build and runtime validation were on Windows.
Checklist
Based on current
main; no other open PR implements the same functionsOne topic per PR; follow-ups go in a new PR
No comments in code except technical debt
Unimplemented paths throw (
NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt fileNo notes, investigation
.mdfiles or images added to the repository (attach them to this PR)New third-party code is a submodule built from source
Generic behaviour, not specific to one title
Depends on: none
Fixes: none
Unblocks: none
GPUs tested: n/a
AI-assisted: yes