Closed RazrFalcon closed 5 years ago
Not sure about macOS.
Seems to be complete on macOS, but more blurry:
glyph 94:
░░▒▒▓▓▓▓▓▓
░░▓▓████████
▒▒██████████
▓▓████▓▓░░░░
░░██████░░
░░██████░░
░░██████░░
░░██████░░
░░██████░░
░░██████░░
░░████▓▓
▒▒████▓▓
░░▓▓████▒▒
░░▒▒▓▓██████░░
▒▒██████▓▓▒▒
▒▒██████▓▓░░
▒▒████████▒▒
░░░░▓▓██████░░
░░▓▓████▒▒
▒▒████▓▓
░░████▓▓
░░██████░░
░░██████░░
░░██████░░
░░██████░░
░░██████░░
░░██████▒▒
▓▓████▓▓▒▒▒▒
▒▒██████████
░░▓▓████████
░░▒▒▒▒▓▓▓▓
A little bit input about the issue:
Clipping is occurring because dwrite_analysis.get_alpha_texture_bounds
is returning negative top values for char {.
Changing the following line https://github.com/pcwalton/font-kit/blob/2fd68a8e932d43d498d58021d6fc78c0c0eef81f/src/loaders/directwrite.rs#L481 to
point2(0,0)
is fixing the clipping in the example but messing up the baselining. (I am not sure if this is the right term to use)
I have tried silicon
with the modified local version of font-kit
and this is how it renders after the change.
Looks like a rendering canvas doesn't have an enough space.
Works correctly on Linux. Not sure about macOS.
@pcwalton I'm not familiar with dwrite. Can you take a look?