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>.
This commit is contained in:
parent
e539a5c7d7
commit
c25687e860
2 changed files with 15 additions and 12 deletions
10
src/ftfont.c
10
src/ftfont.c
|
@ -174,11 +174,11 @@ get_adstyle_property (FcPattern *p)
|
|||
USE_SAFE_ALLOCA;
|
||||
tmp = SAFE_ALLOCA (end - str);
|
||||
for (i = 0; i < end - str; ++i)
|
||||
tmp[i] = ((end[i] != '?'
|
||||
&& end[i] != '*'
|
||||
&& end[i] != '"'
|
||||
&& end[i] != '-')
|
||||
? end[i] : ' ');
|
||||
tmp[i] = ((str[i] != '?'
|
||||
&& str[i] != '*'
|
||||
&& str[i] != '"'
|
||||
&& str[i] != '-')
|
||||
? str[i] : ' ');
|
||||
adstyle = font_intern_prop (tmp, end - str, 1);
|
||||
SAFE_FREE ();
|
||||
if (font_style_to_value (FONT_WIDTH_INDEX, adstyle, 0) >= 0)
|
||||
|
|
|
@ -1643,6 +1643,7 @@ sfntfont_list_1 (struct sfnt_font_desc *desc, Lisp_Object spec,
|
|||
struct sfnt_cmap_encoding_subtable subtable;
|
||||
int instance, num_instance;
|
||||
Lisp_Object item;
|
||||
bool matching;
|
||||
|
||||
/* cmap and subtable are caches for sfntfont_lookup_char. */
|
||||
|
||||
|
@ -1788,19 +1789,21 @@ sfntfont_list_1 (struct sfnt_font_desc *desc, Lisp_Object spec,
|
|||
|
||||
/* The vector contains characters, of which one must be
|
||||
present in the font. */
|
||||
matching = false;
|
||||
for (i = 0; i < ASIZE (tem); ++i)
|
||||
{
|
||||
if (FIXNUMP (AREF (tem, i)))
|
||||
{
|
||||
if (!sfntfont_lookup_char (desc, AREF (tem, i),
|
||||
&cmap, &subtable))
|
||||
goto fail;
|
||||
|
||||
/* One character is enough to pass a font. Don't
|
||||
look at too many. */
|
||||
break;
|
||||
if (sfntfont_lookup_char (desc, AREF (tem, i),
|
||||
&cmap, &subtable))
|
||||
{
|
||||
matching = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!matching)
|
||||
goto fail;
|
||||
}
|
||||
else if (CONSP (tem) && CONSP (XCDR (tem)))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue