Skip to content

Releases: pop-os/cosmic-text

0.11.2

09 Feb 22:14
0cb6eba
Compare
Choose a tag to compare

Fix glyph start and end when using shape-run-cache.

Links

0.11.1

08 Feb 18:20
cb447ea
Compare
Choose a tag to compare

This release adds a new shape-run-cache feature that, when enabled, will cache the results of shaping operations to significantly improve performance, at the cost of increased memory usage. Make sure to trim the cache with the ShapeRunCache::trim function regularly. Also make sure to set keep_ages to a large enough value that entries are not removed too early, as minor changes in the source text can switch between active entries (such as adding or removing a space in the middle of a word).

Links

Added

  • Add shape-run-cache feature, that can significantly improve shaping performance

Removed

  • Remove editor-libcosmic, see cosmic-edit instead

0.11.0

07 Feb 21:21
8174877
Compare
Choose a tag to compare

This release contains a large refactor (#206), performance improvements, and bug fixes.

Links

Added

  • Add function to set metrics and size simultaneously
  • Cache rustybuzz shape plans
  • Add capability to synthesize italic
  • New wrapping option WordOrGlyph to allow word to glyph fallback

Fixed

  • Buffer::set_rich_text: Only add attrs if they do not match the defaults
  • Do not use Emoji fonts as monospace fallback
  • Refresh the attrs more often in basic shaping
  • Buffer: fix max scroll going one line beyond end
  • Improve reliability of layout_cursor
  • Handle multiple BiDi paragraphs in ShapeLine gracefully
  • Improved monospace font fallback
  • Only commit a previous word range if we had an existing visual line

Changed

  • Update terminal example using colored
  • Significant improvements for Editor, SyntaxEditor, and ViEditor
  • Require default Attrs to be specified in Buffer::set_rich_text
  • Bump fontdb to 0.16
  • Allow Clone of layout structs
  • Move cursor motions to new Motion enum, move handling to Buffer
  • Ensure that all shaping and layout uses scratch buffer
  • BufferLine: user layout_in_buffer to implement layout
  • BufferLine: remove wrap from struct, as wrap is passed to layout
  • Refactor of scroll and shaping
  • Move color and x_opt out of Cursor
  • Add size limit to font_matches_cache and clear it when it is reached
  • Update swash to 0.1.12
  • Set default buffer wrap to WordOrGlyph

Removed

  • Remove patch to load Redox system fonts, as fontdb does it now

0.10.0

19 Oct 16:00
163d8ef
Compare
Choose a tag to compare

This release brings numerous performance and correctness improvements.

Links

Contributors

The following people contributed to this release. To see all commits included in this release, view this list of commits since 0.9.0

Added

  • Added Buffer::set_rich_text method
  • Add Align::End for end-based alignment
  • Add more Debug implementations
  • Add feature to warn on missing glyphs
  • Add easy conversions for tuples/arrays for Color
  • Derive Clone for AttrsList
  • Add feature to allow fontdb to get fontconfig information
  • Add benchmarks to accurately gauge improvements
  • Add image render tests
  • Allow BSD-2-Clause and BSD-3-Clause licneses in cargo-deny

Fixed

  • Fix no_std build
  • Fix BufferLine::set_align docs to not mention shape reset is performed
  • Fix width computed during unconstrained layout and add test for it
  • Set cursor_moved to true in Editor::insert_string
  • Fix NextWord action in Editor when line ends with word boundaries
  • Fix building editor-libcosmic with vi feature
  • Respect fontconfig font aliases when enabled
  • Fix rendering of RTL words

Changed

  • Unify no_std and std impls of FontSystem
  • Move hashbrown behind no_std feature
  • Require either std or no_std feature to be specified
  • Use a scratch buffer to reduce allocations
  • Enable std feature with fontconfig feature
  • Enable fontconfig feature by default
  • Refactor code in ShapeLine::layout
  • Set MSRV to 1.65
  • Make Edit::copy_selection immutable
  • Rewrite PreviousWord logic in Editor with iterators
  • Use attributes at cursor position for insertions in Editor
  • Update all dependencies
  • Use self_cell for creating self-referential struct

0.9.0

06 Jul 13:38
7d50d17
Compare
Choose a tag to compare

Links

Added

  • Add Shaping enum to allow selecting the shaping strategy
  • Add Buffer::new_empty to create Buffer without FontSystem
  • Add BidiParagraphs iterator
  • Allow setting Cursor color
  • Allow setting Editor cursor
  • Add PhysicalGlyph that allows computing CacheKey after layout
  • Add light syntax highlighter to libcosmic example

Fixed

  • Fix WebAssembly support
  • Fix alignment when not wrapping
  • Fallback to monospaced font if Monospace family is not found
  • Align glyphs in a LayoutRun to baseline

Changed

  • Update fontdb to 0.14.1
  • Replace ouroboros with aliasable
  • Use BidiParagraphs iterator instead of str::Lines
  • Update libcosmic version

Removed

  • LayoutGlyph no longer has x_int and y_int, use PhysicalGlyph instead

0.8.0

03 Apr 14:28
3224daa
Compare
Choose a tag to compare

Added

  • FontSystem::new_with_fonts helper
  • Alignment and justification
  • FontSystem::db_mut provides mutable access to fontdb database
  • rustybuzz is re-exported

Fixed

  • Fix some divide by zero panics
  • Redox now uses std FontSystem
  • Layout system improvements
  • BufferLinke::set_text has been made more efficient
  • Fix potential panic on window resize

Changed

  • Use f32 instead of i32 for lengths
  • FontSystem no longer self-referencing
  • SwashCash no longer keeps reference to FontSystem

Removed

  • Attrs::monospaced is removed, use Family::Monospace instead