Chlumsky / msdfgen

Multi-channel signed distance field generator
MIT License
3.91k stars 404 forks source link

msdf render and windows render why it diffs? #96

Closed alexeik closed 4 years ago

alexeik commented 4 years ago

First picture rendered by MSDF texture+shader. image

There is the word "Content" letter 'e' & 'n' are not on the same baseline. it is ok. because ""freesans.ttf"" designed like that. image

but how windows renders this fonts as that baselines are correct? image

Here 'e' & 'r' almost on baseline (visually identical)

i have 32x32 textures for freesans.ttf args for msdfgen.exe

"msdf -font freesans.ttf '" + n + "' -size 32 32 -pxrange 4 -translate 5 5 -scale 1 -o " + (int)n + ".png"

why it diffs? any ideas?

alexeik commented 4 years ago

my mistake. wrong font render. my quads for letters are depends on H&W of letter. now its independent and are equal to texture size. need some formula to make depeneds letter quad from font size.