mirror of
https://gitlab.freedesktop.org/freetype/freetype.git
synced 2026-05-08 22:08:43 +02:00
* src/bdf/bdflib.c (bdf_parse_start_): Reserve space for artificial properties.
This commit is contained in:
parent
ae11e18cbd
commit
02953326d4
1 changed files with 10 additions and 2 deletions
|
|
@ -1085,8 +1085,7 @@
|
|||
|
||||
|
||||
/* First, check whether the property already exists in the font. */
|
||||
if ( font->props_used &&
|
||||
( propid = ft_hash_str_lookup( name, font->internal ) ) != NULL )
|
||||
if ( ( propid = ft_hash_str_lookup( name, font->internal ) ) != NULL )
|
||||
{
|
||||
/* The property already exists in the font, so simply replace */
|
||||
/* the value of the property with the current value. */
|
||||
|
|
@ -1993,6 +1992,15 @@
|
|||
goto Exit;
|
||||
}
|
||||
|
||||
/* Reserve space for artificial FONT_ASCENT or FONT_DESCENT. */
|
||||
if ( font->props_size == 0 )
|
||||
{
|
||||
if ( FT_NEW_ARRAY( font->props, 2 ) )
|
||||
goto Exit;
|
||||
|
||||
font->props_size = 2;
|
||||
}
|
||||
|
||||
/* If the FONT_ASCENT or FONT_DESCENT properties have not been */
|
||||
/* encountered yet, then make sure they are added as properties and */
|
||||
/* make sure they are set from the font bounding box info. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue