What is the vflip parameter to ofTrueTypeFont::getStringBoundingBox?


#1

The last parameter is “vflip=true”, and the code comments don’t mention it.

I’d guess it’s whether to vertically flip… something, but I’m not sure what, or why.

Does it mean that the font will be drawn UP and to the right of the given x,y instead of down?


#2

by default openframeworks flips the y coordinate compared the the default opengl where y grows upwards instead of downwards. in some cases, though, like when using a camera there’s no vertical flip and y grows upwards.

Depending on that the bounding box of the string will be different.

So if you have the default perspective in OF then you don’t need to specify vflip. If you are using a camera or somehow setting the perspective manually then you would need to specify this parameter and set it to false


#3

That makes great sense. Thanks so much for the explanation!