diff --git a/src/OT/glyf/glyf-helpers.hh b/src/OT/glyf/glyf-helpers.hh index 33e4dbe46..7b4ba274c 100644 --- a/src/OT/glyf/glyf-helpers.hh +++ b/src/OT/glyf/glyf-helpers.hh @@ -44,6 +44,13 @@ _add_head_and_set_loca_version (hb_subset_plan_t *plan, bool use_short_loca) head *head_prime = (head *) hb_blob_get_data_writable (head_prime_blob, nullptr); head_prime->indexToLocFormat = use_short_loca ? 0 : 1; + if (plan->normalized_coords) + { + head_prime->xMin = plan->head_maxp_info.xMin; + head_prime->xMax = plan->head_maxp_info.xMax; + head_prime->yMin = plan->head_maxp_info.yMin; + head_prime->yMax = plan->head_maxp_info.yMax; + } bool success = plan->add_table (HB_OT_TAG_head, head_prime_blob); hb_blob_destroy (head_prime_blob); diff --git a/src/hb-ot-head-table.hh b/src/hb-ot-head-table.hh index 20991aab2..c2dceb2d0 100644 --- a/src/hb-ot-head-table.hh +++ b/src/hb-ot-head-table.hh @@ -148,10 +148,12 @@ struct head January 1, 1904. 64-bit integer */ LONGDATETIME modified; /* Number of seconds since 12:00 midnight, January 1, 1904. 64-bit integer */ + public: HBINT16 xMin; /* For all glyph bounding boxes. */ HBINT16 yMin; /* For all glyph bounding boxes. */ HBINT16 xMax; /* For all glyph bounding boxes. */ HBINT16 yMax; /* For all glyph bounding boxes. */ + protected: HBUINT16 macStyle; /* Bit 0: Bold (if set to 1); * Bit 1: Italic (if set to 1) * Bit 2: Underline (if set to 1) diff --git a/src/hb-subset.cc b/src/hb-subset.cc index 9b5b73cec..0d2e4544d 100644 --- a/src/hb-subset.cc +++ b/src/hb-subset.cc @@ -413,7 +413,7 @@ _dependencies_satisfied (hb_subset_plan_t *plan, hb_tag_t tag, { case HB_OT_TAG_hmtx: case HB_OT_TAG_vmtx: - return plan->pinned_at_default || !pending_subset_tags.has (HB_OT_TAG_glyf); + return !plan->normalized_coords || !pending_subset_tags.has (HB_OT_TAG_glyf); default: return true; }