fix: fixed crash when calculating text width for a monospaced font (#1988)

This commit is contained in:
Serhiy Mytrovtsiy
2024-06-10 21:20:53 +02:00
parent a6410d8258
commit 75a7416b7e
3 changed files with 4 additions and 4 deletions

View File

@@ -136,7 +136,7 @@ public class StackWidget: WidgetWrapper {
private func drawOneRow(_ x: CGFloat, _ element: Stack_t) -> CGFloat {
var font: NSFont = NSFont.systemFont(ofSize: 13, weight: .regular)
if self.monospacedFontState {
font = NSFont.monospacedSystemFont(ofSize: 13, weight: .regular)
font = NSFont.monospacedDigitSystemFont(ofSize: 13, weight: .regular)
}
let style = NSMutableParagraphStyle()