Strange. I can't seem to get a valid Text String Height. Obviously, the string "are" and "ARE" and "going" and "[Test]" all have different heights. Some have descenders, some like the bracket extend above even capital letters in CIQ (not here, where the bracket's top is aligned with the top of the "T").
However, the function "dc.getTextDimensions(msg,font)[1]" simply returns the entire Font's height, not the height of the string that is passed.
Is there any mechanism to get the actual height in pixels for a specific string?
Here is the output of my text code, sending a text string that should be about half of the overall height of the Font.
FONT: 4, MESSAGE: oae, FONT HEIGHT: 48, FONT ASCENT: 38 FONT DESCENT: 10 STRING HEIGHT: 48 STRING WIDTH: 57
It is strange the API includes a "getTextWidthInPixels". Because:
- that should be identical to getTextDimensions(msg,font)[0] (according to the documentation)
- they don't offer a "getTextHeightInPixels"
Seems they should fix the getTextDimensions function. Or if the real intent of that one is the capture multiple lines (\n) and use the Font Height... then offer a getTextHeightInPixels function to actually provide a string height.