[pull] main from Shopify:main - #206
Merged
Merged
Conversation
matchFont now also accepts the FontWeight and FontSlant enums used by the Paragraph API for its fontWeight and fontStyle attributes, so the same style values can be shared between both APIs without manual conversion. The previously internal font style types are now exported as RNFontStyle, RNFontWeight, and RNFontSlant so users can type their own helpers. Fixes #3491
…er colors (#3945) The native conversion of plain number arrays in Skia.Color() was fixed in af4070b (#3719): JsiSkColor.h createCtor now converts a 4-element JS array into a Float32Array, and JsiSkColor::fromValue as well as the recorder Convertor.h accept plain arrays. The web implementation already converted arrays via new Float32Array(color). These tests lock in the behavior reported in the issue: Skia.Color([r,g,b,a]) (0-1 floats) round-trips identically to Skia.Color(new Float32Array([...])) and to the equivalent string and ARGB number colors, on both web and native. Fixes #2200
…reated (#3950) On Android 10 devices with PowerVR GE8320 GPUs (Redmi 9C/9A, Oppo A15, Realme C11, ...), EGL context/surface creation can fail and the null result was dereferenced in gl::Context::makeCurrent and OpenGLWindowContext, crash-looping the app with SIGSEGV on the first <Canvas> render. Check every EGL creation result, log the error, and skip rendering instead of crashing. Fixes #3793 Relates to #3156
CanvasKit doesn't expose SkFont::measureText, so measureText threw NotImplemented on React Native Web. Polyfill it with the same semantics as the native implementation: get the glyph IDs, offset each glyph's ink bounds (getGlyphBounds) by the accumulated advances (getGlyphWidths), and union the results into a single bounding rect. Fixes #2639 Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Since Expo SDK 52, on web, require("./font.ttf") can return an ES
module interop object ({ default: <asset> }) instead of the asset
itself, so Platform.resolveAsset returned undefined (or the wrapper
object) and useFonts/useFont failed with "Couldn't create typeface".
Unwrap { default: ... } module objects in resolveAsset before applying
the existing resolution logic, and pass string URIs through as-is. The
guard is applied to both the web and native resolvers so that
module-wrapped sources (e.g. the { default: require(...) } workaround
users adopted) resolve consistently on every platform, for fonts,
images and SVGs alike.
Fixes #2784
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The next release runs the graphite setup (bakes Dawn/Graphite headers into cpp/, creates the libs/.graphite marker shipped via the files field) and swaps the standard binary packages for react-native-skia-graphite-*. The podspec and build.gradle now resolve prebuilt binaries from the graphite npm packages when the marker is present, falling back to libs/ for in-repo development where install-skia-graphite downloads them directly. main and next stay identical; the channel difference lives in build-npm.yml only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )