-
Notifications
You must be signed in to change notification settings - Fork 145
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
How to align text vetrically #33
Comments
Do you mean align vertically as in adjust the y-position? You mention start drawing text at width/2 which sounds like horizontal alignment (and that is already built into Carota - the demo has toolbar buttons for left/right/center/justify). For vertical alignment, it's much simpler - you just move the canvas coordinate origin downward (and for handling mouse events in the editor, you move the coordinate upward). This would be a "whole document" setting, not something applying to selected text. There's nowhere in Carota's own JSON format for such settings. But it would be easy to add them to the outside. To demo this I've added a See updated demo: http://earwicker.com/carota - the right-most toolbar control. |
Hi Yes - that was vertical alignment :-) Thanks for reply and demo! I hava another question: is there way to get text real height in px of writen text ? Or is there way to limit textarea to specified width/height, example: user ads text that is formated to font 72 and its higher than 200px, and it's auto resized to fit 200px, ex font 54. Regards Artur |
…ntent Updated getDrawableContent
Same as topic: how to align text vetrically to start draw text from width/2 point ?
Thanks for any answer.
The text was updated successfully, but these errors were encountered: