@@ -159,8 +159,8 @@ export function CommonMfracMixin<T extends WrapperConstructor>(Base: T): MfracCo
159159 * @param {number } t The thickness of the line
160160 */
161161 public getFractionBBox ( bbox : BBox , display : boolean , t : number ) {
162- const nbox = this . childNodes [ 0 ] . getBBox ( ) ;
163- const dbox = this . childNodes [ 1 ] . getBBox ( ) ;
162+ const nbox = this . childNodes [ 0 ] . getOuterBBox ( ) ;
163+ const dbox = this . childNodes [ 1 ] . getOuterBBox ( ) ;
164164 const tex = this . font . params ;
165165 const a = tex . axis_height ;
166166 const { T, u, v} = this . getTUV ( display , t ) ;
@@ -204,8 +204,8 @@ export function CommonMfracMixin<T extends WrapperConstructor>(Base: T): MfracCo
204204 * the separation between the two, and the bboxes themselves.
205205 */
206206 public getUVQ ( display : boolean ) : { u : number , v : number , q : number , nbox : BBox , dbox : BBox } {
207- const nbox = this . childNodes [ 0 ] . getBBox ( ) as BBox ;
208- const dbox = this . childNodes [ 1 ] . getBBox ( ) as BBox ;
207+ const nbox = this . childNodes [ 0 ] . getOuterBBox ( ) ;
208+ const dbox = this . childNodes [ 1 ] . getOuterBBox ( ) ;
209209 const tex = this . font . params ;
210210 //
211211 // Initial offsets (u, v)
@@ -234,7 +234,7 @@ export function CommonMfracMixin<T extends WrapperConstructor>(Base: T): MfracCo
234234 */
235235 public getBevelledBBox ( bbox : BBox , display : boolean ) {
236236 const { u, v, delta, nbox, dbox} = this . getBevelData ( display ) ;
237- const lbox = this . bevel . getBBox ( ) ;
237+ const lbox = this . bevel . getOuterBBox ( ) ;
238238 bbox . combine ( nbox , 0 , u ) ;
239239 bbox . combine ( lbox , bbox . w - delta / 2 , 0 ) ;
240240 bbox . combine ( dbox , bbox . w - delta / 2 , v ) ;
@@ -249,8 +249,8 @@ export function CommonMfracMixin<T extends WrapperConstructor>(Base: T): MfracCo
249249 public getBevelData ( display : boolean ) : {
250250 H : number , delta : number , u : number , v : number , nbox : BBox , dbox : BBox
251251 } {
252- const nbox = this . childNodes [ 0 ] . getBBox ( ) as BBox ;
253- const dbox = this . childNodes [ 1 ] . getBBox ( ) as BBox ;
252+ const nbox = this . childNodes [ 0 ] . getOuterBBox ( ) ;
253+ const dbox = this . childNodes [ 1 ] . getOuterBBox ( ) ;
254254 const delta = ( display ? .4 : .15 ) ;
255255 const H = Math . max ( nbox . scale * ( nbox . h + nbox . d ) , dbox . scale * ( dbox . h + dbox . d ) ) + 2 * delta ;
256256 const a = this . font . params . axis_height ;
@@ -282,7 +282,7 @@ export function CommonMfracMixin<T extends WrapperConstructor>(Base: T): MfracCo
282282 public getWrapWidth ( i : number ) {
283283 const attributes = this . node . attributes ;
284284 if ( attributes . get ( 'bevelled' ) ) {
285- return this . childNodes [ i ] . getBBox ( ) . w ;
285+ return this . childNodes [ i ] . getOuterBBox ( ) . w ;
286286 }
287287 const w = this . getBBox ( ) . w ;
288288 const thickness = this . length2em ( attributes . get ( 'linethickness' ) ) ;
0 commit comments