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
8 changes: 4 additions & 4 deletions ios/styles/InlineCodeStyle.mm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ - (void)addAttributes:(NSRange)range {
usingBlock:^(id _Nullable value, NSRange range, BOOL * _Nonnull stop) {
UIFont *font = (UIFont *)value;
if(font != nullptr) {
UIFont *newFont = [[_input->config monospacedFont] withFontTraits:font];
UIFont *newFont = [[[_input->config monospacedFont] withFontTraits:font] setSize:font.pointSize];
[_input->textView.textStorage addAttribute:NSFontAttributeName value:newFont range:range];
}
}
Expand All @@ -60,7 +60,7 @@ - (void)addTypingAttributes {
newTypingAttrs[NSStrikethroughColorAttributeName] = [_input->config inlineCodeFgColor];
UIFont* currentFont = (UIFont *)newTypingAttrs[NSFontAttributeName];
if(currentFont != nullptr) {
newTypingAttrs[NSFontAttributeName] = [[_input->config monospacedFont] withFontTraits:currentFont];
newTypingAttrs[NSFontAttributeName] = [[[_input->config monospacedFont] withFontTraits:currentFont] setSize:currentFont.pointSize];
}
_input->textView.typingAttributes = newTypingAttrs;
}
Expand All @@ -76,7 +76,7 @@ - (void)removeAttributes:(NSRange)range {
usingBlock:^(id _Nullable value, NSRange range, BOOL * _Nonnull stop) {
UIFont *font = (UIFont *)value;
if(font != nullptr) {
UIFont *newFont = [[_input->config primaryFont] withFontTraits:font];
UIFont *newFont = [[[_input->config primaryFont] withFontTraits:font] setSize:font.pointSize];
[_input->textView.textStorage addAttribute:NSFontAttributeName value:newFont range:range];
}
}
Expand All @@ -93,7 +93,7 @@ - (void)removeTypingAttributes {
newTypingAttrs[NSStrikethroughColorAttributeName] = [_input->config primaryColor];
UIFont* currentFont = (UIFont *)newTypingAttrs[NSFontAttributeName];
if(currentFont != nullptr) {
newTypingAttrs[NSFontAttributeName] = [[_input->config primaryFont] withFontTraits:currentFont];
newTypingAttrs[NSFontAttributeName] = [[[_input->config primaryFont] withFontTraits:currentFont] setSize:currentFont.pointSize];
}
_input->textView.typingAttributes = newTypingAttrs;
}
Expand Down
Loading