mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-10-26 10:58:05 +03:00
Set kerning to zero if font is monospaced (close #1531)
This commit is contained in:
parent
e6ae3c8734
commit
8849209aa0
@ -7,6 +7,7 @@ Change Log
|
||||
|
||||
### Improvements
|
||||
|
||||
- Set the text kerning in the editor to zero if the font is monospaced.
|
||||
- Improve Chinese localizations.
|
||||
- [trivial] Update label and tooltip for the Line Wrapping toolbar item.
|
||||
- [trivial] Avoid unwanted line break in the character inspector.
|
||||
|
@ -224,6 +224,7 @@ class EditorTextView: NSTextView, Themable, CurrentLineHighlighting, MultiCursor
|
||||
layoutManager.showsIndentGuides = defaults[.showIndentGuides]
|
||||
|
||||
self.ligature = defaults[.ligature(for: fontType)] ? .standard : .none
|
||||
self.typingAttributes[.kern] = (fontType == .monospaced) ? 0 : nil
|
||||
self.invalidateDefaultParagraphStyle(initial: true)
|
||||
|
||||
// observe font changes in defaults
|
||||
@ -1326,6 +1327,7 @@ class EditorTextView: NSTextView, Themable, CurrentLineHighlighting, MultiCursor
|
||||
self.font = defaults.font(for: type)
|
||||
self.ligature = defaults[.ligature(for: type)] ? .standard : .none
|
||||
self.usesAntialias = defaults[.antialias(for: type)]
|
||||
self.typingAttributes[.kern] = (type == .monospaced) ? 0 : nil
|
||||
|
||||
self.observeFontDefaults(for: type)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user