test(libSceFreeType): follow supplemental cmap selection

This commit is contained in:
Ondra97 committed 2026-11-04 22:38:26 +01:00
1 parent 46ff75e9bf
commit 90c70685ec
2 files changed
+5 -4

No files matched your search

+4 -3
View File
@@ -172,8 +172,9 @@ int main() {
FacePair noVariants(library, nativeLibrary, VariationFont(true, false));
FacePair noBase(library, nativeLibrary, VariationFont(false, true));
FacePair noMap(library, nativeLibrary, VariationFont(false, false));
Require(regular.guest->num_charmaps == 4 && noBase.guest->charmap != nullptr && noMap.guest->num_charmaps == 0);
Require(noBase.guest->charmap->encoding_id == 5);
Require(regular.guest->num_charmaps == 4 && noBase.guest->num_charmaps == 1 && noMap.guest->num_charmaps == 0);
Require(noBase.guest->charmap == nullptr && noBase.native->charmap == nullptr);
Require(noBase.guest->charmaps[0]->platform_id == 0 && noBase.guest->charmaps[0]->encoding_id == 5);
Require(regular.guest->charmap->encoding_id == 10);
Require(CopyList(FT_Face_GetVariantSelectors_nid_postfix(regular.guest)) == std::vector<std::uint32_t>({0xFE0F, 0xE0100}));
Require(CopyList(FT_Face_GetCharsOfVariant_nid_postfix(regular.guest, 0xFE0F)) == std::vector<std::uint32_t>({'A', 'B', 'C', 0x4E00, 0x1F600}));
@@ -194,7 +195,7 @@ int main() {
Require(FT_Face_GetCharVariantIndex_nid_postfix(regular.guest, 'A', 0xFE0F) == (map->encoding_id == 1 ? 3u : 0u));
CompareQueries(regular.guest, regular.native, scalars, lists);
}
Require(FT_Face_GetCharVariantIndex_nid_postfix(noBase.guest, 'A', 0xE0100) == 3);
Require(FT_Face_GetCharVariantIndex_nid_postfix(noBase.guest, 'A', 0xE0100) == 0);
Require(FT_Face_GetCharVariantIndex_nid_postfix(noBase.guest, 'A', 0xFE0F) == 0);
Require(FT_Face_GetCharVariantIsDefault_nid_postfix(noBase.guest, 'A', 0xFE0F) == 1);
CompareQueries(noVariants.guest, noVariants.native, scalars, lists);
+1 -1
View File
@@ -55,7 +55,7 @@
- [FT_Select_Size](../../../core/libs/prx/libSceFreeType/Export.cpp) (libSceFreeType) - console signatures and errors are unverified; the LP64 guest adapter follows the bundled [FreeType 2.13.3](https://github.com/freetype/freetype/blob/42608f77f20749dd6ddc9e0536788eaad70ea4b5/src/base/ftobjs.c). Bitmap-strike selection and size metrics are checked against native FreeType with generated BDF fonts; other font drivers have not been exercised through this entry point.
- [FT_New_Memory_Face, FT_Done_Face and FT_Done_FreeType](../../../core/libs/prx/libSceFreeType/Export.cpp) (libSceFreeType) - console signatures, errors and generic-finalizer ordering are unverified; they follow the bundled [FreeType 2.13.3](https://github.com/freetype/freetype/blob/42608f77f20749dd6ddc9e0536788eaad70ea4b5/include/freetype/freetype.h) with LP64 guest arguments. Caller-owned font bytes must remain valid until the face is freed.
- [FT_Face_GetCharVariantIndex, FT_Face_GetCharVariantIsDefault, FT_Face_GetVariantSelectors, FT_Face_GetVariantsOfChar and FT_Face_GetCharsOfVariant](../../../core/libs/prx/libSceFreeType/Export.cpp) (libSceFreeType) - console signatures and errors are unverified; the LP64 adapter follows bundled [FreeType 2.13.3](https://github.com/freetype/freetype/blob/42608f77f20749dd6ddc9e0536788eaad70ea4b5/src/base/ftobjs.c). Character codes and selectors use their low 32 bits. Returned zero-terminated lists borrow native face storage; callers must not free or modify them, and another variation query or face destruction can invalidate them.
- [FT_Face_GetCharVariantIndex, FT_Face_GetCharVariantIsDefault, FT_Face_GetVariantSelectors, FT_Face_GetVariantsOfChar and FT_Face_GetCharsOfVariant](../../../core/libs/prx/libSceFreeType/Export.cpp) (libSceFreeType) - console signatures, errors and FreeType-version equivalence are unverified; the LP64 adapter follows bundled [FreeType 2.15.0](https://github.com/freetype/freetype/blob/37515cf56ba3349656049edbed89ffc6f6466f2d/src/base/ftobjs.c). Character codes and selectors use their low 32 bits. Returned zero-terminated lists borrow native face storage; callers must not free or modify them, and another variation query or face destruction can invalidate them.
- [FT_Outline_New](../../../core/libs/prx/libSceFreeType/src/OutlineStorage.cpp) (libSceFreeType) - console signature, errors and allocator are unverified; the adapter follows bundled [FreeType 2.13.3](https://github.com/freetype/freetype/blob/42608f77f20749dd6ddc9e0536788eaad70ea4b5/src/base/ftoutln.c) with the guest LP64 outline layout. The arrays are zero-initialised from the host C heap, not from a guest or FreeType allocator, because the guest points are 64 bits wide
- [FT_Outline_Done](../../../core/libs/prx/libSceFreeType/src/OutlineStorage.cpp) (libSceFreeType) - console signature, errors and allocator are unverified; the adapter follows bundled [FreeType 2.13.3](https://github.com/freetype/freetype/blob/42608f77f20749dd6ddc9e0536788eaad70ea4b5/src/base/ftoutln.c) with the guest LP64 outline layout. The point, tag and contour arrays of an outline with the owner flag are released with the host C heap, so a title that fills an owning outline with arrays from another allocator is not supported