Open JustFrederik opened 1 year ago
No, this is easier: positioning characters in PDF is done on a character-by-character basis, so you just need to figure out the correct x
and y
positions and decode them from the font shaper (allsorts). I don't know how to do that however.
Yeah that’s right, but be a useful feature the set the text orientation. Vertical and horizontal alignment would be a useful addition.
azul-text-layout could be used to calculate the the positions of each char
there is actually this in font.rs
let w = {
if self.vertical_writing {
("W2", Array(widths_list))
} else {
("W", Array(widths_list))
}
};
its on line 492 and it seems like vertical writing is implemented or an attempt of that, but no way to set that vertical writing to true and alignment is already planed(after readme)
Will you implement vertical text. I dont mean rotate, but like the example:
I know it could be acieved by creating for each char a new line and create a new text section for every line, but this would be tedious.