Skip to content
Merged
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
11 changes: 10 additions & 1 deletion ios/config/EditorConfig.mm
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,19 @@ - (void)setPrimaryFontFamily:(NSString *)newValue {
- (UIFont *)primaryFont {
if(_primaryFontNeedsRecreation) {
_primaryFontNeedsRecreation = NO;

NSString *newFontWeight = [self primaryFontWeight];
// fix RCTFontWeight conversion warnings:
// sometimes changing font family comes with weight '0' if not specified
// RCTConvert doesn't recognize this value so we just nullify it and it gets a default value
if([newFontWeight isEqualToString:@"0"]) {
newFontWeight = nullptr;
}

_primaryFont = [RCTFont updateFont:nullptr
withFamily:[self primaryFontFamily]
size:[self primaryFontSize]
weight:[self primaryFontWeight]
weight:newFontWeight
style:nullptr
variant:nullptr
scaleMultiplier: 1];
Expand Down
Loading