Skip to content

Commit

Permalink
RCTUIBaseSizeForDynamicTypeRamp -> RCTBaseSizeForDynamicTypeRamp
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Gleitman committed Oct 17, 2022
1 parent 7544a1c commit 6a155f3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Libraries/Text/RCTTextAttributes.m
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ - (CGFloat)effectiveFontSizeMultiplier
#if !TARGET_OS_OSX // [TODO(macOS GH#774)
if (_dynamicTypeRamp != RCTDynamicTypeRampUndefined) {
UIFontMetrics *fontMetrics = RCTUIFontMetricsForDynamicTypeRamp(_dynamicTypeRamp);
CGFloat baseSize = RCTUIBaseSizeForDynamicTypeRamp(_dynamicTypeRamp);
CGFloat baseSize = RCTBaseSizeForDynamicTypeRamp(_dynamicTypeRamp);
fontSizeMultiplier = [fontMetrics scaledValueForValue:baseSize] / baseSize;
}
#endif // ]TODO(macOS GH#774)
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Text/Text/RCTDynamicTypeRamp.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ typedef NS_ENUM(NSInteger, RCTDynamicTypeRamp) {
/// Generates a `UIFontMetrics` instance representing a particular Dynamic Type ramp.
UIFontMetrics * _Nonnull RCTUIFontMetricsForDynamicTypeRamp(RCTDynamicTypeRamp dynamicTypeRamp);
/// The "reference" size for a particular font scale ramp, equal to a text element's size under default text size settings.
CGFloat RCTUIBaseSizeForDynamicTypeRamp(RCTDynamicTypeRamp dynamicTypeRamp);
CGFloat RCTBaseSizeForDynamicTypeRamp(RCTDynamicTypeRamp dynamicTypeRamp);
#endif // ]TODO(macOS GH#774)
2 changes: 1 addition & 1 deletion Libraries/Text/Text/RCTDynamicTypeRamp.m
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ @implementation RCTConvert (DynamicTypeRamp)
return [UIFontMetrics metricsForTextStyle:textStyle];
}

CGFloat RCTUIBaseSizeForDynamicTypeRamp(RCTDynamicTypeRamp dynamicTypeRamp) {
CGFloat RCTBaseSizeForDynamicTypeRamp(RCTDynamicTypeRamp dynamicTypeRamp) {
static NSDictionary<NSNumber *, NSNumber *> *mapping;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
Expand Down

0 comments on commit 6a155f3

Please sign in to comment.