From 719b0aa5096a455e4c3f87b789bbad7d35489ca3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Fri, 9 Nov 2012 16:44:07 +0100 Subject: [PATCH] * nsfont.m (Qcondensed, Qexpanded): New variables. (ns_descriptor_to_entity): Restore Qcondensed, Qexpanded setting. (syms_of_nsfont): Defsym Qcondensed, Qexpanded. --- src/ChangeLog | 6 ++++++ src/nsfont.m | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index dfc2e730f8b..601d194b751 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2012-11-09 Jan Djärv + + * nsfont.m (Qcondensed, Qexpanded): New variables. + (ns_descriptor_to_entity): Restore Qcondensed, Qexpanded setting. + (syms_of_nsfont): Defsym Qcondensed, Qexpanded. + 2012-11-09 Dmitry Antipov Fix recently introduced crash on MS-Windows (Bug#12839). diff --git a/src/nsfont.m b/src/nsfont.m index 88dbcfdc450..2ba38b7570e 100644 --- a/src/nsfont.m +++ b/src/nsfont.m @@ -48,6 +48,7 @@ Author: Adrian Robert (arobert@cogsci.ucsd.edu) extern Lisp_Object Qns; extern Lisp_Object Qnormal, Qbold, Qitalic; static Lisp_Object Qapple, Qroman, Qmedium; +static Lisp_Object Qcondensed, Qexpanded; extern Lisp_Object Qappend; extern float ns_antialias_threshold; extern int ns_tmp_flags; @@ -200,6 +201,9 @@ ns_descriptor_to_entity (NSFontDescriptor *desc, /* FONT_SET_STYLE (font_entity, FONT_SLANT_INDEX, make_number (100 + 100 * ns_attribute_fvalue (desc, NSFontSlantTrait)));*/ + FONT_SET_STYLE (font_entity, FONT_WIDTH_INDEX, + traits & NSFontCondensedTrait ? Qcondensed : + traits & NSFontExpandedTrait ? Qexpanded : Qnormal); /* FONT_SET_STYLE (font_entity, FONT_WIDTH_INDEX, make_number (100 + 100 * ns_attribute_fvalue (desc, NSFontWidthTrait)));*/ @@ -1508,6 +1512,8 @@ syms_of_nsfont (void) { nsfont_driver.type = Qns; register_font_driver (&nsfont_driver, NULL); + DEFSYM (Qcondensed, "condensed"); + DEFSYM (Qexpanded, "expanded"); DEFSYM (Qapple, "apple"); DEFSYM (Qroman, "roman"); DEFSYM (Qmedium, "medium"); -- 2.39.2