Closed wsxyeah closed 4 years ago
use support
option to keep bounding box
// write font file
let buffer = font.write({
type: 'woff', // support ttf, woff, woff2, eot, svg
hinting: true, // save font hinting
deflate: null, // deflate function for woff
support: {head: {}, hhea: {}} // for user to overwrite head.xMin, head.xMax, head.yMin, head.yMax, hhea etc.
});
Now the bounding box will be re-calculated, which leads to vertical clipping issue in the situation of font fallback, since the absolute value of
yMin
andyMax
becomes smaller than before, and the measured height of text may be smaller than the fallback font.So any option to keep the original bounding box for the compatibility?