Skip to content

Commit d2e2dd5

Browse files
author
Tony Du
committed
Scale lineHeight
1 parent 981ab97 commit d2e2dd5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ios/RNTextSize.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -616,8 +616,9 @@ - (NSTextContainer *)textContainerFromOptions:(NSDictionary * _Nullable)options
616616
const CGFloat lineHeight = CGFloatValueFrom(options[@"lineHeight"]);
617617
if (!isnan(lineHeight)) {
618618
NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
619-
[style setMinimumLineHeight:lineHeight];
620-
[style setMaximumLineHeight:lineHeight];
619+
const CGFloat scaleMultiplier = _bridge ? _bridge.accessibilityManager.multiplier : 1.0;
620+
[style setMinimumLineHeight:lineHeight * scaleMultiplier];
621+
[style setMaximumLineHeight:lineHeight * scaleMultiplier];
621622
[attributes setObject:style forKey:NSParagraphStyleAttributeName];
622623
}
623624

0 commit comments

Comments
 (0)