diff --git a/android/src/main/java/com/jimmydaddy/imagemarker/base/TextStyle.kt b/android/src/main/java/com/jimmydaddy/imagemarker/base/TextStyle.kt index cd2a1cea..4dd59647 100644 --- a/android/src/main/java/com/jimmydaddy/imagemarker/base/TextStyle.kt +++ b/android/src/main/java/com/jimmydaddy/imagemarker/base/TextStyle.kt @@ -11,7 +11,7 @@ data class TextStyle(val options: ReadableMap?) { var shadowLayerStyle: ShadowLayerStyle? var textBackgroundStyle: TextBackgroundStyle? var underline: Boolean = if (options?.hasKey("underline") == true) options.getBoolean("underline") else false - var skewX: Float? = if (options?.hasKey("skewX") == true) options.getDouble("skewX")?.toFloat() else 0f + var skewX: Float? = if (options?.hasKey("skewX") == true) options.getDouble("skewX").toFloat() else 0f var strikeThrough: Boolean = if (options?.hasKey("strikeThrough") == true) options.getBoolean("strikeThrough") else false var textAlign: Align var italic: Boolean = if (options?.hasKey("italic") == true) options.getBoolean("italic") else false diff --git a/ios/RCTImageMarker/TextStyle.swift b/ios/RCTImageMarker/TextStyle.swift index 269b0ee9..0b7d6a20 100644 --- a/ios/RCTImageMarker/TextStyle.swift +++ b/ios/RCTImageMarker/TextStyle.swift @@ -30,8 +30,7 @@ class TextStyle: NSObject { self.shadow = nil } self.textBackground = try TextBackground(textBackgroundStyle: (opts["textBackgroundStyle"] as? [AnyHashable : Any])) - let scale = UIScreen.main.scale - let fontSize = opts["fontSize"] != nil ? (RCTConvert.cgFloat(opts["fontSize"]) * scale) : (14.0 * scale) + let fontSize = opts["fontSize"] != nil ? RCTConvert.cgFloat(opts["fontSize"]) : 14.0 self.font = UIFont(name: opts["fontName"] as? String ?? "", size: fontSize) if self.font == nil { self.font = UIFont.systemFont(ofSize: fontSize)