1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-28 02:54:31 +03:00

Refactor slightly

This commit is contained in:
Tae Won Ha 2016-07-13 22:09:49 +02:00
parent 02544fae5d
commit 6aa609ab79
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -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);