From 64aac418c250beb8faeb23e182531abfd9cd9af8 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Tue, 3 May 2022 16:02:02 +0800 Subject: [PATCH] Fix some font parsing problems on NS * src/nsterm.m (ns_font_desc_to_font_spec): Fix processing of condensed width. --- src/nsterm.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index 21232f55ad5..7deafc8cbb3 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -6102,7 +6102,7 @@ ns_font_desc_to_font_spec (NSFontDescriptor *desc, NSFont *font) if (tem != nil) lwidth = ([tem floatValue] > 0 ? Qexpanded : ([tem floatValue] < 0 - ? Qnormal : Qcondensed)); + ? Qcondensed : Qnormal)); } lheight = make_float ([font pointSize]); @@ -6110,7 +6110,9 @@ ns_font_desc_to_font_spec (NSFontDescriptor *desc, NSFont *font) return CALLN (Ffont_spec, QCwidth, lwidth, QCslant, lslant, QCweight, lweight, QCsize, lheight, - QCfamily, [family lispString]); + QCfamily, (family + ? [family lispString] + : Qnil)); } /* ========================================================================== -- 2.39.5