Closed morn-0 closed 7 months ago
Pixmap is a premultiplied RGBA. And you're modifying alpha.
Pixmap is a premultiplied RGBA. And you're modifying alpha.
I want to get a font with a white background in the end. If I keep it unchanged, it will have a black background.
e.g.
Try using Pixmap::pixels_mut
instead. Directly modifying the internal data is a bad idea.
If I keep it unchanged, it will have a black background.
I don't see how it is related to tiny-skia.
Try using
Pixmap::pixels_mut
instead. Directly modifying the internal data is a bad idea.If I keep it unchanged, it will have a black background.
I don't see how it is related to tiny-skia.
I think I've solved it. First processing it into premultiplied RGBA and then adding a white background seems to have worked.
Directly using draw_pixmap might be a bit slow for me
data is pixmap.data_mut();
this is ab_glyph: doc