I can't seem to figure out how to rotate a Bitmap font correctly. I think you modify the transformation matrix of the SpriteBatch. However, trying to rotate that rotates the text around some point, and I don't know how to rotate it relative to the text itself.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Extract matrix elements using a vector of column i
You can create a glyph into a sprite. That way , you can manipulate your text as a sprite.
Example code:
Note, this will return a Sprite of a single glyph. (E.g. char 'A' is transformed into a sprite.)
I would just add.. I suppose you have font base image inside some atlas.. so you need to add TextureRegion originals sot gliph src as it is just relative to that given Texture region so
The first answer from Lunatikul didn't worked in my 2D case. It cuts my text to only a half letter. I was successfull with the following:
you can try the following code: