Skip to content

test(libSceFont): cover vertical layout scaling - #12018

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
00xDisaster:feat/font-vertical-layout
Nov 2, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
00xDisaster:feat/font-vertical-layout

Conversation

@00xDisaster

@00xDisaster 00xDisaster commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

What

Cover sceFontGetVerticalLayout with a fixture font that has vhea and vmtx tables and non-symmetric horizontal bounds. The new guest_font_vertical_layout test checks the null-layout and invalid-handle results, that a failed call clears the caller's layout, and that a valid call returns a positive column advance, a negative baseline offset and the fixture's zero decoration span.

It also checks that the result survives a DPI change at the same scale, changes after a scale change, and matches between a font and an instance opened from it.

This is coverage only; the implementation is unchanged.

Tested

Linux x86_64, GCC, Release. Built guest_font_vertical_layout_tests and ran ctest -R '^guest_font_vertical_layout$'; passed. Conventions, test registration and git diff --check pass.

  • Windows 11 26300, WinLibs GCC 15.2.0, Release (maskym, independent run; this run predates the rebase): build clean; guest_font_vertical_layout and the other 11 libSceFont tests registered from its test sources passed 12/12. Not run on a PS5.
  • Windows 11 Enterprise 10.0.22621, WinLibs GCC 15.2.0 UCRT r7, Release (JJenkx, independent run): guest_font_vertical_layout and guest_font passed in each of 3 runs; the Windows PATH entry lets the test find libSceFont.prx.

No game was run.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One 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 file
  • No notes, investigation .md files 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: no

@JJenkx

JJenkx commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

A Windows run, since the description lists Linux only. Head 9c03b2f708 was merged onto main 6d99bf4ccb with no conflicts. Setup: Windows 11 Enterprise 10.0.22621, WinLibs GCC 15.2.0 UCRT r7, Ninja, Release, BUILD_TESTING=ON.

Result: guest_font_vertical_layout and guest_font pass in each of 3 runs. The new registration's Windows PATH entry works: the test starts and finds libSceFont.prx.

AI-assisted: yes (Claude Code).

@maskym

maskym commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Windows result for head 9c03b2f708, merged alone into main f759e165d9 (the PR's Tested section names no Windows run; #12025, #12012 and #12008 touch the same libSceFont test files, so this PR was tested alone).

Host: Windows 11 26300, Intel i7-12700K, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, BUILD_TESTING=ON, Ninja. Build clean.

Tests: guest_font_vertical_layout and the other 11 libSceFont tests registered from its test sources (12/12 passed). Not run on a PS5.

AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine.

@00xDisaster

Copy link
Copy Markdown
Contributor Author

@JJenkx and @maskym thanks, I added both Windows results to Tested. The 3/3 guest_font_vertical_layout run and the 12/12 libSceFont run cover the registration and PATH entry. The only overlap is the CMakeLists block shared with #8250.

@oneandonlydean oneandonlydean self-assigned this Oct 28, 2026
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 28, 2026
@00xDisaster
00xDisaster force-pushed the feat/font-vertical-layout branch from 9c03b2f to 7cfa9f1 Compare October 28, 2026 13:15
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 28, 2026
@00xDisaster

Copy link
Copy Markdown
Contributor Author

@JJenkx @maskym the branch was rebased onto current main after #12008 landed, and the CMake conflict is resolved. The new head is 7cfa9f1f7a; the test target and code are unchanged. Could you rerun Windows on this head?

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 28, 2026

@THEMANnt THEMANnt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 7cfa9f1f7ac668cbb6fae8c5186f31651aaaee8b against 750cf6cf487f948017295b1f3717af6f886f0f85. The synthetic font contains explicit vertical-metric tables and bounds. The fixture covers null/invalid handles, output clearing, pixel-versus-DPI behavior, point scaling, inherited instance layout and allocator cleanup. Its new CMake target has the runtime path and timeout. No actionable finding in this scoped test review.

Windows/GCC 15.3 Release: configured and built the registered target from pinned sources; focused CTest: 1 passed, 0 skipped. Checked that the fixture assertions remain active in Release. The added target is absent from the author base; no baseline runtime execution of that new fixture is claimed. Production source and the changed test-registration blocks were source-compared. Matching cached dependency source pins and the existing matching FFmpeg package are used. No game, physical-console or GPU validation is claimed.

Publication-time checks: merge conflict with main. Please complete these checks before final approval; this status alone is not a demonstrated implementation defect.

@00xDisaster
00xDisaster force-pushed the feat/font-vertical-layout branch from 7cfa9f1 to 296a387 Compare October 29, 2026 11:07
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 29, 2026
@00xDisaster

Copy link
Copy Markdown
Contributor Author

@THEMANnt thanks for the scoped review. The branch is refreshed onto current main (49025cb436) at head 296a387005; the CMake conflict with the merged Font test is resolved and the test code is unchanged. guest_font_vertical_layout passes, conventions and git diff --check are clean, and the body now records the refreshed Windows result. @maskym @JJenkx could you rerun Windows on this head?

@THEMANnt THEMANnt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed 296a38700598d84360b432c7b1b3eb4f4570391c against merge base 49025cb4362f9eaffe5395c911ef8e769556aa89. The previous CMake conflict is resolved, and the fixture source is byte-for-byte unchanged from my earlier review. No actionable finding in this scoped test review.

Validation: fresh Windows/GCC 15.3 Release configuration and build; guest_font_vertical_layout passed (1/1, 0 skipped). Reviewed the registration, runtime PATH and 30-second timeout, and checked the vertical layout, invalid handles, output clearing, DPI invariance and instance inheritance assertions against the implementation. Checks remain active in Release; git diff --check passed. Production code is unchanged by this PR; no baseline runtime run of the added fixture or physical-console/game test is claimed.

@00xDisaster

Copy link
Copy Markdown
Contributor Author

Correction to my last comment: the Windows result in Tested is from before the rebase, not from 296a387005. The refreshed head is Linux-tested (guest_font_vertical_layout passes) and the current Windows check is running. I updated the body wording so it does not claim a Windows run on the refreshed head.

@oneandonlydean
oneandonlydean merged commit e3e702b into boykopovar:main Nov 2, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants