Download MetaTrader 5

Obtaining the baseline of graphical text?

To add comments, please log in or register
Thousands of developers have already published their products in the Market. Join them!
Doerk Hilger
1154
Doerk Hilger 2015.10.20 08:08 

Hi there,

does anybody know if there is way to figure out the baseline of graphical text in MQL?

What I mean is, text has a height, which you can get by TextGetSize(), but this defines only the difference from the lowest pixel to the highest, but not the baseline, which defines the common aligning base for all characters. A "g" or a "y" reaches to the bottom whereby the lowest pixel on the Y-axis for an  "a" or most capital letters is on the baseline and not on the lowest pixel. This information is necessary if one wants to work with multiple fonts and/or sizes in the same row.

Anyone an idea?

Thanks

Doerk 

To add comments, please log in or register