| Index: third_party/harfbuzz-ng/src/hb-ot-hmtx-table.hh
|
| diff --git a/third_party/harfbuzz-ng/src/hb-ot-hmtx-table.hh b/third_party/harfbuzz-ng/src/hb-ot-hmtx-table.hh
|
| index e918e3b3f40f461b4501846a97d434978672a2cc..317854ce7f8583e8255c06e3d42a485272d707a8 100644
|
| --- a/third_party/harfbuzz-ng/src/hb-ot-hmtx-table.hh
|
| +++ b/third_party/harfbuzz-ng/src/hb-ot-hmtx-table.hh
|
| @@ -35,22 +35,27 @@ namespace OT {
|
|
|
| /*
|
| * hmtx -- The Horizontal Metrics Table
|
| + * vmtx -- The Vertical Metrics Table
|
| */
|
|
|
| #define HB_OT_TAG_hmtx HB_TAG('h','m','t','x')
|
| +#define HB_OT_TAG_vmtx HB_TAG('v','m','t','x')
|
|
|
|
|
| -struct LongHorMetric
|
| +struct LongMetric
|
| {
|
| - USHORT advanceWidth;
|
| - SHORT lsb;
|
| + USHORT advance; /* Advance width/height. */
|
| + SHORT lsb; /* Leading (left/top) side bearing. */
|
| public:
|
| DEFINE_SIZE_STATIC (4);
|
| };
|
|
|
| -struct hmtx
|
| +struct _mtx
|
| {
|
| - static const hb_tag_t tableTag = HB_OT_TAG_hmtx;
|
| + static const hb_tag_t tableTag = HB_TAG('_','m','t','x');
|
| +
|
| + static const hb_tag_t hmtxTag = HB_OT_TAG_hmtx;
|
| + static const hb_tag_t vmtxTag = HB_OT_TAG_vmtx;
|
|
|
| inline bool sanitize (hb_sanitize_context_t *c) {
|
| TRACE_SANITIZE (this);
|
| @@ -60,7 +65,7 @@ struct hmtx
|
| }
|
|
|
| public:
|
| - LongHorMetric longHorMetric[VAR]; /* Paired advance width and left side
|
| + LongMetric longMetric[VAR]; /* Paired advance width and leading
|
| * bearing values for each glyph. The
|
| * value numOfHMetrics comes from
|
| * the 'hhea' table. If the font is
|
| @@ -68,23 +73,29 @@ struct hmtx
|
| * be in the array, but that entry is
|
| * required. The last entry applies to
|
| * all subsequent glyphs. */
|
| - SHORT leftSideBearingX[VAR]; /* Here the advanceWidth is assumed
|
| - * to be the same as the advanceWidth
|
| + SHORT leadingBearingX[VAR]; /* Here the advance is assumed
|
| + * to be the same as the advance
|
| * for the last entry above. The
|
| * number of entries in this array is
|
| * derived from numGlyphs (from 'maxp'
|
| - * table) minus numberOfHMetrics. This
|
| - * generally is used with a run of
|
| - * monospaced glyphs (e.g., Kanji
|
| + * table) minus numberOfLongMetrics.
|
| + * This generally is used with a run
|
| + * of monospaced glyphs (e.g., Kanji
|
| * fonts or Courier fonts). Only one
|
| * run is allowed and it must be at
|
| * the end. This allows a monospaced
|
| - * font to vary the left side bearing
|
| + * font to vary the side bearing
|
| * values for each glyph. */
|
| public:
|
| - DEFINE_SIZE_ARRAY2 (0, longHorMetric, leftSideBearingX);
|
| + DEFINE_SIZE_ARRAY2 (0, longMetric, leadingBearingX);
|
| };
|
|
|
| +struct hmtx : _mtx {
|
| + static const hb_tag_t tableTag = HB_OT_TAG_hmtx;
|
| +};
|
| +struct vmtx : _mtx {
|
| + static const hb_tag_t tableTag = HB_OT_TAG_vmtx;
|
| +};
|
|
|
| } /* namespace OT */
|
|
|
|
|