Closed shellyaoo closed 2 weeks ago
"@shopify/react-native-skia": "^1.4.2", It is in the Expo environment
The Expo framework was tested on the HarmonyOS machine
Yes this is definitely because of the font. We test Chinese characters in our test suite. If you think there is a bug, please submit a reproduction and we will investigate it. Closing it for now.
Description
import { Canvas, Image as SkiaIamge, useImage, Path, Skia, FontStyle, Text as SkiaText, useTexture } from '@shopify/react-native-skia';
const familyName = Platform.select({ ios: "Helvetica", default: "serif" }); const fontMgr = Skia.FontMgr.System(); const typeface = fontMgr.matchFamilyStyle(familyName, FontStyle.Bold); const font = Skia.Font(typeface, 12);
<Canvas style={[styles.image, { height: editImgHeight, width: editImgWidth }]}
Text component draws Chinese garbled characters
My project needs to support both Chinese and English. English is not garbled, but Chinese is garbled. Is it because the font is not supported? My phone can support Chinese display,
The displayed Chinese effect is as follows