linebender / linebender/parley

Tracking issue: Features for egui

Open
#386 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
736
Forks
120
Avg merge
1d 3h
Merged PRs (30d)
53

Description

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)
- [x] Ability to set line.offset? (necessary for egui's `LayoutSection::leading_space`)
- [x] 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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the unchecked Parley and Fontique items, beginning with their linked issues for serde, vertical alignment, tab support, AccessKit, fallback, and size adjustment. Also read the API rework discussion around lower-level line positioning and the current TreeBuilder and InlineBox usage. The issue has no single definition of done; choose one item and confirm its linked requirement before starting.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design, computer-graphics, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.