turn off ligatures in the code editor

This commit is contained in:
Riccardo Mottola 2021-08-19 14:50:58 +02:00
parent d49d4d6e5f
commit b3fa5f1949
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2021-08-18 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/PCEditor.m
Turn off ligatures, both when setting up the editor as well as when
loading a file.
2021-08-18 Riccardo Mottola <rm@gnu.org>
* PCInfoContronoller.m

View file

@ -170,6 +170,7 @@
tSelCol, NSForegroundColorAttributeName,
nil];
[ev setSelectedTextAttributes:selAttributes];
[ev turnOffLigatures:self];
// Activate undo
[ev setAllowsUndo: YES];
@ -321,6 +322,8 @@
[attributes setObject:font forKey:NSFontAttributeName];
[attributes setObject:textBackground forKey:NSBackgroundColorAttributeName];
[attributes setObject:[prefs colorForKey:EditorForegroundColor defaultValue:textColor] forKey:NSForegroundColorAttributeName];
[attributes setObject:[NSNumber numberWithInt: 0] // disable ligatures
forKey:NSLigatureAttributeName];
text = [NSString stringWithContentsOfFile:_path];
attributedString = [attributedString initWithString:text attributes:attributes];