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

Feature scope #70

Open
18 of 43 tasks
dhardy opened this issue Jul 18, 2022 · 0 comments
Open
18 of 43 tasks

Feature scope #70

dhardy opened this issue Jul 18, 2022 · 0 comments

Comments

@dhardy
Copy link
Contributor

dhardy commented Jul 18, 2022

#1 leaves the target feature scope unclear. This issue is not a development plan or goal, but merely an attempt to add perspective on what/where the project is.

Unfortunately there are few clear dividing lines between features in terms of complexity, thus grouping of items here is somewhat arbitrary.

Basic features:

  • Simple typesetting with kerning
  • Line wrapping
  • Basic alignment
  • (Simple) justified text

Advanced text features:

  • Hyphenation
  • Advanced justified text: e.g. Arabic justification should increase inter-letter distance, extending the baseline
  • Bi-directional text support: breaking into "level runs" and reordering
  • Glyph mirroring
  • Shaping
  • Rotated text (could be done downstream)
  • Vertical text support
  • Emot-icons
  • Shaper and formatting inter-mixing: supporting format changes within a shaped run

Font features:

  • Font fallback
  • Font discovery: current approach is a hack ignoring system configuration
  • Font face selection from family: done but sub-optimal API
  • Variable fonts, font synthesis
  • Small-caps text

Text interaction:

  • Cursor position from index
  • Visual-order navigation via Left/Right keys
  • Mouse-coordinate to nearest text-index
  • Better than O(n) text editing
  • Intra-ligature cursor position

Text formatting:

  • Highlighting (implemented but buggy)
  • Highlighting via format tokens
  • Formatted text selecting font size and face/family
  • Underline and strike-through
  • Interactive formatting (e.g. hyperlinks should have mouse-hover effect and be clickable)
  • Non-contact underline

Text parsing is mostly orthogonal to other features; never-the-less having an easy way to construct formatted texts is useful:

  • BiDi breaking
  • Markdown (basic)
  • Simplified HTML?

Rendering is mostly out-of-scope, but some features are supported:

  • Basic glyph rastering
  • (RGB) sub-pixel rendering (probably not worthwhile now that high-res displays are common)
  • Cache-friendly raster-target descriptor supporting sub-pixel positioning
  • Hinting / grid-fitting

Layout:

  • Inter-paragraph spacing (beyond an empty line)
  • Tabs (basic implementation but too limited to call done)
  • Embedding: supporting arbitrary content embedded within text flow
  • Composibility: supporting text or complex content over multiple Text/TextDisplay objects (possibly better supported by a downstream library)

Non-text objects (likely beyond scope):

  • Horizontal rules
  • Tables
  • Quote background box

There is no desired scope or use-case, but it is very unlikely that all the above will be implemented. Notes:

  • Font discovery, font synthesis, variable font support, hinting and rastering are all complex features which will never be implemented in this crate (but may have API wrapping a foreign impl)
  • Unclear how to handle indentation/tabs and inter-paragraph spaces. Possibly allow formatting tokens to specify indent/v-skip?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant