diff options
| author | Po Lu | 2024-08-03 16:46:47 +0800 |
|---|---|---|
| committer | Po Lu | 2024-08-03 17:09:49 +0800 |
| commit | c25687e860fbae6178afe8096ec003f5f4ce6462 (patch) | |
| tree | b9d4441d0eae02f5a9ce51affff3b49bd34a7241 /src | |
| parent | e539a5c7d79b76eb16eed4cb5da4c3a531a640b4 (diff) | |
| download | emacs-c25687e860fbae6178afe8096ec003f5f4ce6462.tar.gz emacs-c25687e860fbae6178afe8096ec003f5f4ce6462.zip | |
Fix various typos reported by Pip Cet
* src/ftfont.c (get_adstyle_property):
* src/sfntfont.c (sfntfont_list_1): Correct typos. Reported by
Pip Cet <pipcet@protonmail.com>.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ftfont.c | 10 | ||||
| -rw-r--r-- | src/sfntfont.c | 17 |
2 files changed, 15 insertions, 12 deletions
diff --git a/src/ftfont.c b/src/ftfont.c index c89feea1d46..882d3eec256 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -174,11 +174,11 @@ get_adstyle_property (FcPattern *p) | |||
| 174 | USE_SAFE_ALLOCA; | 174 | USE_SAFE_ALLOCA; |
| 175 | tmp = SAFE_ALLOCA (end - str); | 175 | tmp = SAFE_ALLOCA (end - str); |
| 176 | for (i = 0; i < end - str; ++i) | 176 | for (i = 0; i < end - str; ++i) |
| 177 | tmp[i] = ((end[i] != '?' | 177 | tmp[i] = ((str[i] != '?' |
| 178 | && end[i] != '*' | 178 | && str[i] != '*' |
| 179 | && end[i] != '"' | 179 | && str[i] != '"' |
| 180 | && end[i] != '-') | 180 | && str[i] != '-') |
| 181 | ? end[i] : ' '); | 181 | ? str[i] : ' '); |
| 182 | adstyle = font_intern_prop (tmp, end - str, 1); | 182 | adstyle = font_intern_prop (tmp, end - str, 1); |
| 183 | SAFE_FREE (); | 183 | SAFE_FREE (); |
| 184 | if (font_style_to_value (FONT_WIDTH_INDEX, adstyle, 0) >= 0) | 184 | if (font_style_to_value (FONT_WIDTH_INDEX, adstyle, 0) >= 0) |
diff --git a/src/sfntfont.c b/src/sfntfont.c index d1376939a3c..8c02c05e7a6 100644 --- a/src/sfntfont.c +++ b/src/sfntfont.c | |||
| @@ -1643,6 +1643,7 @@ sfntfont_list_1 (struct sfnt_font_desc *desc, Lisp_Object spec, | |||
| 1643 | struct sfnt_cmap_encoding_subtable subtable; | 1643 | struct sfnt_cmap_encoding_subtable subtable; |
| 1644 | int instance, num_instance; | 1644 | int instance, num_instance; |
| 1645 | Lisp_Object item; | 1645 | Lisp_Object item; |
| 1646 | bool matching; | ||
| 1646 | 1647 | ||
| 1647 | /* cmap and subtable are caches for sfntfont_lookup_char. */ | 1648 | /* cmap and subtable are caches for sfntfont_lookup_char. */ |
| 1648 | 1649 | ||
| @@ -1788,19 +1789,21 @@ sfntfont_list_1 (struct sfnt_font_desc *desc, Lisp_Object spec, | |||
| 1788 | 1789 | ||
| 1789 | /* The vector contains characters, of which one must be | 1790 | /* The vector contains characters, of which one must be |
| 1790 | present in the font. */ | 1791 | present in the font. */ |
| 1792 | matching = false; | ||
| 1791 | for (i = 0; i < ASIZE (tem); ++i) | 1793 | for (i = 0; i < ASIZE (tem); ++i) |
| 1792 | { | 1794 | { |
| 1793 | if (FIXNUMP (AREF (tem, i))) | 1795 | if (FIXNUMP (AREF (tem, i))) |
| 1794 | { | 1796 | { |
| 1795 | if (!sfntfont_lookup_char (desc, AREF (tem, i), | 1797 | if (sfntfont_lookup_char (desc, AREF (tem, i), |
| 1796 | &cmap, &subtable)) | 1798 | &cmap, &subtable)) |
| 1797 | goto fail; | 1799 | { |
| 1798 | 1800 | matching = true; | |
| 1799 | /* One character is enough to pass a font. Don't | 1801 | break; |
| 1800 | look at too many. */ | 1802 | } |
| 1801 | break; | ||
| 1802 | } | 1803 | } |
| 1803 | } | 1804 | } |
| 1805 | if (!matching) | ||
| 1806 | goto fail; | ||
| 1804 | } | 1807 | } |
| 1805 | else if (CONSP (tem) && CONSP (XCDR (tem))) | 1808 | else if (CONSP (tem) && CONSP (XCDR (tem))) |
| 1806 | { | 1809 | { |