Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion android/src/main/java/com/horcrux/svg/FontData.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ private double toAbsolute(
ReadableMap font, String prop, double scale, double fontSize, double relative) {
ReadableType propType = font.getType(prop);
if (propType == ReadableType.Number) {
return font.getDouble(prop);
return font.getDouble(prop) * scale;
} else {
String string = font.getString(prop);
return PropHelper.fromRelative(string, relative, scale, fontSize);
Expand Down
2 changes: 1 addition & 1 deletion apple/Text/RNSVGFontData.mm
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ + (instancetype)initWithNSDictionary:(NSDictionary *)font parent:(RNSVGFontData
id letterSpacing = [font objectForKey:LETTER_SPACING];
if ([letterSpacing isKindOfClass:NSNumber.class]) {
NSNumber *ls = letterSpacing;
data->wordSpacing = (CGFloat)[ls doubleValue];
data->letterSpacing = (CGFloat)[ls doubleValue];
} else {
data->letterSpacing =
letterSpacing ? [RNSVGFontData toAbsoluteWithNSString:letterSpacing fontSize:fontSize] : parent->letterSpacing;
Expand Down