From 0df10a58c1b26b1e09a4efa2505f27193173ad8e Mon Sep 17 00:00:00 2001 From: "SeulGi Choi(Chase)" Date: Thu, 19 Dec 2019 22:28:57 +0900 Subject: [PATCH] Update quads.js (#9128) whatever it's intended, it's typo. --- src/symbol/quads.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/symbol/quads.js b/src/symbol/quads.js index fd5f629ea1a..83b54106f99 100644 --- a/src/symbol/quads.js +++ b/src/symbol/quads.js @@ -299,16 +299,16 @@ export function getGlyphQuads(anchor: Anchor, const center = new Point(-halfAdvance, halfAdvance - SHAPING_DEFAULT_OFFSET); const verticalRotation = -Math.PI / 2; - // xHalfWidhtOffsetCorrection is a difference between full-width and half-width + // xHalfWidthOffsetCorrection is a difference between full-width and half-width // advance, should be 0 for full-width glyphs and will pull up half-width glyphs. - const xHalfWidhtOffsetCorrection = ONE_EM / 2 - halfAdvance; - const yImageOffsetCorrection = positionedGlyph.imageName ? xHalfWidhtOffsetCorrection : 0.0; - const halfWidhtOffsetCorrection = new Point(5 - SHAPING_DEFAULT_OFFSET - xHalfWidhtOffsetCorrection, -yImageOffsetCorrection); + const xHalfWidthOffsetCorrection = ONE_EM / 2 - halfAdvance; + const yImageOffsetCorrection = positionedGlyph.imageName ? xHalfWidthOffsetCorrection : 0.0; + const halfWidthOffsetCorrection = new Point(5 - SHAPING_DEFAULT_OFFSET - xHalfWidthOffsetCorrection, -yImageOffsetCorrection); const verticalOffsetCorrection = new Point(...verticalizedLabelOffset); - tl._rotateAround(verticalRotation, center)._add(halfWidhtOffsetCorrection)._add(verticalOffsetCorrection); - tr._rotateAround(verticalRotation, center)._add(halfWidhtOffsetCorrection)._add(verticalOffsetCorrection); - bl._rotateAround(verticalRotation, center)._add(halfWidhtOffsetCorrection)._add(verticalOffsetCorrection); - br._rotateAround(verticalRotation, center)._add(halfWidhtOffsetCorrection)._add(verticalOffsetCorrection); + tl._rotateAround(verticalRotation, center)._add(halfWidthOffsetCorrection)._add(verticalOffsetCorrection); + tr._rotateAround(verticalRotation, center)._add(halfWidthOffsetCorrection)._add(verticalOffsetCorrection); + bl._rotateAround(verticalRotation, center)._add(halfWidthOffsetCorrection)._add(verticalOffsetCorrection); + br._rotateAround(verticalRotation, center)._add(halfWidthOffsetCorrection)._add(verticalOffsetCorrection); } if (textRotate) {