Commit Graph

28 Commits

Author SHA1 Message Date
Dean f4b47ee51f
Merge pull request #4014 from ahir061/fix/macos-executable-directory
fix(libs): find the executable directory on macOS
2026-10-13 01:56:47 +13:00
Adrià 9ce99f8f4d
Merge pull request #3697 from JAB-dev/fix/font-writing-letter-step
fix(libSceFont): return the letter step of sceFontWritingRefersRenderStepCharacter through a pointer
2026-10-11 23:52:50 +02:00
Adrià 6fa58ec0ac
Merge pull request #3696 from JAB-dev/feat/font-syllable-string-state
feat(libSceFont): implement sceFontCharacterGetSyllableStringState
2026-10-11 23:52:45 +02:00
Ahir Barman Maji f30f3e8a84 fix(libs): find the executable directory on macOS
libSceFont and libSceNpEntitlementAccess located the executable
through /proc/self/exe, which macOS does not have, so finding the
system fonts and the entitlements file threw there. Use
_NSGetExecutablePath and resolve the path with
std::filesystem::canonical on macOS. Linux and Windows are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 02:38:05 +05:30
Santhosh Kumar 17827dd9ab fix(filesystem): reject invalid parent traversal on Windows 2026-10-12 01:25:02 +05:30
JAB-dev e127a525d1 feat(libSceFont): implement sceFontCharacterGetSyllableStringState
The call was an unimplemented stub. It now writes syllable state 0 and
returns OK for every character outside the Thai block, where a PS4
firmware 11.00 libSceFont measures 1, 3 or 4; Thai characters throw as
not implemented. A null character or result returns
SCE_FONT_ERROR_INVALID_PARAMETER, and a null character writes 0 to a
non-null result, as measured. The signature follows SharpProspero.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 17:32:23 +02:00
JAB-dev b576273225 fix(libSceFont): return the letter step of sceFontWritingRefersRenderStepCharacter through a pointer
The second argument is an out pointer to the writing's letter step, as
KytyPS5 and the SharpProspero bindings declare it. It was filled as a
letter step struct, which wrote 64 bytes over the caller's 8-byte
pointer. The letter step now lives in the writing and the call stores
its address, or null when there is no current step.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 17:12:47 +02:00
fma-rc 5680c32381
fix(font): throw where the writing line error codes come from the PS4 module only and accept attribute 0 2026-10-11 09:41:52 +02:00
fma-rc 25afd95d35
fix(font): keep the step fields the library leaves alone and test multi-level closing 2026-10-11 05:55:36 +02:00
fma-rc eecba6888d
feat(font): order writing line runs by embedding level and report their spacing 2026-10-11 05:48:07 +02:00
Abdulrahman Elkordy 5ea89c7d4c feat(font): keep a handle's script languages and typographic features
sceFontSetScriptLanguage, sceFontGetScriptLanguage,
sceFontSetTypographicDesign and sceFontGetTypographicDesign threw. With
the signatures SharpProspero declares, a font handle now keeps the
language set for each script and the feature set for each typographic
design, under the handle's lock, and returns them, with 0 for one never
set. They do not change shaping or rendering yet; TechnicalDebt records
the assumptions.

Claude-Session: https://claude.ai/code/session_012SLQbhAiexxW6TtjYToW8a
(cherry picked from commit c4dcbe4403dc635fde2a823dec311a939816cefc)
2026-10-11 01:03:52 +02:00
Adrià 695e0b928a
Merge pull request #1551 from MarcZX100/fix/precise-subtick-polls
fix(windows): use precise waits in sub-millisecond polling loops
2026-10-10 10:52:48 +02:00
MarcZX100 54a9018514 fix(windows): use precise sleeps for sub-millisecond polling
Co-authored-by: Shaan <shaansahai2007@gmail.com>
2026-10-10 08:30:28 +00:00
Yassine a44e70957a fix(libSceFont): report vertical glyph metrics
sceFontGetCharGlyphMetrics and sceFontGetRenderCharGlyphMetrics set the
vertical bearing and advance to zero although the glyph is loaded with
FT_LOAD_VERTICAL_LAYOUT. The library's own text writing steps the pen by
that vertical advance, so every character of vertical text was placed on
the previous one.

The vertical metrics now follow the FreeType driver's metrics of a
rendered glyph: FreeType's vertical advance, and for a face without
vertical metrics a bearing of half the horizontal advance left of the
horizontal bearing and of half the advance left over by the glyph height.

guest_system_font checks every metric of a square glyph at 100 pixels.

(cherry picked from commit 04dd69f806379df8b52cfdeb2979f2595973a9b3)
(cherry picked from commit 11f6f9e954756ee8d4a3fc2be574ab3b57ecd7c5)
2026-10-10 21:23:19 +13:00
camezaro-intc 327201519a feat(font): implement sceFontDettachDeviceCacheBuffer
Detach the device cache buffer attached by sceFontAttachDeviceCacheBuffer. The signature is taken from the IDA type database of Orbital: it takes the library, a pointer to receive the buffer and a pointer to receive its size. When no cache buffer is attached, it reports NOT_ATTACHED_CACHE_BUFFER. If the library allocated the buffer itself and no buffer pointer is passed, the memory is freed. The owned bit is cleared and device_cache_buf is reset to null.
2026-10-08 00:36:52 -06:00
Raihan Abdul Majid 0a6a8a7b5c feat(font): accept sceFontGlyphDefineAttribute as a silent stub
PPSA01325 stops on sceFontGlyphDefineAttribute right after generating a character glyph: it sets attribute 0x11 to 0 on that glyph, deletes it without using it, and draws the character with sceFontRenderCharGlyphImageHorizontal. The meaning of the attributes is unknown, so the call checks the glyph and ignores the rest; TechnicalDebt lists it under silent stubs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UTjpbMX7BUFMZZaxJE98zV
2026-10-07 22:46:48 +07:00
Dean 762bab6f9a
Merge pull request #863 from LeandroLP23/feat/font-writing-line-ordering-space
feat(font): implement sceFontWritingLineGetOrderingSpace
2026-10-07 11:04:45 +13:00
LeandroLP23 6b69c70a02 feat(font): implement sceFontWritingLineGetOrderingSpace
Report the spacing the writing line applies: the modelled line places
each run at the sum of the previous advances, so every space is 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 12:31:30 +02:00
LeandroLP23 025606ceb4 feat(font): implement sceFontGetFontResolution
Report the face's units per EM and the driver's face scale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:34:56 +02:00
LeandroLP23 34ba33faf7 feat(font): implement sceFontGetFontGlyphsCount and sceFontGetCharGlyphCode
Report the face's glyph count and the glyph index of a character through
the library's driver; the FreeType driver gains its glyphs_count entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:23:44 +02:00
Adrià Franch 83442e1e40 feat(font): implement writing lines
Create, destroy, clear, write runs, step through them and read the
line metrics, following KytyPS5. Layouts from SharpProspero.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 01:30:16 +02:00
Dean 90f20b393d
Merge pull request #699 from merwie/feat/libs-ppsa12544-exports
feat(libs): add exports imported by PPSA12544
2026-10-06 12:18:11 +13:00
Dean Galvin 9d4e6d2f28 feat(font): open system font sets from a font directory
sceFontOpenFontSet failed for every set type, so PPSA21564 drew no text
in system fonts (the title screen copyright line, credits, button
guides). It now loads the set's primary font file from
ANYPS5_SYSTEM_FONTS, or anyps5-fonts beside the executable: console
files under their own names first, then openly licensed substitutes
(Noto Sans, Noto Sans Mono, Noto Sans Thai, Noto Sans CJK). The
PS5-only JG2 set types are accepted.

System font handles use the system font context. Their faces are
loaded by FreeType in host memory: about 1 MiB per CJK face does not
fit the font memory the title sizes for the console's fonts, and
sceFontCreateRenderer then failed with ALLOCATION_FAILED. Handles of
the same font file share one copy of its bytes.
2026-10-06 10:27:09 +13:00
Merijn 8f6328242d feat(libs): add exports imported by PPSA12544
Implement scePthreadGetschedparam and scePthreadSetschedparam on top of
the thread priority, POSIX utimes and fsync on top of sceKernelUtimes
and sceKernelFsync, and sceUserServiceGetAccessibilityZoomFollowFocus
like the other accessibility queries. Add the remaining imports of
PPSA12544 as unimplemented exports and record unknown NIDs and
signatures in the technical debt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 19:25:52 +02:00
DotDebian c0d293ff7b feat(font): implement sceFontGetPixelResolution
Report the sub-pixel resolution of the library's driver.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 10:05:31 +02:00
DotDebian 52c13a0bde feat(font): implement sceFontGetRenderScaledKerning
Return the kerning between two character codes at the render scale of
the font, the one set by sceFontSetupRenderScalePixel and
sceFontSetupRenderScalePoint, and fail with NOT_BOUND_RENDERER when no
renderer is bound. sceFontGetKerning keeps its behaviour and shares the
FreeType lookup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 01:49:49 +02:00
DotDebian cd6c20f783 feat(font): implement sceFontGetResolutionDpi
Report the horizontal and vertical resolution kept in the font handle's
style block, as set when the font is opened (72 dpi) or by
sceFontSetResolutionDpi. Error handling follows the other handle getters:
an invalid handle or two null outputs fail and clear the outputs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:59:31 +02:00
Dean Galvin 00e4f7678d feat(font): port shadPS4's sceFont and sceFontFt on FreeType
Ported from shadPS4 (GPL-2.0-or-later) with system fonts removed, stubs made to throw,
and sceFontCloseFont implemented.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ButHENCbXXt8h4EZuWUabJ
2026-09-28 16:45:30 +13:00