To clarify what I've observed with the Ahem font:
>From ttdriver.c:
static FT_Error
tt_size_request( FT_Size size,
FT_Size_Request req )
{
/* Current value for size == previous calculated metrics */
TT_Size ttsize = (TT_Size)size;
FT_Error error = TT_Err_Ok;
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
...
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
FT_Request_Metrics( size->face, req ); /* Calculates new metrics,
incorrect for Ahem */
if ( FT_IS_SCALABLE( size->face ) ) /* Ahem is scalable */
error = tt_size_reset( ttsize ); /* Calculates proper metrics
stored in ttsize */
/* ttsize->metrics contains proper metrics, size->metrics contains
incorrect metrics */
return error;
}
and my proposed change:
tt_size_request( FT_Size size,
FT_Size_Request req )
{
...
if ( FT_IS_SCALABLE( size->face ) )
{
error = tt_size_reset( ttsize );
/* Fix: copy reset metrics from TT_Size to publically accessible
FT_Size metrics */
ttsize->root.metrics = ttsize->metrics;
}
return error;
}
_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel