parley icon indicating copy to clipboard operation
parley copied to clipboard

Tracking issue: Features for egui

Open valadaptive opened this issue 6 months ago • 5 comments

Similar to the Blitz tracking issue, this is what egui will eventually need from Parley.

Parley

  • [x] Text wrap styling (https://github.com/linebender/parley/pull/315)
  • [x] Text truncation with ellipsis
  • [ ] serde support for some types (the selection ones at least)
  • [ ] Vertical alignment options, especially for InlineBox (https://github.com/linebender/parley/issues/291)
  • [ ] Ability to set line.offset? (necessary for egui's LayoutSection::leading_space)
    • [ ] This can't just be a visual thing because of hit testing; Layout needs to agree on where everything is
  • [x] Absolute line height
  • [x] Custom family names (https://github.com/linebender/parley/issues/117)
  • [x] Inline box fix (https://github.com/linebender/parley/pull/299)
  • [x] Don't round vertical metrics (https://github.com/linebender/parley/pull/297)
  • [x] RTL jank (https://github.com/linebender/parley/issues/298)
  • [ ] Support the tab character (https://github.com/linebender/parley/issues/302)
  • [ ] AccessKit API improvements (https://github.com/linebender/parley/issues/310)
  • [ ] Technically Swash: tighter glyph bounds (https://github.com/dfrg/zeno/pull/15) (merged but not released)
  • [ ] A newer/better "attributed text" API. Currently I'm using TreeBuilder since I need to push entire style sets at once, but TreeBuilder allocates a new String every time, which is unnecessary.

Fontique

  • [ ] SystemUi doesn't properly fallback in some cases (e.g. Arabic text, macOS shortcut symbols) on my machine; SansSerif does (https://github.com/linebender/parley/issues/323)
  • [ ] Size adjustment multiplier for custom fonts (https://github.com/linebender/parley/issues/324)

API rework?

As discussed in https://github.com/linebender/parley/issues/325, a lot of this would be way easier to implement if Parley exposed lower-level APIs that let us position each line ourselves. In particular, egui needs to support flowing text around previous text, which I'm currently hacking together with InlineBox and shifting things around vertically.

valadaptive avatar Jul 01 '25 07:07 valadaptive