feat(libSceFont): implement attributes and text code stepping #2497
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2497"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by tarfouss3 on 2026-10-09T23:12:28Z.
What
Implements 6 exports that called NotImplemented: sceFontDefineAttribute, sceFontGetAttribute, sceFontCharactersRefersTextCodes, sceFontTextCodesStepNext, sceFontTextCodesStepBack, sceFontCharacterGetSyllableStringState.
The source of each function's signature and behaviour is recorded in docs/dev/TechnicalDebt.md; none is confirmed on a title, and inputs whose console behaviour is not established throw.
Left as stubs, as no reference establishes their signature or behaviour: sceFontControl, sceFontCreateWords, sceFontDestroyWords, sceFontWordsFindWordCharacters, sceFontGetFontGlyphsOutlineProfile, sceFontGetFontMetrics, sceFontGetFontStyleInformation, sceFontGetGlyphExpandBufferState, sceFontSupportGlyphs, sceFontGetScriptLanguage, sceFontSetScriptLanguage, sceFontGetTypographicDesign, sceFontSetTypographicDesign, sceFontGlyphGetAttribute, sceFontGlyphRenderImage, sceFontGlyphRenderImageHorizontal, sceFontGlyphRenderImageVertical, sceFontCreateGraphicsDevice, sceFontCreateGraphicsService, sceFontCreateGraphicsServiceWithEdition, sceFontDestroyGraphicsDevice, sceFontDestroyGraphicsService, sceFontGraphicsBeginFrame, sceFontGraphicsDrawingCancel, sceFontGraphicsDrawingFinish, sceFontGraphicsEndFrame, sceFontGraphicsExchangeResource, sceFontGraphicsGetDeviceUsage, sceFontGraphicsRegionInit, sceFontGraphicsRegionInitCircular, sceFontGraphicsRegionInitRoundish, sceFontGraphicsRelease, sceFontGraphicsRenderResource, sceFontGraphicsSetFramePolicy, sceFontGraphicsStructureCanvas, sceFontGraphicsStructureCanvasSequence, sceFontGraphicsStructureDesign, sceFontGraphicsStructureDesignResource, sceFontGraphicsStructureSurfaceTexture, sceFontGraphicsDrawupFillTextureImageObject, sceFontGraphicsDrawupFillTexturePatternObject, sceFontGraphicsFillMethodInit, sceFontGraphicsFillPlotInit, sceFontGraphicsFillPlotSetLayout, sceFontGraphicsFillPlotSetMapping, sceFontGraphicsFillRatesInit, sceFontGraphicsFillRatesSetFillEffect, sceFontGraphicsFillRatesSetLayout, sceFontGraphicsFillRatesSetMapping, sceFontGraphicsSetupClipping, sceFontGraphicsSetupColorRates, sceFontGraphicsSetupFillMethod, sceFontGraphicsSetupFillRates, sceFontGraphicsSetupGlyphFill, sceFontGraphicsSetupGlyphFillPlot, sceFontGraphicsSetupHandleDefault, sceFontGraphicsSetupLocation, sceFontGraphicsSetupPositioning, sceFontGraphicsSetupRotation, sceFontGraphicsSetupScaling, sceFontGraphicsSetupShapeFill, sceFontGraphicsSetupShapeFillPlot, sceFontGraphicsUpdateClipping, sceFontGraphicsUpdateColorRates, sceFontGraphicsUpdateFillMethod, sceFontGraphicsUpdateFillRates, sceFontGraphicsUpdateGlyphFill, sceFontGraphicsUpdateGlyphFillPlot, sceFontGraphicsUpdateLocation, sceFontGraphicsUpdatePositioning, sceFontGraphicsUpdateRotation, sceFontGraphicsUpdateScaling, sceFontGraphicsUpdateShapeFill, sceFontGraphicsUpdateShapeFillPlot, sceFontFtInitAliases, sceFontFtSetAliasFont, sceFontFtSetAliasPath, sceFontFtSupportBdf, sceFontFtSupportCid, sceFontFtSupportFontFormats, sceFontFtSupportOpenType, sceFontFtSupportOpenTypeOtf, sceFontFtSupportOpenTypeTtf, sceFontFtSupportPcf, sceFontFtSupportPfr, sceFontFtSupportSystemFonts, sceFontFtSupportTrueType, sceFontFtSupportTrueTypeGx, sceFontFtSupportType1, sceFontFtSupportType42, sceFontFtSupportWinFonts, sceFontFtTermAliases, sceFontSelectGlyphsFt.
Tested
Linux x86-64 (Ubuntu 24.04, GCC 13.3, Release,
BUILD_TESTING=ON), this branch alone on top ofmain(5bc7886a): full build andlibs, then the wholectestsuite with Vulkan on lavapipe: 521 of 523 passed. The two failures are environmental and also fail without this change:agc_driver_vopc_compare(lavapipe result) andguest_sce_net(the test machine has no IPv6, so the existingCheckUnspecifiedIpv6aborts). Tests added or extended for this change:guest_font,guest_font_text,guest_font_writing_line,guest_system_font.tools/check_conventions.pypasses. Not tested with a title.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-09T23:17:30Z.
Checked build and ctest (
guest_font,guest_font_writing_line,guest_font_text), the attribute/stepping behaviour against KytyPS5libFont.cppand the vertical flag againstsceFontRenderCharGlyphImageon main.Added one commit: dropped the three TechnicalDebt entries for the Graphics/Ft stubs, which this PR does not touch (they belong in a PR that changes those functions).
Merging once CI is green.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T23:18:39Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/tests/GuestFont.cppL5-6, L79-86Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T23:27:19Z.
Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T23:47:06Z.
Progress report (
5cb747c→57bd47c)📈 System libraries: 85.88% (+0.2%, +6 implemented functions)
✅ 6 implemented
sceFontCharacterGetSyllableStringStatesceFontCharactersRefersTextCodessceFontDefineAttributesceFontGetAttributesceFontTextCodesStepBacksceFontTextCodesStepNextImported from boykopovar/AnyPS5. Originally posted by Mouad-Scriptz-0 on 2026-10-11T12:38:16Z.
A title now stops on
sceFontCharacterGetSyllableStringStateonmain: Killzone: Liberation (PPSA11142 01.000.004, Sony's PSP emulator wrapper), Linux,main0f863c10with #1693, #3428 and my fence branch from #3534 merged locally for its three earlier stops, and Noto fonts inanyps5-fonts/sosceFontOpenFontSet(0x1808B4D4)succeeds:The title's layout loop (
0x353a82) walkssceFontStringRefersTextCharacters→sceFontCharacterGetBidiLevel→sceFontCharacterGetTextFontCode→sceFontCharacterLooksWhiteSpace→sceFontCharacterGetSyllableStringState(character, &state)→sceFontCharacterRefersTextNext, so the(const FontTextCharacter*, int*)signature here matches the call, and the title testsstate == 1before checking the text code against",(and[.With this branch's
libSceFont-module.prx(head57bd47c5, built as is) the title gets past it and stops at the next font gap,sceFontWritingLineWritesOrder: writing attribute 2147483898 is not modelled(attribute0x8000010A), which is outside this PR. Without fonts the title runs to its controls screen with no text. The branch no longer merges cleanly onto currentmain.AI-assisted: yes (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by santhoshkumar-dev on 2026-10-11T13:15:29Z.
@tarfouss3 @Mouad-Scriptz-0 Since #2497 was closed by the intake pause and Killzone now stops on
sceFontCharacterGetSyllableStringState, I've carried just that function from this PR onto currentmain(a11c8f7f), with tarfouss3 as co-author:santhoshkumar-dev:feat/font-syllable-string-state(3f202abb). It reports 0 when the character and its neighbours are outside complex scripts (this PR's ranges) and throws otherwise. The newguest_font_texttest passes on Windows and Linux; withmain's stub it aborts with the samenot implementedline as the title.Killzone's next stop you saw (
WritesOrderattribute0x800000FA) should already pass on currentmain: since #3260, bit 31 isSPACE_AFTER, andguest_font_writing_linecovers0xFA | SPACE_AFTER.@tarfouss3, if you'd rather reopen #2497 yourself, say so and I'll drop mine. @Mouad-Scriptz-0, could you run Killzone with this branch's
libSceFont? I can only open it as a PR once my current one merges (open-PR limit).AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by Mouad-Scriptz-0 on 2026-10-11T15:10:34Z.
Ran Killzone: Liberation (PPSA11142 01.000.004, Linux, Fedora 44, Intel Arc Meteor Lake) with
santhoshkumar-dev:feat/font-syllable-string-state(3f202abb) applied onmaina11c8f7f, together with #1693, #3428, the fence branch from #3534, the vertex-table branch from #3622 and a local recompiler change for its barycentric stop, Noto fonts inanyps5-fonts/.guest_font_textpasses here (1/1).libSceFonton its text:sceFontCharacterGetSyllableStringStatereturns without a throw, there is noFailed to measure/Failed to render text to bufferline in the log, and thesceFontWritingLineWritesOrderattribute stop I reported earlier does not reappear on thismain, as you said.KZL.PRXand stops in the graphics driver onlast provoking vertex is unsupported for generated primitive pipelines, which is unrelated to fonts."Press START to play!"and asserts (DrawEnginePS5.cpp(1529),0x8a6c000b). The width comes fromsceFontWritingLineGetRenderMetrics, so that is a render-metrics gap inlibSceFont's writing line, outside this branch; with no fonts the screen renders blank text and runs.So from this title's side the branch does what #2497's function did. AI-assisted: yes (Claude Code).
Pull request closed