mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-28 02:54:31 +03:00
Refactor slightly
This commit is contained in:
parent
02544fae5d
commit
6aa609ab79
@ -161,15 +161,15 @@
|
||||
traits |= kCTFontItalicTrait;
|
||||
}
|
||||
|
||||
if (traits == 0) {
|
||||
return CFRetain(_font);
|
||||
}
|
||||
|
||||
NSFont *cachedFont = _fontTraitCache[@(traits)];
|
||||
if (cachedFont != nil) {
|
||||
return CFRetain(cachedFont);
|
||||
}
|
||||
|
||||
if (traits == 0) {
|
||||
return CFRetain(_font);
|
||||
}
|
||||
|
||||
CTFontRef fontWithTraits = CTFontCreateCopyWithSymbolicTraits((CTFontRef) _font, 0.0, NULL, traits, traits);
|
||||
if (fontWithTraits == NULL) {
|
||||
return CFRetain(_font);
|
||||
|
Loading…
Reference in New Issue
Block a user