Skip to content

Commit

Permalink
update to skia m126
Browse files Browse the repository at this point in the history
  • Loading branch information
eymar committed Aug 5, 2024
1 parent c7c319f commit 9cbf641
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ fun SkikoProjectContext.createLinkJvmBindings(
// Hack to fix problem with linker not always finding certain declarations.
"$skiaBinDir/libsksg.a",
"$skiaBinDir/libskia.a",
"$skiaBinDir/libskunicode.a"
"$skiaBinDir/libskunicode_core.a",
"$skiaBinDir/libskunicode_icu.a"
)
}
OS.Windows -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ fun SkikoProjectContext.configureNativeTarget(os: OS, arch: Arch, target: Kotlin
// TODO: an ugly hack, Linux linker searches only unresolved symbols.
"$skiaBinDir/libsksg.a",
"$skiaBinDir/libskshaper.a",
"$skiaBinDir/libskunicode.a",
"$skiaBinDir/libskunicode_core.a",
"$skiaBinDir/libskunicode_icu.a",
"$skiaBinDir/libskia.a"
)
else -> mutableListOf()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,11 @@ sk_sp<SkTypeface> TypefaceFontProviderWithFallback::fallbackForChar(SkUnichar ch
}
}
return nullptr;
}
}

sk_sp<SkFontStyleSet> TypefaceFontProviderWithFallback::onCreateStyleSet(int) const {
// override to revert this change made in the parent class: https://skia-review.googlesource.com/c/skia/+/834816
// This revert is only for our subtype, for Compose purposes:
// we have our own fallback implementation. The original fallback didn't work.
return nullptr;
};
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public:
size_t registerTypeface(sk_sp<SkTypeface> typeface, const SkString& alias);

sk_sp<SkTypeface> fallbackForChar(SkUnichar character) const;
sk_sp<SkFontStyleSet> onCreateStyleSet(int) const override;

private:
std::vector<sk_sp<SkTypeface>> registeredTypefaces;
Expand Down
6 changes: 3 additions & 3 deletions skiko/src/commonTest/kotlin/org/jetbrains/skia/ShaperTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ class ShaperTest {
}

@Test
// TODO: m126 update: on web callCount values are bigger than on other platforms. Although the shaper impl seems to be identical
@SkipJsTarget
@SkipWasmTarget
// TODO: m126 update: on web and windows callCount values are bigger than on other platforms.
// Although the shaper impl seems to be identical
@Ignore
fun canShapeWithRunHandler() = runTest {
val callCount = object {
var beginLine = 0
Expand Down

0 comments on commit 9cbf641

Please sign in to comment.