[bdf] Postpone font default char handling.

* src/bdf/bdflib.c (bdf_parse_start_, bdf_add_property_): Delay handling
of the default char until...
* src/bdf/bdfdrivr.c (BDF_Face_Init): ... handles all other properties.
This commit is contained in:
Alexei Podtelezhnikov 2025-01-22 20:47:56 -05:00
parent 8bae87065a
commit 56131e4216
2 changed files with 6 additions and 9 deletions

View File

@ -600,6 +600,12 @@ THE SOFTWARE.
resolution_y );
else
bsize->x_ppem = bsize->y_ppem;
prop = bdf_get_font_property( font, "DEFAULT_CHAR" );
if ( prop )
font->default_char = prop->value.ul;
else
font->default_char = ~0UL;
}
/* encoding table */

View File

@ -856,14 +856,6 @@
font->props_used++;
/* Some special cases need to be handled here. The DEFAULT_CHAR */
/* property needs to be located if it exists in the property list, the */
/* FONT_ASCENT and FONT_DESCENT need to be assigned if they are */
/* present, and the SPACING property should override the default */
/* spacing. */
if ( _bdf_strncmp( name, "DEFAULT_CHAR", 12 ) == 0 )
font->default_char = fp->value.ul;
Exit:
return error;
}
@ -1431,7 +1423,6 @@
error = ft_hash_str_init( p->font->internal, memory );
if ( error )
goto Exit;
p->font->default_char = ~0UL;
goto Exit;
}