Scribble icon indicating copy to clipboard operation
Scribble copied to clipboard

Add optional argument such that MSDF font pxrange is scaled by scribble_font_scale()

Open caroparo opened this issue 7 months ago • 1 comments

I have a zh msdf font A that is generated with { size: 64, pxrange: 16 } that I scribble_font_scale() by 0.5, to merge with another en alphabet+numbers font B that is { size: 32, pxrange: 16 } using scribble_super_glyph_copy.

It works, but then thick borders tend to cause issues easily, so I decided to regenerate the zh font A with { size: 64, pxrange: 32 } to match the size/pxrange ratio of the en font B. However, this causes scribble_super_glyph_copy() to fail due to the unscaled pxrange mismatch. I then tried to modify scribble code so __msdf_pxrange is also scaled in scribble_font_scale() and the end results seem okay.

I wonder whether this is an overlooked corner case issue in scribble, or would it cause other issues if I scale __msdf_pxrange like described?

caroparo avatar Dec 04 '23 06:12 caroparo