From: Po Lu Date: Tue, 3 May 2022 08:02:02 +0000 (+0800) Subject: Fix some font parsing problems on NS X-Git-Tag: emacs-29.0.90~1931^2~115 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=64aac418c250beb8faeb23e182531abfd9cd9af8;p=emacs.git Fix some font parsing problems on NS * src/nsterm.m (ns_font_desc_to_font_spec): Fix processing of condensed width. --- 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)); } /* ==========================================================================