[instancer] compute head/maxp values using only non-empty glyphs
This commit is contained in:
parent
d15551c6f3
commit
5e86870378
|
@ -183,7 +183,19 @@ struct Glyph
|
||||||
{
|
{
|
||||||
contour_point_vector_t all_points, deltas;
|
contour_point_vector_t all_points, deltas;
|
||||||
unsigned composite_contours = 0;
|
unsigned composite_contours = 0;
|
||||||
if (!get_points (font, glyf, all_points, &deltas, &plan->head_maxp_info, &composite_contours, false, false))
|
head_maxp_info_t *head_maxp_info_p = &plan->head_maxp_info;
|
||||||
|
unsigned *composite_contours_p = &composite_contours;
|
||||||
|
|
||||||
|
// don't compute head/maxp values when glyph has no contours(type is EMPTY)
|
||||||
|
// also ignore .notdef glyph when --notdef-outline is not enabled
|
||||||
|
if (type == EMPTY ||
|
||||||
|
(gid == 0 && !(plan->flags & HB_SUBSET_FLAGS_NOTDEF_OUTLINE)))
|
||||||
|
{
|
||||||
|
head_maxp_info_p = nullptr;
|
||||||
|
composite_contours_p = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!get_points (font, glyf, all_points, &deltas, head_maxp_info_p, composite_contours_p, false, false))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// .notdef, set type to empty so we only update metrics and don't compile bytes for
|
// .notdef, set type to empty so we only update metrics and don't compile bytes for
|
||||||
|
|
Binary file not shown.
|
@ -2,6 +2,7 @@ FONTS:
|
||||||
Handjet.ttf
|
Handjet.ttf
|
||||||
|
|
||||||
PROFILES:
|
PROFILES:
|
||||||
|
default.txt
|
||||||
notdef-outline.txt
|
notdef-outline.txt
|
||||||
|
|
||||||
SUBSETS:
|
SUBSETS:
|
||||||
|
|
Loading…
Reference in New Issue