diff options
| author | Pavel Janík | 2001-12-12 20:06:10 +0000 |
|---|---|---|
| committer | Pavel Janík | 2001-12-12 20:06:10 +0000 |
| commit | fc8865fc5a0911cbb2bc583c5841633c39625780 (patch) | |
| tree | 617f24c3e5525725551c1f597654c056b4088a49 /src/fontset.c | |
| parent | 19474e269f8cc2582ac1749fb60ae0d9276ccd38 (diff) | |
| download | emacs-fc8865fc5a0911cbb2bc583c5841633c39625780.tar.gz emacs-fc8865fc5a0911cbb2bc583c5841633c39625780.zip | |
Fix typos, remove unnecessary space.
Diffstat (limited to 'src/fontset.c')
| -rw-r--r-- | src/fontset.c | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/src/fontset.c b/src/fontset.c index 1f5db2a9dfc..30bec52f024 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -55,14 +55,14 @@ Boston, MA 02111-1307, USA. */ | |||
| 55 | face is also realized for multibyte characters based on an ASCII | 55 | face is also realized for multibyte characters based on an ASCII |
| 56 | face. All of the multibyte faces based on the same ASCII face | 56 | face. All of the multibyte faces based on the same ASCII face |
| 57 | share the same realized fontset. | 57 | share the same realized fontset. |
| 58 | 58 | ||
| 59 | A fontset object is implemented by a char-table. | 59 | A fontset object is implemented by a char-table. |
| 60 | 60 | ||
| 61 | An element of a base fontset is: | 61 | An element of a base fontset is: |
| 62 | (INDEX . FONTNAME) or | 62 | (INDEX . FONTNAME) or |
| 63 | (INDEX . (FOUNDRY . REGISTRY )) | 63 | (INDEX . (FOUNDRY . REGISTRY )) |
| 64 | FONTNAME is a font name pattern for the corresponding character. | 64 | FONTNAME is a font name pattern for the corresponding character. |
| 65 | FOUNDRY and REGISTRY are respectively foundy and regisry fields of | 65 | FOUNDRY and REGISTRY are respectively foundry and registry fields of |
| 66 | a font name for the corresponding character. INDEX specifies for | 66 | a font name for the corresponding character. INDEX specifies for |
| 67 | which character (or generic character) the element is defined. It | 67 | which character (or generic character) the element is defined. It |
| 68 | may be different from an index to access this element. For | 68 | may be different from an index to access this element. For |
| @@ -71,9 +71,9 @@ Boston, MA 02111-1307, USA. */ | |||
| 71 | charset. REGISTRY is the | 71 | charset. REGISTRY is the |
| 72 | 72 | ||
| 73 | An element of a realized fontset is FACE-ID which is a face to use | 73 | An element of a realized fontset is FACE-ID which is a face to use |
| 74 | for displaying the correspnding character. | 74 | for displaying the corresponding character. |
| 75 | 75 | ||
| 76 | All single byte charaters (ASCII and 8bit-unibyte) share the same | 76 | All single byte characters (ASCII and 8bit-unibyte) share the same |
| 77 | element in a fontset. The element is stored in the first element | 77 | element in a fontset. The element is stored in the first element |
| 78 | of the fontset. | 78 | of the fontset. |
| 79 | 79 | ||
| @@ -110,7 +110,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 110 | These structures are hidden from the other codes than this file. | 110 | These structures are hidden from the other codes than this file. |
| 111 | The other codes handle fontsets only by their ID numbers. They | 111 | The other codes handle fontsets only by their ID numbers. They |
| 112 | usually use variable name `fontset' for IDs. But, in this file, we | 112 | usually use variable name `fontset' for IDs. But, in this file, we |
| 113 | always use varialbe name `id' for IDs, and name `fontset' for the | 113 | always use variable name `id' for IDs, and name `fontset' for the |
| 114 | actual fontset objects. | 114 | actual fontset objects. |
| 115 | 115 | ||
| 116 | */ | 116 | */ |
| @@ -123,7 +123,7 @@ Lisp_Object Qfontset; | |||
| 123 | /* Vector containing all fontsets. */ | 123 | /* Vector containing all fontsets. */ |
| 124 | static Lisp_Object Vfontset_table; | 124 | static Lisp_Object Vfontset_table; |
| 125 | 125 | ||
| 126 | /* Next possibly free fontset ID. Usually this keeps the mininum | 126 | /* Next possibly free fontset ID. Usually this keeps the minimum |
| 127 | fontset ID not yet used. */ | 127 | fontset ID not yet used. */ |
| 128 | static int next_fontset_id; | 128 | static int next_fontset_id; |
| 129 | 129 | ||
| @@ -145,8 +145,8 @@ Lisp_Object Vvertical_centering_font_regexp; | |||
| 145 | /* Return a pointer to struct font_info of font FONT_IDX of frame F. */ | 145 | /* Return a pointer to struct font_info of font FONT_IDX of frame F. */ |
| 146 | struct font_info *(*get_font_info_func) P_ ((FRAME_PTR f, int font_idx)); | 146 | struct font_info *(*get_font_info_func) P_ ((FRAME_PTR f, int font_idx)); |
| 147 | 147 | ||
| 148 | /* Return a list of font names which matches PATTERN. See the document of | 148 | /* Return a list of font names which matches PATTERN. See the documentation |
| 149 | `x-list-fonts' for more detail. */ | 149 | of `x-list-fonts' for more details. */ |
| 150 | Lisp_Object (*list_fonts_func) P_ ((struct frame *f, | 150 | Lisp_Object (*list_fonts_func) P_ ((struct frame *f, |
| 151 | Lisp_Object pattern, | 151 | Lisp_Object pattern, |
| 152 | int size, | 152 | int size, |
| @@ -166,7 +166,7 @@ void (*set_frame_fontset_func) P_ ((FRAME_PTR f, Lisp_Object arg, | |||
| 166 | 166 | ||
| 167 | /* To find a CCL program, fs_load_font calls this function. | 167 | /* To find a CCL program, fs_load_font calls this function. |
| 168 | The argument is a pointer to the struct font_info. | 168 | The argument is a pointer to the struct font_info. |
| 169 | This function set the memer `encoder' of the structure. */ | 169 | This function set the member `encoder' of the structure. */ |
| 170 | void (*find_ccl_program_func) P_ ((struct font_info *)); | 170 | void (*find_ccl_program_func) P_ ((struct font_info *)); |
| 171 | 171 | ||
| 172 | /* Check if any window system is used now. */ | 172 | /* Check if any window system is used now. */ |
| @@ -318,14 +318,14 @@ make_fontset (frame, name, base) | |||
| 318 | /* Find a free slot in Vfontset_table. Usually, next_fontset_id is | 318 | /* Find a free slot in Vfontset_table. Usually, next_fontset_id is |
| 319 | the next available fontset ID. So it is expected that this loop | 319 | the next available fontset ID. So it is expected that this loop |
| 320 | terminates quickly. In addition, as the last element of | 320 | terminates quickly. In addition, as the last element of |
| 321 | Vfotnset_table is always nil, we don't have to check the range of | 321 | Vfontset_table is always nil, we don't have to check the range of |
| 322 | id. */ | 322 | id. */ |
| 323 | while (!NILP (AREF (Vfontset_table, id))) id++; | 323 | while (!NILP (AREF (Vfontset_table, id))) id++; |
| 324 | 324 | ||
| 325 | if (id + 1 == size) | 325 | if (id + 1 == size) |
| 326 | { | 326 | { |
| 327 | Lisp_Object tem; | 327 | Lisp_Object tem; |
| 328 | int i; | 328 | int i; |
| 329 | 329 | ||
| 330 | tem = Fmake_vector (make_number (size + 8), Qnil); | 330 | tem = Fmake_vector (make_number (size + 8), Qnil); |
| 331 | for (i = 0; i < size; i++) | 331 | for (i = 0; i < size; i++) |
| @@ -373,7 +373,7 @@ font_family_registry (fontname, force) | |||
| 373 | char *p = XSTRING (fontname)->data; | 373 | char *p = XSTRING (fontname)->data; |
| 374 | char *sep[15]; | 374 | char *sep[15]; |
| 375 | int i = 0; | 375 | int i = 0; |
| 376 | 376 | ||
| 377 | while (*p && i < 15) | 377 | while (*p && i < 15) |
| 378 | if (*p++ == '-') | 378 | if (*p++ == '-') |
| 379 | { | 379 | { |
| @@ -390,7 +390,7 @@ font_family_registry (fontname, force) | |||
| 390 | } | 390 | } |
| 391 | 391 | ||
| 392 | 392 | ||
| 393 | /********** INTERFACES TO xfaces.c and dispextern.h **********/ | 393 | /********** INTERFACES TO xfaces.c and dispextern.h **********/ |
| 394 | 394 | ||
| 395 | /* Return name of the fontset with ID. */ | 395 | /* Return name of the fontset with ID. */ |
| 396 | 396 | ||
| @@ -481,7 +481,7 @@ face_for_char (f, face, c) | |||
| 481 | /* No face is recorded for C in the fontset of FACE. Make a new | 481 | /* No face is recorded for C in the fontset of FACE. Make a new |
| 482 | realized face for C that has the same fontset. */ | 482 | realized face for C that has the same fontset. */ |
| 483 | face_id = lookup_face (f, face->lface, c, face); | 483 | face_id = lookup_face (f, face->lface, c, face); |
| 484 | 484 | ||
| 485 | /* Record the face ID in FONTSET at the same index as the | 485 | /* Record the face ID in FONTSET at the same index as the |
| 486 | information in the base fontset. */ | 486 | information in the base fontset. */ |
| 487 | FONTSET_SET (fontset, c, make_number (face_id)); | 487 | FONTSET_SET (fontset, c, make_number (face_id)); |
| @@ -532,7 +532,7 @@ fontset_font_pattern (f, id, c) | |||
| 532 | { | 532 | { |
| 533 | Lisp_Object fontset, elt; | 533 | Lisp_Object fontset, elt; |
| 534 | struct font_info *fontp; | 534 | struct font_info *fontp; |
| 535 | 535 | ||
| 536 | elt = Qnil; | 536 | elt = Qnil; |
| 537 | if (fontset_id_valid_p (id)) | 537 | if (fontset_id_valid_p (id)) |
| 538 | { | 538 | { |
| @@ -634,7 +634,7 @@ fs_load_font (f, c, fontname, id, face) | |||
| 634 | 634 | ||
| 635 | fontp->vertical_centering | 635 | fontp->vertical_centering |
| 636 | = (STRINGP (Vvertical_centering_font_regexp) | 636 | = (STRINGP (Vvertical_centering_font_regexp) |
| 637 | && (fast_c_string_match_ignore_case | 637 | && (fast_c_string_match_ignore_case |
| 638 | (Vvertical_centering_font_regexp, fontp->full_name) >= 0)); | 638 | (Vvertical_centering_font_regexp, fontp->full_name) >= 0)); |
| 639 | 639 | ||
| 640 | if (fontp->encoding[1] != FONT_ENCODING_NOT_DECIDED) | 640 | if (fontp->encoding[1] != FONT_ENCODING_NOT_DECIDED) |
| @@ -828,7 +828,7 @@ If REGEXPP is non-nil, PATTERN is a regular expression. */) | |||
| 828 | 828 | ||
| 829 | /* Return a list of base fontset names matching PATTERN on frame F. | 829 | /* Return a list of base fontset names matching PATTERN on frame F. |
| 830 | If SIZE is not 0, it is the size (maximum bound width) of fontsets | 830 | If SIZE is not 0, it is the size (maximum bound width) of fontsets |
| 831 | to be listed. */ | 831 | to be listed. */ |
| 832 | 832 | ||
| 833 | Lisp_Object | 833 | Lisp_Object |
| 834 | list_fontsets (f, pattern, size) | 834 | list_fontsets (f, pattern, size) |
| @@ -983,7 +983,7 @@ CHARACTER may be a charset. In that case, use FONTNAME | |||
| 983 | for all character in the charsets. | 983 | for all character in the charsets. |
| 984 | 984 | ||
| 985 | FONTNAME may be a cons; (FAMILY . REGISTRY), where FAMILY is a family | 985 | FONTNAME may be a cons; (FAMILY . REGISTRY), where FAMILY is a family |
| 986 | name of a font, REGSITRY is a registry name of a font. */) | 986 | name of a font, REGISTRY is a registry name of a font. */) |
| 987 | (name, character, fontname, frame) | 987 | (name, character, fontname, frame) |
| 988 | Lisp_Object name, character, fontname, frame; | 988 | Lisp_Object name, character, fontname, frame; |
| 989 | { | 989 | { |
| @@ -1247,8 +1247,8 @@ where, | |||
| 1247 | or a cons of two characters specifying the range of characters. | 1247 | or a cons of two characters specifying the range of characters. |
| 1248 | FONT-SPEC is a fontname pattern string or a cons (FAMILY . REGISTRY), | 1248 | FONT-SPEC is a fontname pattern string or a cons (FAMILY . REGISTRY), |
| 1249 | where FAMILY is a `FAMILY' field of a XLFD font name, | 1249 | where FAMILY is a `FAMILY' field of a XLFD font name, |
| 1250 | REGISTRY is a `CHARSET_REGISTRY' field of a XLDF font name. | 1250 | REGISTRY is a `CHARSET_REGISTRY' field of a XLFD font name. |
| 1251 | FAMILY may contain a `FOUNDARY' field at the head. | 1251 | FAMILY may contain a `FOUNDRY' field at the head. |
| 1252 | REGISTRY may contain a `CHARSET_ENCODING' field at the tail. | 1252 | REGISTRY may contain a `CHARSET_ENCODING' field at the tail. |
| 1253 | OPENEDs are names of fonts actually opened. | 1253 | OPENEDs are names of fonts actually opened. |
| 1254 | If the ASCII font is not yet opened, SIZE and HEIGHT are 0. | 1254 | If the ASCII font is not yet opened, SIZE and HEIGHT are 0. |
| @@ -1264,7 +1264,7 @@ If FRAME is omitted, it defaults to the currently selected frame. */) | |||
| 1264 | struct font_info *fontp = NULL; | 1264 | struct font_info *fontp = NULL; |
| 1265 | int n_realized = 0; | 1265 | int n_realized = 0; |
| 1266 | int i; | 1266 | int i; |
| 1267 | 1267 | ||
| 1268 | (*check_window_system_func) (); | 1268 | (*check_window_system_func) (); |
| 1269 | 1269 | ||
| 1270 | fontset = check_fontset_name (name); | 1270 | fontset = check_fontset_name (name); |
| @@ -1368,7 +1368,6 @@ If NAME is t, find a font name pattern in the default fontset. */) | |||
| 1368 | 1368 | ||
| 1369 | return elt; | 1369 | return elt; |
| 1370 | } | 1370 | } |
| 1371 | |||
| 1372 | 1371 | ||
| 1373 | DEFUN ("fontset-list", Ffontset_list, Sfontset_list, 0, 0, 0, | 1372 | DEFUN ("fontset-list", Ffontset_list, Sfontset_list, 0, 0, 0, |
| 1374 | doc: /* Return a list of all defined fontset names. */) | 1373 | doc: /* Return a list of all defined fontset names. */) |
| @@ -1471,7 +1470,7 @@ alternate fontnames (if any) are tried instead. */); | |||
| 1471 | &Vvertical_centering_font_regexp, | 1470 | &Vvertical_centering_font_regexp, |
| 1472 | doc: /* *Regexp matching font names that require vertical centering on display. | 1471 | doc: /* *Regexp matching font names that require vertical centering on display. |
| 1473 | When a character is displayed with such fonts, the character is displayed | 1472 | When a character is displayed with such fonts, the character is displayed |
| 1474 | at the vertival center of lines. */); | 1473 | at the vertical center of lines. */); |
| 1475 | Vvertical_centering_font_regexp = Qnil; | 1474 | Vvertical_centering_font_regexp = Qnil; |
| 1476 | 1475 | ||
| 1477 | defsubr (&Squery_fontset); | 1476 | defsubr (&Squery_fontset); |