@@ -266,7 +266,7 @@ export const SvgMo = (function <N, T, D>(): SvgMoClass<N, T, D> {
266266 /**
267267 * @param {number } n The number of the character to look up
268268 * @param {string } variant The variant for the character to look up
269- * @returns {SvgCharData } The full CharData object, with CharOptions guaranteed to be defined
269+ * @returns {SvgCharData } The full CharData object, with CharOptions guaranteed to be defined
270270 */
271271 protected getChar ( n : number , variant : string ) : SvgCharData {
272272 const char = this . font . getChar ( variant , n ) || [ 0 , 0 , 0 , null ] ;
@@ -284,7 +284,7 @@ export const SvgMo = (function <N, T, D>(): SvgMoClass<N, T, D> {
284284 * @param {number } x The x position of the glyph
285285 * @param {number } y The y position of the glyph
286286 * @param {N } parent The container for the glyph
287- * @returns {number } The width of the character placed
287+ * @returns {number } The width of the character placed
288288 */
289289 protected addGlyph (
290290 n : number ,
@@ -312,7 +312,7 @@ export const SvgMo = (function <N, T, D>(): SvgMoClass<N, T, D> {
312312 * @param {string } v The variant for the top glyph
313313 * @param {number } H The height of the stretched delimiter
314314 * @param {number } W The width of the stretched delimiter
315- * @returns {number } The total height of the top glyph
315+ * @returns {number } The total height of the top glyph
316316 */
317317 protected addTop ( n : number , v : string , H : number , W : number ) : number {
318318 if ( ! n ) return 0 ;
@@ -340,15 +340,15 @@ export const SvgMo = (function <N, T, D>(): SvgMoClass<N, T, D> {
340340 W : number
341341 ) {
342342 if ( ! n ) return ;
343- T = Math . max ( 0 , T - VFUZZ ) ; // // A little overlap on top
344- B = Math . max ( 0 , B - VFUZZ ) ; // // A little overlap on bottom
343+ T = Math . max ( 0 , T - VFUZZ ) ; // A little overlap on top
344+ B = Math . max ( 0 , B - VFUZZ ) ; // A little overlap on bottom
345345 const adaptor = this . adaptor ;
346346 const [ h , d , w ] = this . getChar ( n , v ) ;
347- const Y = H + D - T - B ; // // The height of the extender
348- const s = ( 1.5 * Y ) / ( h + d ) ; // // Scale height by 1.5 to avoid bad ends
349- // // (glyphs with rounded or anti-aliased ends don't stretch well,
350- // // so this makes for sharper ends)
351- const y = ( s * ( h - d ) - Y ) / 2 ; // // The bottom point to clip the extender
347+ const Y = H + D - T - B ; // The height of the extender
348+ const s = ( 1.5 * Y ) / ( h + d ) ; // Scale height by 1.5 to avoid bad ends
349+ // (glyphs with rounded or anti-aliased ends don't stretch well,
350+ // so this makes for sharper ends)
351+ const y = ( s * ( h - d ) - Y ) / 2 ; // The bottom point to clip the extender
352352 if ( Y <= 0 ) return ;
353353 const svg = this . svg ( 'svg' , {
354354 width : this . fixed ( w ) ,
@@ -377,7 +377,7 @@ export const SvgMo = (function <N, T, D>(): SvgMoClass<N, T, D> {
377377 * @param {string } v The variant for the bottom glyph
378378 * @param {number } D The depth of the stretched delimiter
379379 * @param {number } W The width of the stretched delimiter
380- * @returns {number } The total height of the bottom glyph
380+ * @returns {number } The total height of the bottom glyph
381381 */
382382 protected addBot ( n : number , v : string , D : number , W : number ) : number {
383383 if ( ! n ) return 0 ;
@@ -405,7 +405,7 @@ export const SvgMo = (function <N, T, D>(): SvgMoClass<N, T, D> {
405405 /**
406406 * @param {number } n The character number for the left glyph of the stretchy character
407407 * @param {string } v The variant for the left glyph
408- * @returns {number } The width of the left glyph
408+ * @returns {number } The width of the left glyph
409409 */
410410 protected addLeft ( n : number , v : string ) : number {
411411 return n ? this . addGlyph ( n , v , 0 , 0 ) : 0 ;
@@ -428,14 +428,14 @@ export const SvgMo = (function <N, T, D>(): SvgMoClass<N, T, D> {
428428 x : number = 0
429429 ) {
430430 if ( ! n ) return ;
431- R = Math . max ( 0 , R - HFUZZ ) ; // A little less than the width of the right glyph
432- L = Math . max ( 0 , L - HFUZZ ) ; // A little less than the width of the left glyph
431+ R = Math . max ( 0 , R - HFUZZ ) ; // A little less than the width of the right glyph
432+ L = Math . max ( 0 , L - HFUZZ ) ; // A little less than the width of the left glyph
433433 const adaptor = this . adaptor ;
434434 const [ h , d , w ] = this . getChar ( n , v ) ;
435- const X = W - L - R ; // The width of the extender
436- const Y = h + d + 2 * VFUZZ ; // The height (plus some fuzz) of the extender
437- const s = 1.5 * ( X / w ) ; // Scale the width so that left- and right-bearing won't hurt us
438- const D = - ( d + VFUZZ ) ; // The bottom position of the glyph
435+ const X = W - L - R ; // The width of the extender
436+ const Y = h + d + 2 * VFUZZ ; // The height (plus some fuzz) of the extender
437+ const s = 1.5 * ( X / w ) ; // Scale the width so that left- and right-bearing won't hurt us
438+ const D = - ( d + VFUZZ ) ; // The bottom position of the glyph
439439 if ( X <= 0 ) return ;
440440 const svg = this . svg ( 'svg' , {
441441 width : this . fixed ( X ) ,
@@ -463,7 +463,7 @@ export const SvgMo = (function <N, T, D>(): SvgMoClass<N, T, D> {
463463 * @param {number } n The character number for the right glyph of the stretchy character
464464 * @param {string } v The variant for the right glyph
465465 * @param {number } W The width of the stretched character
466- * @returns {number } The width of the right glyph
466+ * @returns {number } The width of the right glyph
467467 */
468468 protected addRight ( n : number , v : string , W : number ) : number {
469469 if ( ! n ) return 0 ;
0 commit comments