-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
String rotation #47
Comments
You can always force drawing text with shape by using the default TextDrawer, or setting it to PdfBoxGraphics2DFontTextDrawer, i.e.
But you could instead just use a normal transform on the Graphics2D to rotate the text:
I.e. you do a:
But I'll try to look into this. Maybe this can be made work with font files. |
Thanks for the answer, I did just what you have suggested, which was rotating the gc -90 deg and back. I have tried setting PdfBoxGraphics2DFontTextDrawer which also worked, it may be good to access the used FontTextDrawer, sou you could switch them back and forth as you go. Is there a reason why you havent accesed the get method for used FontTextDrawer? Im just curious. BTW, I really appreciate that you have answered on sunday! |
The gfx has currently no getFontTextDrawer() method, and I'm not sure if this is method is really needed. I got your basic sample working with fonts, I'm just need to debug the case with attributed text, thats not really working yet. Well on sundays it's more likely that I've time for this project ;-) |
But this only works for the simple case of a transformed font at the moment...
It seems that string rotation is not working for 0.42.
Is there some workaround or am I doing something wrong?
I have fonts registered, and I have checked that Im drawing it as a string.
Maybe if I could force it to draw rotated text using shapes?
The text was updated successfully, but these errors were encountered: