UltravioletFramework / ultraviolet

The Ultraviolet Framework is a .NET game development framework written in C#.
https://github.com/UltravioletFramework/ultraviolet/wiki
MIT License
541 stars 46 forks source link

Rotating opentype fonts provides unexpected results. #144

Open fireball87 opened 3 years ago

fireball87 commented 3 years ago

I've been trying to rotate a font loaded as a opentype font through the freetype plugin.

context.DrawString(drawFont, playerName, new Vector2(100, 100 ), Color.White,(float)Math.PI/2,new Vector2(0,0 ),1f,SpriteEffects.None,100f);

Produces a very wild movement of the text so it is no longer on screen, where if I understand origin that should be relative to the drawn text itself. If i move origin to 100,100 it produces the text half way off the edge of the screen

Swapping origin and position provides more the result i'd expect (if the items were unflipped), but the actual drawing seems broken with text overlapping and absolute position changing for the individual symbols.

image vs image