"When enabled the font engine will train a weighting model to provide estimates for string sizes. Once the model is sufficiently trained it will perform string wrapping without calling ctx.measureText once. This leads to massive performance gains at the cost of accuracy."

excuse me, what?

@foone feels like an oversight in font rendering toolkits that you can't just ask for an approximate width, as it would probably know best

@greg @foone is there any way to like, general case do that with modern fonts with ligatures and what have you that is meaningfully faster than just rendering and checking how many pixels you end up with?

edit: I didn’t the word „approximate“ in there oops. But yeah