I've just changed the parsing routines of Type 1 charstrings to use 16.16 format internally, and I'm going to fix both Type 1 and Type 2 handling to use 16.16 format externally too:
1. Add a new load flag so that outlines can be returned in 16.16 font units. 2. Round the coordinates *after* scaling, not before. Handling item 1 is straightforward, however, item 2 needs a change in the incremental interface for glyph metrics, I believe. Currently there is code like this (for example, in function `T1_Parse_Glyph_And_Get_Char_String', file `t1gload.c'): /* Incremental fonts can optionally override the metrics. */ if ( !error && inc && inc->funcs->get_glyph_metrics ) { FT_Incremental_MetricsRec metrics; metrics.bearing_x = FIXED_TO_INT( decoder->builder.left_bearing.x ); metrics.bearing_y = FIXED_TO_INT( decoder->builder.left_bearing.y ); metrics.advance = FIXED_TO_INT( decoder->builder.advance.x ); error = inc->funcs->get_glyph_metrics( inc->object, glyph_index, FALSE, &metrics ); decoder->builder.left_bearing.x = INT_TO_FIXED( metrics.bearing_x ); decoder->builder.left_bearing.y = INT_TO_FIXED( metrics.bearing_y ); decoder->builder.advance.x = INT_TO_FIXED( metrics.advance ); decoder->builder.advance.y = 0; } The `FT_Incremental_MetricsRec' expects integer values. My suggestion is to introduce a new function `get_fractional_glyph_metrics'; if this function is defined, use it, otherwise use `get_glyph_metrics'. Objections? Werner
_______________________________________________ Freetype-devel mailing list Freetype-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/freetype-devel