可以看下这个是不是能用 [https://opentype.js.org/](https://link.segmentfault.com/?enc=olswOFJp3gUs4hKwrUOoHQ%3D%3D.ch7n3rB5HkYMEs0NhvTodDjDhaxrSMbJ8hte9MVxh68%3D) `Font.draw(ctx, text, x, y, fontSize, options)` > Create a Path that represents the given text. > > ctx: A 2D drawing context, like Canvas. > x: Horizontal position of the beginning of the text. (default: 0) > y: Vertical position of the baseline of the text. (default: 0) > fontSize: Size of the text in pixels (default: 72). > Options is an optional object containing: > > kerning: if true, takes kerning information into account (default: true) > features: an object with OpenType feature tags as keys, and a boolean value > to enable each feature. Currently only ligature features "liga" and "rlig" > are supported (default: true). > hinting: if true uses TrueType font hinting if available (default: false). `Glyph.getBoundingBox()` > Calculate the minimum bounding box for the unscaled path of the given glyph. > Returns an opentype.BoundingBox object that contains x1/y1/x2/y2. If the > glyph has no points (e.g. a space character), all coordinates will be zero.