Add support for swash

This commit is contained in:
Jeremy Soller 2022-10-07 09:41:36 -06:00
parent 51639e53cb
commit cf43655357
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE
7 changed files with 116 additions and 66 deletions

View file

@ -202,10 +202,9 @@ fn main() {
}
}
line.draw(|x, y, v| {
let c = (v * 255.0) as u32;
window.pixel(line_x + x, line_y + y, Color{
data: c << 24 | (font_color.data & 0x00FF_FFFF)
line.draw(|x, y, alpha| {
window.pixel(line_x + x, line_y + y, Color {
data: (alpha as u32) << 24 | (font_color.data & 0x00FF_FFFF)
});
});