diff --git a/NvimView/DrawerPerf/PerfTester.swift b/NvimView/DrawerPerf/PerfTester.swift index d374ecae..50bce3dc 100644 --- a/NvimView/DrawerPerf/PerfTester.swift +++ b/NvimView/DrawerPerf/PerfTester.swift @@ -14,7 +14,7 @@ import os class PerfTester { init() { - self.cellSize = FontUtils.cellSize(of: self.font, linespacing: 1.25) + self.cellSize = FontUtils.cellSize(of: self.font, linespacing: 1.25, characterspacing: 1) for name in ["0", "1", "2"] { guard let fileUrl = Bundle(for: PerfTester.self) diff --git a/VimR/VimR/AppearancePref.swift b/VimR/VimR/AppearancePref.swift index 97dd9e65..3e51d9e0 100644 --- a/VimR/VimR/AppearancePref.swift +++ b/VimR/VimR/AppearancePref.swift @@ -164,6 +164,10 @@ class AppearancePref: PrefPane, NSComboBoxDelegate, NSControlTextEditingDelegate let characterspacingTitle = self.titleTextField(title: "Character Spacing:") let characterspacingField = self.characterspacingField + let characterspacingInfo = self.infoTextField( + markdown: "Character spacing not equal to `1` will likely break ligatures." + ) + let ligatureCheckbox = self.ligatureCheckbox self.configureCheckbox(button: ligatureCheckbox, title: "Use Ligatures", @@ -203,6 +207,7 @@ class AppearancePref: PrefPane, NSComboBoxDelegate, NSControlTextEditingDelegate self.addSubview(linespacingField) self.addSubview(characterspacingTitle) self.addSubview(characterspacingField) + self.addSubview(characterspacingInfo) self.addSubview(ligatureCheckbox) self.addSubview(previewScrollView) @@ -259,7 +264,10 @@ class AppearancePref: PrefPane, NSComboBoxDelegate, NSControlTextEditingDelegate self.characterspacingAction() } - ligatureCheckbox.autoPinEdge(.top, to: .bottom, of: characterspacingField, withOffset: 18) + characterspacingInfo.autoPinEdge(.left, to: .left, of: characterspacingField) + characterspacingInfo.autoPinEdge(.top, to: .bottom, of: characterspacingField, withOffset: 5) + + ligatureCheckbox.autoPinEdge(.top, to: .bottom, of: characterspacingInfo, withOffset: 18) ligatureCheckbox.autoPinEdge(.left, to: .right, of: fontTitle, withOffset: 5) previewScrollView.autoSetDimension(.height, toSize: 200, relation: .greaterThanOrEqual) diff --git a/VimR/VimR/markdown/template.html b/VimR/VimR/markdown/template.html index 0bec1284..d74330db 100644 --- a/VimR/VimR/markdown/template.html +++ b/VimR/VimR/markdown/template.html @@ -3,6 +3,7 @@ +