Given the following letters, all are absolutely aligned vertically to the bottom, however I need to align them to their baseline.
How can that calculate the letter vertical offset?
- Each letter is currently displayed vertically with
y = bottomY - fontSize(all in pixels) fontSizeis proportional toh(i.e.fontSize = h * 0.5for50%)- the descent value
dis a variable obtained per font family, e.g.d = h * 0.22
I know that, for a scaling of 1 (100%), the offset should be 0, and it seems like for 0.5 (50%), the offset seems to offset = d / 2, but what about when the scaling is 0.1 (10%)?
Thank you for helping me understand the math behind this.
