diff options
| author | Eli Zaretskii | 2011-05-29 22:04:01 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2011-05-29 22:04:01 +0300 |
| commit | 56dd2d861f0beab1be2b12900fda133e48bd60fa (patch) | |
| tree | dd29e78c65ed85e2d8e112e50ca8fc268ae787cb /src/font.c | |
| parent | 58539c631a46db82b7f254bfcd00d7f02d96d366 (diff) | |
| download | emacs-56dd2d861f0beab1be2b12900fda133e48bd60fa.tar.gz emacs-56dd2d861f0beab1be2b12900fda133e48bd60fa.zip | |
src/font.[ch]: Fix typos in comments and strings.
Diffstat (limited to 'src/font.c')
| -rw-r--r-- | src/font.c | 61 |
1 files changed, 30 insertions, 31 deletions
diff --git a/src/font.c b/src/font.c index edbdc958539..398198324a4 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -136,7 +136,7 @@ Lisp_Object Qja, Qko; | |||
| 136 | 136 | ||
| 137 | static Lisp_Object QCuser_spec; | 137 | static Lisp_Object QCuser_spec; |
| 138 | 138 | ||
| 139 | /* Alist of font registry symbol and the corresponding charsets | 139 | /* Alist of font registry symbols and the corresponding charset |
| 140 | information. The information is retrieved from | 140 | information. The information is retrieved from |
| 141 | Vfont_encoding_alist on demand. | 141 | Vfont_encoding_alist on demand. |
| 142 | 142 | ||
| @@ -226,9 +226,9 @@ static int num_font_drivers; | |||
| 226 | 226 | ||
| 227 | 227 | ||
| 228 | /* Return a Lispy value of a font property value at STR and LEN bytes. | 228 | /* Return a Lispy value of a font property value at STR and LEN bytes. |
| 229 | If STR is "*", it returns nil. | 229 | If STR is "*", return nil. |
| 230 | If FORCE_SYMBOL is zero and all characters in STR are digits, it | 230 | If FORCE_SYMBOL is zero and all characters in STR are digits, |
| 231 | returns an integer. Otherwise, it returns a symbol interned from | 231 | return an integer. Otherwise, return a symbol interned from |
| 232 | STR. */ | 232 | STR. */ |
| 233 | 233 | ||
| 234 | Lisp_Object | 234 | Lisp_Object |
| @@ -251,7 +251,7 @@ font_intern_prop (const char *str, int len, int force_symbol) | |||
| 251 | } | 251 | } |
| 252 | 252 | ||
| 253 | /* The following code is copied from the function intern (in | 253 | /* The following code is copied from the function intern (in |
| 254 | lread.c), and modified to suite our purpose. */ | 254 | lread.c), and modified to suit our purpose. */ |
| 255 | obarray = Vobarray; | 255 | obarray = Vobarray; |
| 256 | if (!VECTORP (obarray) || ASIZE (obarray) == 0) | 256 | if (!VECTORP (obarray) || ASIZE (obarray) == 0) |
| 257 | obarray = check_obarray (obarray); | 257 | obarray = check_obarray (obarray); |
| @@ -305,7 +305,7 @@ font_pixel_size (FRAME_PTR f, Lisp_Object spec) | |||
| 305 | font vector. If VAL is not valid (i.e. not registered in | 305 | font vector. If VAL is not valid (i.e. not registered in |
| 306 | font_style_table), return -1 if NOERROR is zero, and return a | 306 | font_style_table), return -1 if NOERROR is zero, and return a |
| 307 | proper index if NOERROR is nonzero. In that case, register VAL in | 307 | proper index if NOERROR is nonzero. In that case, register VAL in |
| 308 | font_style_table if VAL is a symbol, and return a closest index if | 308 | font_style_table if VAL is a symbol, and return the closest index if |
| 309 | VAL is an integer. */ | 309 | VAL is an integer. */ |
| 310 | 310 | ||
| 311 | int | 311 | int |
| @@ -473,7 +473,7 @@ font_registry_charsets (Lisp_Object registry, struct charset **encoding, struct | |||
| 473 | } | 473 | } |
| 474 | 474 | ||
| 475 | 475 | ||
| 476 | /* Font property value validaters. See the comment of | 476 | /* Font property value validators. See the comment of |
| 477 | font_property_table for the meaning of the arguments. */ | 477 | font_property_table for the meaning of the arguments. */ |
| 478 | 478 | ||
| 479 | static Lisp_Object font_prop_validate (int, Lisp_Object, Lisp_Object); | 479 | static Lisp_Object font_prop_validate (int, Lisp_Object, Lisp_Object); |
| @@ -591,7 +591,7 @@ font_prop_validate_otf (Lisp_Object prop, Lisp_Object val) | |||
| 591 | return val; | 591 | return val; |
| 592 | } | 592 | } |
| 593 | 593 | ||
| 594 | /* Structure of known font property keys and validater of the | 594 | /* Structure of known font property keys and validator of the |
| 595 | values. */ | 595 | values. */ |
| 596 | static const struct | 596 | static const struct |
| 597 | { | 597 | { |
| @@ -742,7 +742,7 @@ enum xlfd_field_mask | |||
| 742 | }; | 742 | }; |
| 743 | 743 | ||
| 744 | 744 | ||
| 745 | /* Parse P pointing the pixel/point size field of the form | 745 | /* Parse P pointing to the pixel/point size field of the form |
| 746 | `[A B C D]' which specifies a transformation matrix: | 746 | `[A B C D]' which specifies a transformation matrix: |
| 747 | 747 | ||
| 748 | A B 0 | 748 | A B 0 |
| @@ -775,7 +775,7 @@ parse_matrix (const char *p) | |||
| 775 | } | 775 | } |
| 776 | 776 | ||
| 777 | /* Expand a wildcard field in FIELD (the first N fields are filled) to | 777 | /* Expand a wildcard field in FIELD (the first N fields are filled) to |
| 778 | multiple fields to fill in all 14 XLFD fields while restring a | 778 | multiple fields to fill in all 14 XLFD fields while restricting a |
| 779 | field position by its contents. */ | 779 | field position by its contents. */ |
| 780 | 780 | ||
| 781 | static int | 781 | static int |
| @@ -2054,14 +2054,14 @@ font_rescale_ratio (Lisp_Object font_entity) | |||
| 2054 | font-spec. The score value is 32 bit (`unsigned'), and the smaller | 2054 | font-spec. The score value is 32 bit (`unsigned'), and the smaller |
| 2055 | the value is, the closer the font is to the font-spec. | 2055 | the value is, the closer the font is to the font-spec. |
| 2056 | 2056 | ||
| 2057 | The lowest 2 bits of the score is used for driver type. The font | 2057 | The lowest 2 bits of the score are used for driver type. The font |
| 2058 | available by the most preferred font driver is 0. | 2058 | available by the most preferred font driver is 0. |
| 2059 | 2059 | ||
| 2060 | Each 7-bit in the higher 28 bits are used for numeric properties | 2060 | The 4 7-bit fields in the higher 28 bits are used for numeric properties |
| 2061 | WEIGHT, SLANT, WIDTH, and SIZE. */ | 2061 | WEIGHT, SLANT, WIDTH, and SIZE. */ |
| 2062 | 2062 | ||
| 2063 | /* How many bits to shift to store the difference value of each font | 2063 | /* How many bits to shift to store the difference value of each font |
| 2064 | property in a score. Note that flots for FONT_TYPE_INDEX and | 2064 | property in a score. Note that floats for FONT_TYPE_INDEX and |
| 2065 | FONT_REGISTRY_INDEX are not used. */ | 2065 | FONT_REGISTRY_INDEX are not used. */ |
| 2066 | static int sort_shift_bits[FONT_SIZE_INDEX + 1]; | 2066 | static int sort_shift_bits[FONT_SIZE_INDEX + 1]; |
| 2067 | 2067 | ||
| @@ -2598,7 +2598,7 @@ font_clear_cache (FRAME_PTR f, Lisp_Object cache, struct font_driver *driver) | |||
| 2598 | static Lisp_Object scratch_font_spec, scratch_font_prefer; | 2598 | static Lisp_Object scratch_font_spec, scratch_font_prefer; |
| 2599 | 2599 | ||
| 2600 | /* Check each font-entity in VEC, and return a list of font-entities | 2600 | /* Check each font-entity in VEC, and return a list of font-entities |
| 2601 | that satisfy this condition: | 2601 | that satisfy these conditions: |
| 2602 | (1) matches with SPEC and SIZE if SPEC is not nil, and | 2602 | (1) matches with SPEC and SIZE if SPEC is not nil, and |
| 2603 | (2) doesn't match with any regexps in Vface_ignored_fonts (if non-nil). | 2603 | (2) doesn't match with any regexps in Vface_ignored_fonts (if non-nil). |
| 2604 | */ | 2604 | */ |
| @@ -3018,8 +3018,8 @@ font_clear_prop (Lisp_Object *attrs, enum font_property_index prop) | |||
| 3018 | attrs[LFACE_FONT_INDEX] = font; | 3018 | attrs[LFACE_FONT_INDEX] = font; |
| 3019 | } | 3019 | } |
| 3020 | 3020 | ||
| 3021 | /* Selecte a font from ENTITIES (list of font-entity vectors) that | 3021 | /* Select a font from ENTITIES (list of font-entity vectors) that |
| 3022 | supports C and matches best with ATTRS and PIXEL_SIZE. */ | 3022 | supports C and is the best match for ATTRS and PIXEL_SIZE. */ |
| 3023 | 3023 | ||
| 3024 | static Lisp_Object | 3024 | static Lisp_Object |
| 3025 | font_select_entity (Lisp_Object frame, Lisp_Object entities, Lisp_Object *attrs, int pixel_size, int c) | 3025 | font_select_entity (Lisp_Object frame, Lisp_Object entities, Lisp_Object *attrs, int pixel_size, int c) |
| @@ -3062,8 +3062,8 @@ font_select_entity (Lisp_Object frame, Lisp_Object entities, Lisp_Object *attrs, | |||
| 3062 | return font_sort_entities (entities, prefer, frame, c); | 3062 | return font_sort_entities (entities, prefer, frame, c); |
| 3063 | } | 3063 | } |
| 3064 | 3064 | ||
| 3065 | /* Return a font-entity satisfying SPEC and best matching with face's | 3065 | /* Return a font-entity that satisfies SPEC and is the best match for |
| 3066 | font related attributes in ATTRS. C, if not negative, is a | 3066 | face's font related attributes in ATTRS. C, if not negative, is a |
| 3067 | character that the entity must support. */ | 3067 | character that the entity must support. */ |
| 3068 | 3068 | ||
| 3069 | Lisp_Object | 3069 | Lisp_Object |
| @@ -3254,8 +3254,8 @@ font_open_for_lface (FRAME_PTR f, Lisp_Object entity, Lisp_Object *attrs, Lisp_O | |||
| 3254 | } | 3254 | } |
| 3255 | 3255 | ||
| 3256 | 3256 | ||
| 3257 | /* Find a font satisfying SPEC and best matching with face's | 3257 | /* Find a font that satisfies SPEC and is the best match for |
| 3258 | attributes in ATTRS on FRAME, and return the opened | 3258 | face's attributes in ATTRS on FRAME, and return the opened |
| 3259 | font-object. */ | 3259 | font-object. */ |
| 3260 | 3260 | ||
| 3261 | Lisp_Object | 3261 | Lisp_Object |
| @@ -3267,8 +3267,7 @@ font_load_for_lface (FRAME_PTR f, Lisp_Object *attrs, Lisp_Object spec) | |||
| 3267 | if (NILP (entity)) | 3267 | if (NILP (entity)) |
| 3268 | { | 3268 | { |
| 3269 | /* No font is listed for SPEC, but each font-backend may have | 3269 | /* No font is listed for SPEC, but each font-backend may have |
| 3270 | the different criteria about "font matching". So, try | 3270 | different criteria about "font matching". So, try it. */ |
| 3271 | it. */ | ||
| 3272 | entity = font_matching_entity (f, attrs, spec); | 3271 | entity = font_matching_entity (f, attrs, spec); |
| 3273 | if (NILP (entity)) | 3272 | if (NILP (entity)) |
| 3274 | return Qnil; | 3273 | return Qnil; |
| @@ -3307,7 +3306,7 @@ font_done_for_face (FRAME_PTR f, struct face *face) | |||
| 3307 | } | 3306 | } |
| 3308 | 3307 | ||
| 3309 | 3308 | ||
| 3310 | /* Open a font matching with font-spec SPEC on frame F. If no proper | 3309 | /* Open a font that is a match for font-spec SPEC on frame F. If no proper |
| 3311 | font is found, return Qnil. */ | 3310 | font is found, return Qnil. */ |
| 3312 | 3311 | ||
| 3313 | Lisp_Object | 3312 | Lisp_Object |
| @@ -3331,7 +3330,7 @@ font_open_by_spec (FRAME_PTR f, Lisp_Object spec) | |||
| 3331 | } | 3330 | } |
| 3332 | 3331 | ||
| 3333 | 3332 | ||
| 3334 | /* Open a font matching with NAME on frame F. If no proper font is | 3333 | /* Open a font that matches NAME on frame F. If no proper font is |
| 3335 | found, return Qnil. */ | 3334 | found, return Qnil. */ |
| 3336 | 3335 | ||
| 3337 | Lisp_Object | 3336 | Lisp_Object |
| @@ -3355,7 +3354,7 @@ font_open_by_name (FRAME_PTR f, const char *name) | |||
| 3355 | /* Register font-driver DRIVER. This function is used in two ways. | 3354 | /* Register font-driver DRIVER. This function is used in two ways. |
| 3356 | 3355 | ||
| 3357 | The first is with frame F non-NULL. In this case, make DRIVER | 3356 | The first is with frame F non-NULL. In this case, make DRIVER |
| 3358 | available (but not yet activated) on F. All frame creaters | 3357 | available (but not yet activated) on F. All frame creators |
| 3359 | (e.g. Fx_create_frame) must call this function at least once with | 3358 | (e.g. Fx_create_frame) must call this function at least once with |
| 3360 | an available font-driver. | 3359 | an available font-driver. |
| 3361 | 3360 | ||
| @@ -3682,7 +3681,7 @@ font_at (int c, EMACS_INT pos, struct face *face, struct window *w, | |||
| 3682 | #ifdef HAVE_WINDOW_SYSTEM | 3681 | #ifdef HAVE_WINDOW_SYSTEM |
| 3683 | 3682 | ||
| 3684 | /* Check how many characters after POS (at most to *LIMIT) can be | 3683 | /* Check how many characters after POS (at most to *LIMIT) can be |
| 3685 | displayed by the same font on the window W. FACE, if non-NULL, is | 3684 | displayed by the same font in the window W. FACE, if non-NULL, is |
| 3686 | the face selected for the character at POS. If STRING is not nil, | 3685 | the face selected for the character at POS. If STRING is not nil, |
| 3687 | it is the string to check instead of the current buffer. In that | 3686 | it is the string to check instead of the current buffer. In that |
| 3688 | case, FACE must be not NULL. | 3687 | case, FACE must be not NULL. |
| @@ -3826,7 +3825,7 @@ GSUB and GPOS may contain `nil' element. In such a case, the font | |||
| 3826 | must not have any of the remaining elements. | 3825 | must not have any of the remaining elements. |
| 3827 | 3826 | ||
| 3828 | For instance, if the VALUE is `(thai nil nil (mark))', the font must | 3827 | For instance, if the VALUE is `(thai nil nil (mark))', the font must |
| 3829 | be an OpenType font, and whose GPOS table of `thai' script's default | 3828 | be an OpenType font whose GPOS table of `thai' script's default |
| 3830 | language system must contain `mark' feature. | 3829 | language system must contain `mark' feature. |
| 3831 | 3830 | ||
| 3832 | usage: (font-spec ARGS...) */) | 3831 | usage: (font-spec ARGS...) */) |
| @@ -4189,7 +4188,7 @@ DEFUN ("font-xlfd-name", Ffont_xlfd_name, Sfont_xlfd_name, 1, 2, 0, | |||
| 4189 | FONT is a font-spec, font-entity, or font-object. | 4188 | FONT is a font-spec, font-entity, or font-object. |
| 4190 | If the name is too long for XLFD (maximum 255 chars), return nil. | 4189 | If the name is too long for XLFD (maximum 255 chars), return nil. |
| 4191 | If the 2nd optional arg FOLD-WILDCARDS is non-nil, | 4190 | If the 2nd optional arg FOLD-WILDCARDS is non-nil, |
| 4192 | the consecutive wildcards are folded to one. */) | 4191 | the consecutive wildcards are folded into one. */) |
| 4193 | (Lisp_Object font, Lisp_Object fold_wildcards) | 4192 | (Lisp_Object font, Lisp_Object fold_wildcards) |
| 4194 | { | 4193 | { |
| 4195 | char name[256]; | 4194 | char name[256]; |
| @@ -4436,7 +4435,7 @@ the value is 0. | |||
| 4436 | If GSTRING-OUT is too short to hold produced glyphs, no glyphs are | 4435 | If GSTRING-OUT is too short to hold produced glyphs, no glyphs are |
| 4437 | produced in GSTRING-OUT, and the value is nil. | 4436 | produced in GSTRING-OUT, and the value is nil. |
| 4438 | 4437 | ||
| 4439 | See the documentation of `font-make-gstring' for the format of | 4438 | See the documentation of `composition-get-gstring' for the format of |
| 4440 | glyph-string. */) | 4439 | glyph-string. */) |
| 4441 | (Lisp_Object otf_features, Lisp_Object gstring_in, Lisp_Object from, Lisp_Object to, Lisp_Object gstring_out, Lisp_Object index) | 4440 | (Lisp_Object otf_features, Lisp_Object gstring_in, Lisp_Object from, Lisp_Object to, Lisp_Object gstring_out, Lisp_Object index) |
| 4442 | { | 4441 | { |
| @@ -4571,10 +4570,10 @@ The value is a vector: | |||
| 4571 | [ NAME FILENAME PIXEL-SIZE SIZE ASCENT DESCENT SPACE-WIDTH AVERAGE-WIDTH | 4570 | [ NAME FILENAME PIXEL-SIZE SIZE ASCENT DESCENT SPACE-WIDTH AVERAGE-WIDTH |
| 4572 | CAPABILITY ] | 4571 | CAPABILITY ] |
| 4573 | 4572 | ||
| 4574 | NAME is a string of the font name (or nil if the font backend doesn't | 4573 | NAME is the font name, a string (or nil if the font backend doesn't |
| 4575 | provide a name). | 4574 | provide a name). |
| 4576 | 4575 | ||
| 4577 | FILENAME is a string of the font file (or nil if the font backend | 4576 | FILENAME is the font file name, a string (or nil if the font backend |
| 4578 | doesn't provide a file name). | 4577 | doesn't provide a file name). |
| 4579 | 4578 | ||
| 4580 | PIXEL-SIZE is a pixel size by which the font is opened. | 4579 | PIXEL-SIZE is a pixel size by which the font is opened. |