Skip to content
Snippets Groups Projects
Commit 693a458f authored by George Nachman's avatar George Nachman
Browse files

Disable ligature checkbox for blacklisted fonts.

parent 4913bed7
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -39,4 +39,8 @@
 
@interface NSFont(PTYFontInfo)
@property (nonatomic, readonly) BOOL it_defaultLigatures;
// 0 means ligatures are not supported at all for this font.
@property (nonatomic, readonly) NSInteger it_ligatureLevel;
@end
Loading
Loading
@@ -252,6 +252,9 @@ static NSInteger kNonAsciiFontButtonTag = 1;
if (self.normalFont.it_defaultLigatures) {
_asciiLigatures.state = NSOnState;
_asciiLigatures.enabled = NO;
} else if (self.normalFont.it_ligatureLevel == 0) {
_asciiLigatures.state = NSOffState;
_asciiLigatures.enabled = NO;
} else {
_asciiLigatures.state = [self boolForKey:KEY_ASCII_LIGATURES] ? NSOnState : NSOffState;
_asciiLigatures.enabled = YES;
Loading
Loading
@@ -259,6 +262,9 @@ static NSInteger kNonAsciiFontButtonTag = 1;
if (self.nonAsciiFont.it_defaultLigatures) {
_nonAsciiLigatures.state = NSOnState;
_nonAsciiLigatures.enabled = NO;
} else if (self.nonAsciiFont.it_ligatureLevel == 0) {
_nonAsciiLigatures.state = NSOffState;
_nonAsciiLigatures.enabled = NO;
} else {
_nonAsciiLigatures.state = [self boolForKey:KEY_NON_ASCII_LIGATURES] ? NSOnState : NSOffState;
_nonAsciiLigatures.enabled = YES;
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment