Skip to content

Commit 490169b

Browse files
author
cwlin
committed
Respect the font size setting of guifontwide.
Some of the fonts e.g., ProggyCleanTT expands the font height for clearer view. However, if the users set the customized guifontwide for CJK characters, these CJK characters will be higher than the column height, and the top of these characters will be cut. This fix checks the pointSize of guifontwide, if it is bigger than the guifont, then the font size will be fallback'd to guifont. It provides an option to CJK users to set a smaller font size for guifontwide to avoid the cut problem of CJK characters.
1 parent bdfb631 commit 490169b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/MacVim/MMCoreTextView.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ - (void)setWideFont:(NSFont *)newFont
328328
[fontWide release];
329329

330330
// Use 'Apple Color Emoji' font for rendering emoji
331-
CGFloat size = [font pointSize];
331+
CGFloat size = [newFont pointSize] > [font pointSize] ? [font pointSize] : [newFont pointSize];
332332
NSFontDescriptor *emojiDesc = [NSFontDescriptor
333333
fontDescriptorWithName:@"Apple Color Emoji" size:size];
334334
NSFontDescriptor *newFontDesc = [newFont fontDescriptor];

0 commit comments

Comments
 (0)