0

Do you know how to compute the vertical shift for font drawing ?

Explaination: I am drawing 2D letters in a 3D world and I would like to return to a newline. So I need to compute the vector between the origin point of the 1rst baseline and the new origin point of the 2nd newline.

I think this operation should keep in mind the YBearing, the height of the letter and real size of the plan which will draw the font texture.

CharlesB
  • 86,532
  • 28
  • 194
  • 218
DevMultiTech
  • 353
  • 3
  • 15

1 Answers1

0

It appears it would be computed as :

baseline-to-baseline-shift = ascent - descent + linegap (descent is a negative value)

These parameters should be globals, so now the problem is just to find accessor to it.

DevMultiTech
  • 353
  • 3
  • 15