Mercurial > emacs
comparison src/ftfont.c @ 92407:7ba52081e343
(ftfont_pattern_entity): Fix aliasing violations.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Sun, 02 Mar 2008 21:13:09 +0000 |
parents | c10a8c811515 |
children | 917824e47986 |
comparison
equal
deleted
inserted
replaced
92406:c36bda0a03cc | 92407:7ba52081e343 |
---|---|
105 Lisp_Object frame, registry; | 105 Lisp_Object frame, registry; |
106 { | 106 { |
107 Lisp_Object entity; | 107 Lisp_Object entity; |
108 FcChar8 *file, *fontformat; | 108 FcChar8 *file, *fontformat; |
109 FcCharSet *charset; | 109 FcCharSet *charset; |
110 char *str; | 110 FcChar8 *str; |
111 int numeric; | 111 int numeric; |
112 double dbl; | 112 double dbl; |
113 | 113 |
114 if (FcPatternGetString (p, FC_FILE, 0, &file) != FcResultMatch) | 114 if (FcPatternGetString (p, FC_FILE, 0, &file) != FcResultMatch) |
115 return Qnil; | 115 return Qnil; |
125 ASET (entity, FONT_TYPE_INDEX, Qfreetype); | 125 ASET (entity, FONT_TYPE_INDEX, Qfreetype); |
126 ASET (entity, FONT_REGISTRY_INDEX, registry); | 126 ASET (entity, FONT_REGISTRY_INDEX, registry); |
127 ASET (entity, FONT_FRAME_INDEX, frame); | 127 ASET (entity, FONT_FRAME_INDEX, frame); |
128 ASET (entity, FONT_OBJLIST_INDEX, Qnil); | 128 ASET (entity, FONT_OBJLIST_INDEX, Qnil); |
129 | 129 |
130 if (FcPatternGetString (p, FC_FOUNDRY, 0, (FcChar8 **) &str) == FcResultMatch) | 130 if (FcPatternGetString (p, FC_FOUNDRY, 0, &str) == FcResultMatch) |
131 ASET (entity, FONT_FOUNDRY_INDEX, intern_downcase (str, strlen (str))); | 131 ASET (entity, FONT_FOUNDRY_INDEX, intern_downcase (str, strlen (str))); |
132 if (FcPatternGetString (p, FC_FAMILY, 0, (FcChar8 **) &str) == FcResultMatch) | 132 if (FcPatternGetString (p, FC_FAMILY, 0, &str) == FcResultMatch) |
133 ASET (entity, FONT_FAMILY_INDEX, intern_downcase (str, strlen (str))); | 133 ASET (entity, FONT_FAMILY_INDEX, intern_downcase (str, strlen (str))); |
134 if (FcPatternGetInteger (p, FC_WEIGHT, 0, &numeric) == FcResultMatch) | 134 if (FcPatternGetInteger (p, FC_WEIGHT, 0, &numeric) == FcResultMatch) |
135 { | 135 { |
136 if (numeric == FC_WEIGHT_REGULAR) | 136 if (numeric == FC_WEIGHT_REGULAR) |
137 numeric = 100; | 137 numeric = 100; |