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

WIP Multiple font size / line height spans #150

Closed
wants to merge 26 commits into from

Conversation

tigregalis
Copy link
Contributor

@tigregalis tigregalis commented Jul 4, 2023

Current status: Almost done. Working, with some fixes for the editing required.

Fixes #64

Implement specifying multiple font sizes and/or line heights.

Media8mute.mp4

TODO:

  • fix scrolling
  • implement enum LineHeight
  • cache line_heights()
  • retire Metrics
  • rebase
  • migrate example editor-orbclient
    • fix bug empty buffer does not render cursor
    • fix bug empty buffer has default Attrs
    • support rescaling font sizes on demand, perhaps via mutable access to spans of Attrs
  • migrate example editor-test
  • migrate example editor-libcosmic (NOTE: does not compile on Windows with pinned version of iced (incompatible API))
  • migrate example terminal (NOTE: does not compile on Windows with termion, see Update terminal example using colored #129)
  • migrate tests
  • migrate benches
  • migrate vi feature
  • fix editor action Vertical
  • fix some editor actions not redrawing
  • tidy up
  • docs and PR write-up

Future work:

  • Split Attrs: color_opt, metadata, font_size, line_height
  • Buffer should have a default Attrs
  • Convenience method for updating all spans of Attrs in a Buffer
  • Handle start-of-line Attrs more carefully

Questions:

  • Should the Hash impl of Attrs include line height?
  • Should Metrics be restored as a property of Attrs, with definition Metrics { font_size: f32, line_height: LineHeight }?

@nicoburns
Copy link
Contributor

Linking my PR that continues this PR: tigregalis#1

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

Successfully merging this pull request may close these issues.

Spans of font sizes
2 participants