Mercurial > emacs
comparison src/fontset.c @ 109351:c8a969d13eda
merge trunk
| author | Kenichi Handa <handa@etlken> |
|---|---|
| date | Fri, 09 Jul 2010 15:55:27 +0900 |
| parents | 8cfee7d2955f |
| children | 8f3464b85afb |
comparison
equal
deleted
inserted
replaced
| 109350:c11d07f3d731 | 109351:c8a969d13eda |
|---|---|
| 1184 doc: /* Return the name of a fontset that matches PATTERN. | 1184 doc: /* Return the name of a fontset that matches PATTERN. |
| 1185 The value is nil if there is no matching fontset. | 1185 The value is nil if there is no matching fontset. |
| 1186 PATTERN can contain `*' or `?' as a wildcard | 1186 PATTERN can contain `*' or `?' as a wildcard |
| 1187 just as X font name matching algorithm allows. | 1187 just as X font name matching algorithm allows. |
| 1188 If REGEXPP is non-nil, PATTERN is a regular expression. */) | 1188 If REGEXPP is non-nil, PATTERN is a regular expression. */) |
| 1189 (pattern, regexpp) | 1189 (Lisp_Object pattern, Lisp_Object regexpp) |
| 1190 Lisp_Object pattern, regexpp; | |
| 1191 { | 1190 { |
| 1192 Lisp_Object fontset; | 1191 Lisp_Object fontset; |
| 1193 int id; | 1192 int id; |
| 1194 | 1193 |
| 1195 (*check_window_system_func) (); | 1194 (*check_window_system_func) (); |
| 1433 | 1432 |
| 1434 Optional 5th argument ADD, if non-nil, specifies how to add FONT-SPEC | 1433 Optional 5th argument ADD, if non-nil, specifies how to add FONT-SPEC |
| 1435 to the font specifications for TARGET previously set. If it is | 1434 to the font specifications for TARGET previously set. If it is |
| 1436 `prepend', FONT-SPEC is prepended. If it is `append', FONT-SPEC is | 1435 `prepend', FONT-SPEC is prepended. If it is `append', FONT-SPEC is |
| 1437 appended. By default, FONT-SPEC overrides the previous settings. */) | 1436 appended. By default, FONT-SPEC overrides the previous settings. */) |
| 1438 (name, target, font_spec, frame, add) | 1437 (Lisp_Object name, Lisp_Object target, Lisp_Object font_spec, Lisp_Object frame, Lisp_Object add) |
| 1439 Lisp_Object name, target, font_spec, frame, add; | |
| 1440 { | 1438 { |
| 1441 Lisp_Object fontset; | 1439 Lisp_Object fontset; |
| 1442 Lisp_Object font_def, registry, family; | 1440 Lisp_Object font_def, registry, family; |
| 1443 Lisp_Object range_list; | 1441 Lisp_Object range_list; |
| 1444 struct charset *charset = NULL; | 1442 struct charset *charset = NULL; |
| 1643 SCRIPT is a symbol that appears in the first extra slot of the | 1641 SCRIPT is a symbol that appears in the first extra slot of the |
| 1644 char-table `char-script-table'. | 1642 char-table `char-script-table'. |
| 1645 | 1643 |
| 1646 FONT-SPEC is a vector, a cons, or a string. See the documentation of | 1644 FONT-SPEC is a vector, a cons, or a string. See the documentation of |
| 1647 `set-fontset-font' for the meaning. */) | 1645 `set-fontset-font' for the meaning. */) |
| 1648 (name, fontlist) | 1646 (Lisp_Object name, Lisp_Object fontlist) |
| 1649 Lisp_Object name, fontlist; | |
| 1650 { | 1647 { |
| 1651 Lisp_Object fontset; | 1648 Lisp_Object fontset; |
| 1652 int id; | 1649 int id; |
| 1653 | 1650 |
| 1654 CHECK_STRING (name); | 1651 CHECK_STRING (name); |
| 1819 POSITION is currently not visible. */ | 1816 POSITION is currently not visible. */ |
| 1820 | 1817 |
| 1821 | 1818 |
| 1822 DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 2, 0, | 1819 DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 2, 0, |
| 1823 doc: /* For internal use only. */) | 1820 doc: /* For internal use only. */) |
| 1824 (position, ch) | 1821 (Lisp_Object position, Lisp_Object ch) |
| 1825 Lisp_Object position, ch; | |
| 1826 { | 1822 { |
| 1827 EMACS_INT pos, pos_byte, dummy; | 1823 EMACS_INT pos, pos_byte, dummy; |
| 1828 int face_id; | 1824 int face_id; |
| 1829 int c; | 1825 int c; |
| 1830 struct frame *f; | 1826 struct frame *f; |
| 1910 | 1906 |
| 1911 The char-table has one extra slot. If FONTSET is not the default | 1907 The char-table has one extra slot. If FONTSET is not the default |
| 1912 fontset, the value the extra slot is a char-table containing the | 1908 fontset, the value the extra slot is a char-table containing the |
| 1913 information about the derived fonts from the default fontset. The | 1909 information about the derived fonts from the default fontset. The |
| 1914 format is the same as above. */) | 1910 format is the same as above. */) |
| 1915 (fontset, frame) | 1911 (Lisp_Object fontset, Lisp_Object frame) |
| 1916 Lisp_Object fontset, frame; | |
| 1917 { | 1912 { |
| 1918 FRAME_PTR f; | 1913 FRAME_PTR f; |
| 1919 Lisp_Object *realized[2], fontsets[2], tables[2]; | 1914 Lisp_Object *realized[2], fontsets[2], tables[2]; |
| 1920 Lisp_Object val, elt; | 1915 Lisp_Object val, elt; |
| 1921 int c, i, j, k; | 1916 int c, i, j, k; |
| 2046 the first font name pattern for CH in the fontset or in the default | 2041 the first font name pattern for CH in the fontset or in the default |
| 2047 fontset. | 2042 fontset. |
| 2048 | 2043 |
| 2049 If the 2nd optional arg ALL is non-nil, return a list of all font name | 2044 If the 2nd optional arg ALL is non-nil, return a list of all font name |
| 2050 patterns. */) | 2045 patterns. */) |
| 2051 (name, ch, all) | 2046 (Lisp_Object name, Lisp_Object ch, Lisp_Object all) |
| 2052 Lisp_Object name, ch, all; | |
| 2053 { | 2047 { |
| 2054 int c; | 2048 int c; |
| 2055 Lisp_Object fontset, elt, list, repertory, val; | 2049 Lisp_Object fontset, elt, list, repertory, val; |
| 2056 int i, j; | 2050 int i, j; |
| 2057 Lisp_Object frame; | 2051 Lisp_Object frame; |
| 2107 return (Fnreverse (list)); | 2101 return (Fnreverse (list)); |
| 2108 } | 2102 } |
| 2109 | 2103 |
| 2110 DEFUN ("fontset-list", Ffontset_list, Sfontset_list, 0, 0, 0, | 2104 DEFUN ("fontset-list", Ffontset_list, Sfontset_list, 0, 0, 0, |
| 2111 doc: /* Return a list of all defined fontset names. */) | 2105 doc: /* Return a list of all defined fontset names. */) |
| 2112 () | 2106 (void) |
| 2113 { | 2107 { |
| 2114 Lisp_Object fontset, list; | 2108 Lisp_Object fontset, list; |
| 2115 int i; | 2109 int i; |
| 2116 | 2110 |
| 2117 list = Qnil; | 2111 list = Qnil; |
| 2164 return vec; | 2158 return vec; |
| 2165 } | 2159 } |
| 2166 | 2160 |
| 2167 DEFUN ("fontset-list-all", Ffontset_list_all, Sfontset_list_all, 0, 0, 0, | 2161 DEFUN ("fontset-list-all", Ffontset_list_all, Sfontset_list_all, 0, 0, 0, |
| 2168 doc: /* Return a brief summary of all fontsets for debug use. */) | 2162 doc: /* Return a brief summary of all fontsets for debug use. */) |
| 2169 () | 2163 (void) |
| 2170 { | 2164 { |
| 2171 Lisp_Object val; | 2165 Lisp_Object val; |
| 2172 int i; | 2166 int i; |
| 2173 | 2167 |
| 2174 for (i = 0, val = Qnil; i < ASIZE (Vfontset_table); i++) | 2168 for (i = 0, val = Qnil; i < ASIZE (Vfontset_table); i++) |
