mirror of
https://gitlab.freedesktop.org/freetype/freetype.git
synced 2026-05-07 19:18:02 +02:00
TrueType typefaces lacking hmtx (horizontal metrics) tables are tolerated if the
incremental interface system is enabaled and an incremental interface has been specified. This is necessary to support some typefaces passed from GhostScript.
This commit is contained in:
parent
7f0c4e9cc2
commit
4c157cd023
1 changed files with 14 additions and 0 deletions
|
|
@ -831,6 +831,20 @@
|
|||
error = face->goto_table( face, TTAG_hmtx, stream, &table_len );
|
||||
if ( error )
|
||||
{
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_INCREMENTAL
|
||||
/* If this is an incrementally loaded font and there are */
|
||||
/* overriding metrics tolerate a missing 'hmtx' table. */
|
||||
if ( face->root.internal->incremental_interface &&
|
||||
face->root.internal->incremental_interface->funcs->
|
||||
get_glyph_metrics )
|
||||
{
|
||||
face->horizontal.number_Of_HMetrics = 0;
|
||||
error = SFNT_Err_Ok;
|
||||
goto Exit;
|
||||
}
|
||||
#endif
|
||||
|
||||
FT_ERROR(( " no horizontal metrics in file!\n" ));
|
||||
error = SFNT_Err_Hmtx_Table_Missing;
|
||||
goto Exit;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue