Commit 719b0aa5 authored by Jan Djärv's avatar Jan Djärv
Browse files

* nsfont.m (Qcondensed, Qexpanded): New variables.

(ns_descriptor_to_entity): Restore Qcondensed, Qexpanded setting.
(syms_of_nsfont): Defsym Qcondensed, Qexpanded.
parent 535cc8e9
2012-11-09 Jan Djärv <jan.h.d@swipnet.se>
* 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 <dmantipov@yandex.ru> 2012-11-09 Dmitry Antipov <dmantipov@yandex.ru>
   
Fix recently introduced crash on MS-Windows (Bug#12839). Fix recently introduced crash on MS-Windows (Bug#12839).
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
extern Lisp_Object Qns; extern Lisp_Object Qns;
extern Lisp_Object Qnormal, Qbold, Qitalic; extern Lisp_Object Qnormal, Qbold, Qitalic;
static Lisp_Object Qapple, Qroman, Qmedium; static Lisp_Object Qapple, Qroman, Qmedium;
static Lisp_Object Qcondensed, Qexpanded;
extern Lisp_Object Qappend; extern Lisp_Object Qappend;
extern float ns_antialias_threshold; extern float ns_antialias_threshold;
extern int ns_tmp_flags; extern int ns_tmp_flags;
...@@ -200,6 +201,9 @@ static void ns_glyph_metrics (struct nsfont_info *font_info, ...@@ -200,6 +201,9 @@ static void ns_glyph_metrics (struct nsfont_info *font_info,
/* FONT_SET_STYLE (font_entity, FONT_SLANT_INDEX, /* FONT_SET_STYLE (font_entity, FONT_SLANT_INDEX,
make_number (100 + 100 make_number (100 + 100
* ns_attribute_fvalue (desc, NSFontSlantTrait)));*/ * 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, /* FONT_SET_STYLE (font_entity, FONT_WIDTH_INDEX,
make_number (100 + 100 make_number (100 + 100
* ns_attribute_fvalue (desc, NSFontWidthTrait)));*/ * ns_attribute_fvalue (desc, NSFontWidthTrait)));*/
...@@ -1508,6 +1512,8 @@ - (void)setIntAttribute: (NSInteger)attributeTag value: (NSInteger)val ...@@ -1508,6 +1512,8 @@ - (void)setIntAttribute: (NSInteger)attributeTag value: (NSInteger)val
{ {
nsfont_driver.type = Qns; nsfont_driver.type = Qns;
register_font_driver (&nsfont_driver, NULL); register_font_driver (&nsfont_driver, NULL);
DEFSYM (Qcondensed, "condensed");
DEFSYM (Qexpanded, "expanded");
DEFSYM (Qapple, "apple"); DEFSYM (Qapple, "apple");
DEFSYM (Qroman, "roman"); DEFSYM (Qroman, "roman");
DEFSYM (Qmedium, "medium"); DEFSYM (Qmedium, "medium");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment