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 rendering #424

Open
5 of 17 tasks
kpreid opened this issue Nov 22, 2023 · 4 comments
Open
5 of 17 tasks

Text rendering #424

kpreid opened this issue Nov 22, 2023 · 4 comments
Labels
area: ui kind: incomplete A feature is partially implemented; the current state of the code is inconsistent

Comments

@kpreid
Copy link
Owner

kpreid commented Nov 22, 2023

As discussed in 95a1578, I am adding Primitive::Text, text rendering in blocks without rendering to an intermediate space, for more efficient rendering and better interactive editability. The feature needs work:

  • Specify text positioning via a bounding box, so that we can tolerate font changes better and more reasonably specify location (b2ef581)
  • Optional truncation/ellipsis of long text
  • Usage and demos:
    • Add a vui::widgets::Label that displays static text blocks from a string. (03fd53f)
    • Add a vui::widgets::TextBox that displays dynamic and eventually editable text.
    • Add text labels to vui::widgets::*Button. (84e3322)
    • Replace all or most existing text rendering
  • Resolution and Z/depth issues:
    • Explicitly chosen resolution / text sizing within block
    • Add a means to get outlined text (as used in the existing tooltip and logo) efficiently — this will increase thickness
    • We may want characters to be able to have depth themselves (3D emoji)
    • Flag indicating intent to engrave the text, so all features should touch the front face and be legible as monochrome
  • Fonts (and eventually replacing embedded-graphics — Replace embedded-graphics dependency #528)
    • Create or find a good set of “system fonts”
    • Add user-defined font support
  • Specify, test, and demonstrate the layout of multiline text
  • Fix numeric overflows possible by large layout numbers (see b4ebb67)
@kpreid kpreid added the kind: incomplete A feature is partially implemented; the current state of the code is inconsistent label Nov 22, 2023
@kpreid
Copy link
Owner Author

kpreid commented Dec 4, 2023

As of 1791e75 we have a Label widget, and each Text has a layout_bounds box and resolution.

@kpreid
Copy link
Owner Author

kpreid commented Dec 14, 2023

f4e256c adds outlined text. However, I ran into trouble trying to actually use it for the Tooltip widget — nothing is visible even though all the layout looks correct. (The bug is not specific to outlined text.) I think I need better debugging tools for block definitions — some kind of “why is this invisible” report.

@kpreid
Copy link
Owner Author

kpreid commented Jan 12, 2024

84e3322 adds text for button labels (but much work is needed on tuning the layout).

@kpreid
Copy link
Owner Author

kpreid commented Apr 5, 2024

570d7df converts the Tooltip widget to use text blocks. It reveals our lack of proper bounding box handling for outlined text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ui kind: incomplete A feature is partially implemented; the current state of the code is inconsistent
Projects
None yet
Development

No branches or pull requests

1 participant