Getting proper pixel height for font line height spacing


#1

Hey embers,

I’m using getGlyphPlacementsWrapped() to batch render text, despite the fact that the header claims it’s for Mac & iOS only? It seems to work perfectly fine on Windows.

I’m rendering the text in a sort of ‘console’ style so I just want to have even spacing between each line, but I’m having trouble determining the proper height value to use to position the text. I.e. the pixel height value that should be in-between individual entries.

The only way - for now - I’ve found is to simply use a ci::Rectf small enough on an initial call to getGlyphPlacementsWrapped() to have line breaks occur, at which time I can inspect the provided calculated ci::vec2 objects and find that the proper line offset needs to be 22 pixels.

But it seems to me that there must/should be a more direct way, but none of the function calls seem to return this value/number.

Anyone else run into this problem?

Cheers,
Gazoo