Content-Length: 226117 | pFad | http://github.com/thorvg/thorvg/issues/2961

83 Text: Missing features for basic text field implementation · Issue #2961 · thorvg/thorvg · GitHub
Skip to content
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

Text: Missing features for basic text field implementation #2961

Open
lpogic opened this issue Nov 15, 2024 · 1 comment
Open

Text: Missing features for basic text field implementation #2961

lpogic opened this issue Nov 15, 2024 · 1 comment
Assignees
Labels
enhancement Improve features
Milestone

Comments

@lpogic
Copy link
Collaborator

lpogic commented Nov 15, 2024

I wonder if it would be possible to introduce features into ThorVG that would allow for an efficient implementation of a text field.

What I miss is support for scenarios:

  • I have the coordinates of the mouse cursor, I need to know the position of the text cursor (character index)
  • I have the position of the text cursor, I need its coordinates

These cases can be reduced to:

  • give me the maximum character index for a width limit (for given text in given style)
  • give me the text width for a substring

I think this requires adding mechanisms to measure text without having to render it. Would there be a place for such functionality in the library? Or maybe it is possible to use existing mechanisms to achieve these goals?

@lpogic lpogic added the question/idea New concepts / questions / suggestions label Nov 15, 2024
@hermet hermet added this to ThorVG Nov 26, 2024
@hermet hermet added the enhancement Improve features label Nov 26, 2024
@hermet
Copy link
Member

hermet commented Dec 14, 2024

see also: #2731

@hermet hermet added this to the 2.0 milestone Dec 23, 2024
@hermet hermet removed the question/idea New concepts / questions / suggestions label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve features
Projects
Status: No status
Development

No branches or pull requests

3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/thorvg/thorvg/issues/2961

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy