* src/bdf/bdflib.c (bdf_parse_start_): Move setup of properties.
This commit is contained in:
parent
00a1567a13
commit
b1f4785087
|
@ -1361,29 +1361,6 @@
|
|||
|
||||
p->font->memory = memory;
|
||||
|
||||
{ /* setup */
|
||||
bdf_property_t* prop = (bdf_property_t*)bdf_properties_;
|
||||
FT_Hash proptbl = &p->font->proptbl;
|
||||
size_t i;
|
||||
|
||||
|
||||
error = ft_hash_str_init( proptbl, memory );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
for ( i = 0; i < num_bdf_properties_; i++, prop++ )
|
||||
{
|
||||
error = ft_hash_str_insert( prop->name, i, proptbl, memory );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
}
|
||||
}
|
||||
|
||||
if ( FT_QNEW( p->font->internal ) )
|
||||
goto Exit;
|
||||
error = ft_hash_str_init( p->font->internal, memory );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
@ -1425,6 +1402,30 @@
|
|||
goto Exit;
|
||||
}
|
||||
|
||||
if ( FT_QNEW( font->internal ) )
|
||||
goto Exit;
|
||||
error = ft_hash_str_init( font->internal, memory );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
|
||||
/* preset common properties */
|
||||
{
|
||||
bdf_property_t* prop = (bdf_property_t*)bdf_properties_;
|
||||
FT_Hash proptbl = &font->proptbl;
|
||||
size_t i;
|
||||
|
||||
|
||||
error = ft_hash_str_init( proptbl, memory );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
for ( i = 0; i < num_bdf_properties_; i++, prop++ )
|
||||
{
|
||||
error = ft_hash_str_insert( prop->name, i, proptbl, memory );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
}
|
||||
}
|
||||
|
||||
p->flags |= BDF_PROPS_;
|
||||
*next = bdf_parse_properties_;
|
||||
|
||||
|
|
Loading…
Reference in New Issue