提交 91867cda 编写于 作者: G Garret Rieger

[subset] cleanup.

上级 d9263f02
...@@ -253,7 +253,7 @@ _subset_table (hb_subset_plan_t *plan, ...@@ -253,7 +253,7 @@ _subset_table (hb_subset_plan_t *plan,
result = _subset<const OT::hmtx> (plan); result = _subset<const OT::hmtx> (plan);
break; break;
case HB_OT_TAG_vhea: 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; return true;
case HB_OT_TAG_vmtx: case HB_OT_TAG_vmtx:
result = _subset<const OT::vmtx> (plan); result = _subset<const OT::vmtx> (plan);
......
...@@ -31,12 +31,11 @@ ...@@ -31,12 +31,11 @@
/* Unit tests for hmtx subsetting */ /* 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 *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')); 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; unsigned int vhea_len;
uint8_t *raw_vhea = (uint8_t *) hb_blob_get_data(vhea_blob, &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]; uint16_t num_hmetrics = (raw_vhea[vhea_len - 2] << 8) + raw_vhea[vhea_len - 1];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册