Skip to content

Commit

Permalink
Fix font-related warnings on Catalina.
Browse files Browse the repository at this point in the history
Refs #120
  • Loading branch information
Kentzo committed Apr 7, 2020
1 parent 5c4b077 commit 749abf3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Library/SRRecorderControlStyle.m
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,10 @@ - (instancetype)init
p.alignment = NSTextAlignmentCenter;
p.lineBreakMode = NSLineBreakByTruncatingMiddle;

NSFont *font = [NSFont fontWithName:anObject[@"fontName"] size:[anObject[@"fontSize"] doubleValue]];
NSString *fontName = anObject[@"fontName"];
CGFloat fontSize = [anObject[@"fontSize"] doubleValue];
NSFont *font = [fontName isEqual:@".AppleSystemUIFont"] ? [NSFont systemFontOfSize:fontSize] : [NSFont fontWithName:fontName size:fontSize];

NSColor *fontColor = [NSColor colorWithCatalogName:anObject[@"fontColorCatalogName"] colorName:anObject[@"fontColorName"]];

NSMutableDictionary *attributes = @{
Expand Down

0 comments on commit 749abf3

Please sign in to comment.