-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add Text Node #6
Comments
@amitkaps what do you think? |
Text is a responsive shape - normally implemented within a rectangle frame element - where the size is determined by content (character) length, font & font specs like line height and wrapping & alignment modifier. I would treat the content as default first param and then all other modifier as keywords args.
|
How about this API for text?
|
How to specify the size of the text? |
How about this way?
|
Its good thankyou
…On Wed, 14 Jul, 2021, 9:06 PM Anand Chitipothu, ***@***.***> wrote:
How to specify the size of the text?
How about this way?
t = text("hello", x=100, y=100, font_size=24)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AU27MMZOV47JYW3EHFKPSQLTXWVF7ANCNFSM46JA55OA>
.
|
A text node feels essential, so I gave this a quick go. It turns out that with the current coordinate system of This is easy to workaround though if you have full control over the generated SVG and then alloows to add a basic text node: #37 |
I did not understand the text can you explain it once again
…On Sat, 15 Jan 2022 at 03:06, asteppke ***@***.***> wrote:
A text node feels essential, so I gave this a quick go. It turns out that
with the current coordinate system of joy this is rather difficult
because the flip transformation of the y axis flips any text as well. This
seems to be a rather inherent property of SVG:
https://stackoverflow.com/questions/3846015/flip-svg-coordinate-system
This is easy to workaround though if you have full control over the
generated SVG and then alloows to add a basic text node: #37
<#37>
—
Reply to this email directly, view it on GitHub
<#6 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AU27MM32CSWXYMMMDBGXSB3UWCJMBANCNFSM46JA55OA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
The API
Not sure, if this can be called a shape though.
I'm not completelty sure what would be the right API for this.
The first one is confusing because the word text is appearing multiple times. I'm not sure either value or contents is the right word.
Reference
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/text
The text was updated successfully, but these errors were encountered: