aboutsummaryrefslogtreecommitdiffstats
path: root/src/font.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/font.c')
-rw-r--r--src/font.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/font.c b/src/font.c
index 799d5db205c..e81c267de41 100644
--- a/src/font.c
+++ b/src/font.c
@@ -374,10 +374,10 @@ font_style_to_value (enum font_property_index prop, Lisp_Object val,
374 if (! noerror) 374 if (! noerror)
375 return -1; 375 return -1;
376 eassert (len < 255); 376 eassert (len < 255);
377 elt = Fmake_vector (make_fixnum (2), make_fixnum (100)); 377 elt = make_vector (2, make_fixnum (100));
378 ASET (elt, 1, val); 378 ASET (elt, 1, val);
379 ASET (font_style_table, prop - FONT_WEIGHT_INDEX, 379 ASET (font_style_table, prop - FONT_WEIGHT_INDEX,
380 CALLN (Fvconcat, table, Fmake_vector (make_fixnum (1), elt))); 380 CALLN (Fvconcat, table, make_vector (1, elt)));
381 return (100 << 8) | (i << 4); 381 return (100 << 8) | (i << 4);
382 } 382 }
383 else 383 else
@@ -2035,7 +2035,7 @@ font_otf_DeviceTable (OTF_DeviceTable *device_table)
2035Lisp_Object 2035Lisp_Object
2036font_otf_ValueRecord (int value_format, OTF_ValueRecord *value_record) 2036font_otf_ValueRecord (int value_format, OTF_ValueRecord *value_record)
2037{ 2037{
2038 Lisp_Object val = Fmake_vector (make_fixnum (8), Qnil); 2038 Lisp_Object val = make_nil_vector (8);
2039 2039
2040 if (value_format & OTF_XPlacement) 2040 if (value_format & OTF_XPlacement)
2041 ASET (val, 0, make_fixnum (value_record->XPlacement)); 2041 ASET (val, 0, make_fixnum (value_record->XPlacement));
@@ -2059,9 +2059,7 @@ font_otf_ValueRecord (int value_format, OTF_ValueRecord *value_record)
2059Lisp_Object 2059Lisp_Object
2060font_otf_Anchor (OTF_Anchor *anchor) 2060font_otf_Anchor (OTF_Anchor *anchor)
2061{ 2061{
2062 Lisp_Object val; 2062 Lisp_Object val = make_nil_vector (anchor->AnchorFormat + 1);
2063
2064 val = Fmake_vector (make_fixnum (anchor->AnchorFormat + 1), Qnil);
2065 ASET (val, 0, make_fixnum (anchor->XCoordinate)); 2063 ASET (val, 0, make_fixnum (anchor->XCoordinate));
2066 ASET (val, 1, make_fixnum (anchor->YCoordinate)); 2064 ASET (val, 1, make_fixnum (anchor->YCoordinate));
2067 if (anchor->AnchorFormat == 2) 2065 if (anchor->AnchorFormat == 2)
@@ -5170,14 +5168,13 @@ If the named font is not yet loaded, return nil. */)
5170static Lisp_Object 5168static Lisp_Object
5171build_style_table (const struct table_entry *entry, int nelement) 5169build_style_table (const struct table_entry *entry, int nelement)
5172{ 5170{
5173 int i, j; 5171 Lisp_Object table = make_uninit_vector (nelement);
5174 Lisp_Object table, elt; 5172 for (int i = 0; i < nelement; i++)
5175
5176 table = make_uninit_vector (nelement);
5177 for (i = 0; i < nelement; i++)
5178 { 5173 {
5179 for (j = 0; entry[i].names[j]; j++); 5174 int j;
5180 elt = Fmake_vector (make_fixnum (j + 1), Qnil); 5175 for (j = 0; entry[i].names[j]; j++)
5176 continue;
5177 Lisp_Object elt = make_nil_vector (j + 1);
5181 ASET (elt, 0, make_fixnum (entry[i].numeric)); 5178 ASET (elt, 0, make_fixnum (entry[i].numeric));
5182 for (j = 0; entry[i].names[j]; j++) 5179 for (j = 0; entry[i].names[j]; j++)
5183 ASET (elt, j + 1, intern_c_string (entry[i].names[j])); 5180 ASET (elt, j + 1, intern_c_string (entry[i].names[j]));
@@ -5359,7 +5356,7 @@ syms_of_font (void)
5359 scratch_font_prefer = Ffont_spec (0, NULL); 5356 scratch_font_prefer = Ffont_spec (0, NULL);
5360 5357
5361 staticpro (&Vfont_log_deferred); 5358 staticpro (&Vfont_log_deferred);
5362 Vfont_log_deferred = Fmake_vector (make_fixnum (3), Qnil); 5359 Vfont_log_deferred = make_nil_vector (3);
5363 5360
5364#if 0 5361#if 0
5365#ifdef HAVE_LIBOTF 5362#ifdef HAVE_LIBOTF