fix(font): restore region and graphics transform signatures

This commit is contained in:
boykopovar committed 2026-10-21 21:50:01 +03:00
1 parent 30736adb89
commit e2f8adca1b
2 files changed
+48 -19

No files matched your search

+46 -19
View File
@@ -13,6 +13,33 @@ struct FontOutlineProfile;
struct FontMetrics;
struct FontStyleInformation;
struct FontGlyphExpandBufferState;
struct FontGraphicsResource;
struct FontGraphicsFillMethod;
struct FontGraphicsFillPlot;
struct FontGraphicsFillRates;
struct FontGraphicsFill;
struct FontGraphicsRegion {
float x;
float y;
float width;
float height;
std::uint32_t flags;
std::uint32_t tag;
float outerRadius;
float innerRadius;
};
static_assert(sizeof(FontGraphicsRegion) == 32);
static_assert(offsetof(FontGraphicsRegion, x) == 0);
static_assert(offsetof(FontGraphicsRegion, y) == 4);
static_assert(offsetof(FontGraphicsRegion, width) == 8);
static_assert(offsetof(FontGraphicsRegion, height) == 12);
static_assert(offsetof(FontGraphicsRegion, flags) == 16);
static_assert(offsetof(FontGraphicsRegion, tag) == 20);
static_assert(offsetof(FontGraphicsRegion, outerRadius) == 24);
static_assert(offsetof(FontGraphicsRegion, innerRadius) == 28);
#pragma GCC visibility push(default)
@@ -119,42 +146,42 @@ int APS5_VABI sceFontGraphicsExchangeResource() {
return 0;
}
int APS5_VABI sceFontGraphicsFillMethodInit() {
int APS5_VABI sceFontGraphicsFillMethodInit(FontGraphicsFillMethod* method, std::int32_t mode, std::int32_t type) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceFontGraphicsFillPlotInit() {
int APS5_VABI sceFontGraphicsFillPlotInit(FontGraphicsFillPlot* plot, const FontGraphicsRegion* region) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceFontGraphicsFillPlotSetLayout() {
int APS5_VABI sceFontGraphicsFillPlotSetLayout(FontGraphicsFillPlot* plot, std::int32_t first, std::int32_t second) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceFontGraphicsFillPlotSetMapping() {
int APS5_VABI sceFontGraphicsFillPlotSetMapping(FontGraphicsFillPlot* plot, float first, float second, float third, float fourth) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceFontGraphicsFillRatesInit() {
int APS5_VABI sceFontGraphicsFillRatesInit(FontGraphicsFillRates* rates, const FontGraphicsFill* fill, std::uint32_t effect) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceFontGraphicsFillRatesSetFillEffect() {
int APS5_VABI sceFontGraphicsFillRatesSetFillEffect(FontGraphicsFillRates* rates, const FontGraphicsFill* fill, std::uint32_t effect) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceFontGraphicsFillRatesSetLayout() {
int APS5_VABI sceFontGraphicsFillRatesSetLayout(FontGraphicsFillRates* rates, std::int32_t first, std::int32_t second) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceFontGraphicsFillRatesSetMapping() {
int APS5_VABI sceFontGraphicsFillRatesSetMapping(FontGraphicsFillRates* rates, float first, float second, float third, float fourth) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
@@ -164,17 +191,17 @@ int APS5_VABI sceFontGraphicsGetDeviceUsage() {
return 0;
}
int APS5_VABI sceFontGraphicsRegionInit() {
int APS5_VABI sceFontGraphicsRegionInit(FontGraphicsRegion* region, float x, float y, float width, float height) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceFontGraphicsRegionInitCircular() {
int APS5_VABI sceFontGraphicsRegionInitCircular(FontGraphicsRegion* region, float centerX, float centerY, float outerRadius, float innerRadius) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceFontGraphicsRegionInitRoundish() {
int APS5_VABI sceFontGraphicsRegionInitRoundish(FontGraphicsRegion* region, float x, float y, float width, float height, float outerRadius, float innerRadius, std::uint32_t flags) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
@@ -199,7 +226,7 @@ int APS5_VABI sceFontGraphicsSetupClipping() {
return 0;
}
int APS5_VABI sceFontGraphicsSetupColorRates() {
int APS5_VABI sceFontGraphicsSetupColorRates(FontGraphicsResource* resource, float red, float green, float blue, float alpha) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
@@ -229,7 +256,7 @@ int APS5_VABI sceFontGraphicsSetupHandleDefault() {
return 0;
}
int APS5_VABI sceFontGraphicsSetupLocation() {
int APS5_VABI sceFontGraphicsSetupLocation(FontGraphicsResource* resource, float x, float y) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
@@ -239,12 +266,12 @@ int APS5_VABI sceFontGraphicsSetupPositioning() {
return 0;
}
int APS5_VABI sceFontGraphicsSetupRotation() {
int APS5_VABI sceFontGraphicsSetupRotation(FontGraphicsResource* resource, float angle, float pivotX, float pivotY) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceFontGraphicsSetupScaling() {
int APS5_VABI sceFontGraphicsSetupScaling(FontGraphicsResource* resource, float scaleX, float scaleY, float pivotX, float pivotY) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
@@ -289,7 +316,7 @@ int APS5_VABI sceFontGraphicsUpdateClipping() {
return 0;
}
int APS5_VABI sceFontGraphicsUpdateColorRates() {
int APS5_VABI sceFontGraphicsUpdateColorRates(FontGraphicsResource* resource, float red, float green, float blue, float alpha) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
@@ -314,7 +341,7 @@ int APS5_VABI sceFontGraphicsUpdateGlyphFillPlot() {
return 0;
}
int APS5_VABI sceFontGraphicsUpdateLocation() {
int APS5_VABI sceFontGraphicsUpdateLocation(FontGraphicsResource* resource, float x, float y) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
@@ -324,12 +351,12 @@ int APS5_VABI sceFontGraphicsUpdatePositioning() {
return 0;
}
int APS5_VABI sceFontGraphicsUpdateRotation() {
int APS5_VABI sceFontGraphicsUpdateRotation(FontGraphicsResource* resource, float angle, float pivotX, float pivotY) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceFontGraphicsUpdateScaling() {
int APS5_VABI sceFontGraphicsUpdateScaling(FontGraphicsResource* resource, float scaleX, float scaleY, float pivotX, float pivotY) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
+2
View File
@@ -24,3 +24,5 @@
- [Font writing lines](../../../core/libs/prx/libSceFont/src/WritingLine.cpp) (libSceFont) - `sceFontWritingLineWritesOrder`, `sceFontWritingLineRefersRenderStep`, `sceFontWritingLineGetRenderMetrics`, `sceFontWritingLineGetOrderingSpace` and `sceFontWritingLineClear` follow the PS4 11.00 `libSceFont.sprx` (firmware module, read from its disassembly and compared call for call on random sequences): runs are linked in visual order by embedding level, the space at each spaced join is summed for the line, steps walk the visual order from the left (form `0x12`) or from the right (form `0x11`) and the render metrics grow as steps are consumed. The PS5 library was not measured. Not from that module: form `0x10` is accepted and treated as left to right and a detail with id `0x0FD5` is accepted (the PS4 library rejects both); the memory argument of `sceFontCreateWritingLine` and the rest of the detail are not read (the PS4 library validates its library object there); an unknown writing form, another detail id, a null line pointer on creation, unknown and null handles (except in `sceFontWritingLineRefersRenderStep`, which returns null for a null line) and a null output of `sceFontWritingLineGetRenderMetrics` throw instead of returning the PS4 error codes, which are not confirmed for the PS5; `sceFontDestroyWritingLine` was not compared. Lines are allocated on the host, not in the font memory the title passes to the library: FreeType needs about 1 MiB per CJK face, which the title's font memory is not sized for.
- [Font graphics and metric signatures](../../../core/libs/prx/libSceFont/src/Unimplemented.cpp): graphics-device/service creation takes font memory, parameters and a handle output; destruction takes a handle pointer. Attribute selectors and outputs are 32-bit values. Metric, outline-profile, style-information and expansion-buffer outputs remain opaque pending field recovery. Protected implementations are unchanged.
- [Font graphics fill and transform signatures](../../../core/libs/prx/libSceFont/src/Unimplemented.cpp): region layout and scalar float arguments are confirmed from assembly, including the extra 32-bit corner flags omitted by the roundish-region decompilation. Fill-method, plot and rates layouts, layout selector meanings and mapping parameter meanings remain unresolved. Protected bodies are unchanged.