Skip to content

Commit d02ec2d

Browse files
committed
fix typo
1 parent cf8627c commit d02ec2d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/symbol/shaping.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ class TaggedString {
152152
return this.text.charCodeAt(index);
153153
}
154154

155-
verticalizePunctuation(skipChontextChecking: boolean) {
156-
this.text = verticalizePunctuation(this.text, skipChontextChecking);
155+
verticalizePunctuation(skipContextChecking: boolean) {
156+
this.text = verticalizePunctuation(this.text, skipContextChecking);
157157
}
158158

159159
trim() {
@@ -478,7 +478,7 @@ function leastBadBreaks(lastLineBreak: ?Break): Array<number> {
478478
function determineLineBreaks(logicalInput: TaggedString,
479479
spacing: number,
480480
maxWidth: number,
481-
glyphMap: {[string]: {glyphs: {[number]: ?StyleGlyph}, ascender?: number, descender?: number}},
481+
glyphMap: {[_: string]: {glyphs: {[_: number]: ?StyleGlyph}, ascender?: number, descender?: number}},
482482
imagePositions: {[_: string]: ImagePosition},
483483
symbolPlacement: string,
484484
layoutTextSize: number): Array<number> {
@@ -653,7 +653,7 @@ function shapeLines(shaping: Shaping,
653653
verticalAdvance = codePoint !== 0x200b ? ONE_EM : 0;
654654

655655
// In order to make different fonts aligned, they must share a general baseline that aligns with every
656-
// font's real baseline. Glyph's offset is counted from the top left corner, where is the ascender line
656+
// font's real baseline. Glyph's offset is counted from the top left corner, where the ascender line
657657
// starts.
658658
// First of all, each glyph's baseline lies on the center line of the shaping line. Since ascender
659659
// is above the baseline, the glyphOffset is the negative shift. Then, in order to make glyphs fit in

src/util/verticalize_punctuation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ export const verticalizedCharacterMap = {
8888
'」': '﹂'
8989
};
9090

91-
export default function verticalizePunctuation(input: string, skipChontextChecking: boolean) {
91+
export default function verticalizePunctuation(input: string, skipContextChecking: boolean) {
9292
let output = '';
9393

9494
for (let i = 0; i < input.length; i++) {
9595
const nextCharCode = input.charCodeAt(i + 1) || null;
9696
const prevCharCode = input.charCodeAt(i - 1) || null;
9797

98-
const canReplacePunctuation = skipChontextChecking || (
98+
const canReplacePunctuation = skipContextChecking || (
9999
(!nextCharCode || !charHasRotatedVerticalOrientation(nextCharCode) || verticalizedCharacterMap[input[i + 1]]) &&
100100
(!prevCharCode || !charHasRotatedVerticalOrientation(prevCharCode) || verticalizedCharacterMap[input[i - 1]])
101101
);

0 commit comments

Comments
 (0)