aboutsummaryrefslogtreecommitdiffstats
path: root/src/fontset.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fontset.c')
-rw-r--r--src/fontset.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/fontset.c b/src/fontset.c
index f3bf221f249..82d668a3871 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -429,7 +429,7 @@ reorder_font_vector (Lisp_Object font_group, struct font *font)
429 } 429 }
430 430
431 if (score_changed) 431 if (score_changed)
432 qsort (XVECTOR (vec)->contents, size, sizeof (Lisp_Object), 432 qsort (XVECTOR (vec)->contents, size, word_size,
433 fontset_compare_rfontdef); 433 fontset_compare_rfontdef);
434 XSETCAR (font_group, make_number (charset_ordered_list_tick)); 434 XSETCAR (font_group, make_number (charset_ordered_list_tick));
435} 435}
@@ -1027,8 +1027,7 @@ make_fontset_for_ascii_face (FRAME_PTR f, int base_fontset_id, struct face *face
1027 base_fontset = FONTSET_FROM_ID (base_fontset_id); 1027 base_fontset = FONTSET_FROM_ID (base_fontset_id);
1028 if (!BASE_FONTSET_P (base_fontset)) 1028 if (!BASE_FONTSET_P (base_fontset))
1029 base_fontset = FONTSET_BASE (base_fontset); 1029 base_fontset = FONTSET_BASE (base_fontset);
1030 if (! BASE_FONTSET_P (base_fontset)) 1030 eassert (BASE_FONTSET_P (base_fontset));
1031 abort ();
1032 } 1031 }
1033 else 1032 else
1034 base_fontset = Vdefault_fontset; 1033 base_fontset = Vdefault_fontset;
@@ -1725,8 +1724,7 @@ fontset_from_font (Lisp_Object font_object)
1725 fontset_spec = copy_font_spec (font_spec); 1724 fontset_spec = copy_font_spec (font_spec);
1726 ASET (fontset_spec, FONT_REGISTRY_INDEX, alias); 1725 ASET (fontset_spec, FONT_REGISTRY_INDEX, alias);
1727 name = Ffont_xlfd_name (fontset_spec, Qnil); 1726 name = Ffont_xlfd_name (fontset_spec, Qnil);
1728 if (NILP (name)) 1727 eassert (!NILP (name));
1729 abort ();
1730 fontset = make_fontset (Qnil, name, Qnil); 1728 fontset = make_fontset (Qnil, name, Qnil);
1731 Vfontset_alias_alist = Fcons (Fcons (name, SYMBOL_NAME (alias)), 1729 Vfontset_alias_alist = Fcons (Fcons (name, SYMBOL_NAME (alias)),
1732 Vfontset_alias_alist); 1730 Vfontset_alias_alist);
@@ -1893,7 +1891,7 @@ format is the same as above. */)
1893 1891
1894 /* Recode fontsets realized on FRAME from the base fontset FONTSET 1892 /* Recode fontsets realized on FRAME from the base fontset FONTSET
1895 in the table `realized'. */ 1893 in the table `realized'. */
1896 realized[0] = alloca (sizeof (Lisp_Object) * ASIZE (Vfontset_table)); 1894 realized[0] = alloca (word_size * ASIZE (Vfontset_table));
1897 for (i = j = 0; i < ASIZE (Vfontset_table); i++) 1895 for (i = j = 0; i < ASIZE (Vfontset_table); i++)
1898 { 1896 {
1899 elt = FONTSET_FROM_ID (i); 1897 elt = FONTSET_FROM_ID (i);
@@ -1904,7 +1902,7 @@ format is the same as above. */)
1904 } 1902 }
1905 realized[0][j] = Qnil; 1903 realized[0][j] = Qnil;
1906 1904
1907 realized[1] = alloca (sizeof (Lisp_Object) * ASIZE (Vfontset_table)); 1905 realized[1] = alloca (word_size * ASIZE (Vfontset_table));
1908 for (i = j = 0; ! NILP (realized[0][i]); i++) 1906 for (i = j = 0; ! NILP (realized[0][i]); i++)
1909 { 1907 {
1910 elt = FONTSET_DEFAULT (realized[0][i]); 1908 elt = FONTSET_DEFAULT (realized[0][i]);
@@ -1918,7 +1916,7 @@ format is the same as above. */)
1918 if (!EQ (fontset, Vdefault_fontset)) 1916 if (!EQ (fontset, Vdefault_fontset))
1919 { 1917 {
1920 tables[1] = Fmake_char_table (Qnil, Qnil); 1918 tables[1] = Fmake_char_table (Qnil, Qnil);
1921 XCHAR_TABLE (tables[0])->extras[0] = tables[1]; 1919 char_table_set_extras (tables[0], 0, tables[1]);
1922 fontsets[1] = Vdefault_fontset; 1920 fontsets[1] = Vdefault_fontset;
1923 } 1921 }
1924 1922
@@ -1981,7 +1979,7 @@ format is the same as above. */)
1981 if (c <= MAX_5_BYTE_CHAR) 1979 if (c <= MAX_5_BYTE_CHAR)
1982 char_table_set_range (tables[k], c, to, alist); 1980 char_table_set_range (tables[k], c, to, alist);
1983 else 1981 else
1984 XCHAR_TABLE (tables[k])->defalt = alist; 1982 CSET (XCHAR_TABLE (tables[k]), defalt, alist);
1985 1983
1986 /* At last, change each elements to font names. */ 1984 /* At last, change each elements to font names. */
1987 for (; CONSP (alist); alist = XCDR (alist)) 1985 for (; CONSP (alist); alist = XCDR (alist))
@@ -2117,7 +2115,8 @@ dump_fontset (Lisp_Object fontset)
2117 2115
2118 if (FRAME_LIVE_P (f)) 2116 if (FRAME_LIVE_P (f))
2119 ASET (vec, 1, 2117 ASET (vec, 1,
2120 Fcons (FONTSET_NAME (FONTSET_BASE (fontset)), f->name)); 2118 Fcons (FONTSET_NAME (FONTSET_BASE (fontset)),
2119 f->name));
2121 else 2120 else
2122 ASET (vec, 1, 2121 ASET (vec, 1,
2123 Fcons (FONTSET_NAME (FONTSET_BASE (fontset)), Qnil)); 2122 Fcons (FONTSET_NAME (FONTSET_BASE (fontset)), Qnil));