Closed
Description
When working with XPS documents WPF will subset fonts in order to reduce their size during embedding. In certain cases, this can result in the font growing during subsetting.
This results in us returning ERR_WOULD_GROW:
We already know what to do in this case (as the comments in the code above suggest), use the original font. However, we seem to be ignoring that:
The fix is pretty straightforward, simply copy the font into the result buffer when we detect ERR_WOULD_GROW
and return as usual.