Skip to content
Open
Prev Previous commit
Next Next commit
Scale lineHeight
  • Loading branch information
Tony Du committed Apr 5, 2022
commit d2e2dd59f3de7e135fd0bfc2d78031c6331aae77
5 changes: 3 additions & 2 deletions ios/RNTextSize.m
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,9 @@ - (NSTextContainer *)textContainerFromOptions:(NSDictionary * _Nullable)options
const CGFloat lineHeight = CGFloatValueFrom(options[@"lineHeight"]);
if (!isnan(lineHeight)) {
NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
[style setMinimumLineHeight:lineHeight];
[style setMaximumLineHeight:lineHeight];
const CGFloat scaleMultiplier = _bridge ? _bridge.accessibilityManager.multiplier : 1.0;
[style setMinimumLineHeight:lineHeight * scaleMultiplier];
[style setMaximumLineHeight:lineHeight * scaleMultiplier];
[attributes setObject:style forKey:NSParagraphStyleAttributeName];
}

Expand Down