Text styles (text size) and positions not applied correctly on built APK
Description When the apk is built the text size and position are not applied correctly (refer to the image linked). Works perfectly fine in the development environment and in the iOS production version.
To Reproduce Steps to reproduce the behavior:
- To reproduce is necessary to compare the generated image in development environment with the APK version
Expected behavior The expected behaviour would be the same results obtained when running in development.
Screenshots (blurred the text already present in the original image) https://imgur.com/a/TwIS6D5
Devlopment environment: Â - OS: [ Ubuntu 20.04 LTS] Â - nodejs: Â [10.16.0] Â - react-native: [0.60.5] Â - react-native-image-marker: Â [0.6.1]
Smartphone: Â - Device: [Real Android Device and also the Simulated] Â - OS: [Android 9/10]
Additional context Code snippet:
markText({
src,
text,
X,
Y,
fontSize,
color,
fontName: Platform.OS === 'android' ? 'Roboto' : 'Avenir',
/* @ts-ignore: need null to clear shadow */
shadowStyle: null,
/* @ts-ignore: need null to clear background */
textBackgroundStyle: null,
scale: 1,
quality: 100,
saveFormat: ImageFormat.base64,
})
And call like this:
const img = ImageAsset.backgroundPassDate; // The real image
let imageResult: ImageURISource = { uri: '' };
imageResult.uri = await markText(
img,
'123',
50,
50,
26,
Colors.fonts.white,
);
Have you tried to use base64 of your static images? I had similar issues that I managed to address just now. See #73 for example