[subset] cleanup.

This commit is contained in:
Garret Rieger 2018-03-07 10:17:06 -08:00
parent d9263f0230
commit 91867cda6a
2 changed files with 2 additions and 3 deletions

View File

@ -253,7 +253,7 @@ _subset_table (hb_subset_plan_t *plan,
result = _subset<const OT::hmtx> (plan);
break;
case HB_OT_TAG_vhea:
DEBUG_MSG(SUBSET, nullptr, "skip vhea handled by hmtx");
DEBUG_MSG(SUBSET, nullptr, "skip vhea handled by vmtx");
return true;
case HB_OT_TAG_vmtx:
result = _subset<const OT::vmtx> (plan);

View File

@ -31,12 +31,11 @@
/* Unit tests for hmtx subsetting */
static void check_num_vmetrics(hb_face_t *face, uint16_t expected_num_hmetrics)
static void check_num_vmetrics(hb_face_t *face, uint16_t expected_num_vmetrics)
{
hb_blob_t *vhea_blob = hb_face_reference_table (face, HB_TAG ('v','h','e','a'));
hb_blob_t *vmtx_blob = hb_face_reference_table (face, HB_TAG ('v','m','t','x'));
// TODO I sure wish I could just use the hmtx table struct!
unsigned int vhea_len;
uint8_t *raw_vhea = (uint8_t *) hb_blob_get_data(vhea_blob, &vhea_len);
uint16_t num_hmetrics = (raw_vhea[vhea_len - 2] << 8) + raw_vhea[vhea_len - 1];