TDKCandidates // Patch `.kern` for macOS 14.

This commit is contained in:
ShikiSuen 2023-09-25 17:04:47 +08:00
parent 53e319d913
commit 804164740e
1 changed files with 2 additions and 1 deletions

View File

@ -147,8 +147,8 @@ public class CandidateCellData: Hashable {
noSpacePadding: Bool = true, withHighlight: Bool = false, isMatrix: Bool = false noSpacePadding: Bool = true, withHighlight: Bool = false, isMatrix: Bool = false
) -> NSAttributedString { ) -> NSAttributedString {
let attrSpace: [NSAttributedString.Key: Any] = [ let attrSpace: [NSAttributedString.Key: Any] = [
.font: phraseFont(size: size),
.kern: 0, .kern: 0,
.font: phraseFont(size: size),
.paragraphStyle: Self.sharedParagraphStyle, .paragraphStyle: Self.sharedParagraphStyle,
] ]
let result: NSMutableAttributedString = { let result: NSMutableAttributedString = {
@ -185,6 +185,7 @@ public class CandidateCellData: Hashable {
public func attributedStringPhrase(isMatrix: Bool = false) -> NSAttributedString { public func attributedStringPhrase(isMatrix: Bool = false) -> NSAttributedString {
var attrCandidate: [NSAttributedString.Key: Any] = [ var attrCandidate: [NSAttributedString.Key: Any] = [
.kern: 0,
.font: phraseFont(size: size), .font: phraseFont(size: size),
.paragraphStyle: Self.sharedParagraphStyle, .paragraphStyle: Self.sharedParagraphStyle,
.foregroundColor: fontColorCandidate, .foregroundColor: fontColorCandidate,