Releases: linebender/parley
v0.7.0
| Name | Crates.io | Docs |
|---|---|---|
| Parley | Crates.io | Docs |
| Fontique | Crates.io | Docs |
This release has an MSRV of 1.83.
Highlights
#448 by @taj-p and #449 by @nicoburns collectively fix a significant performance bug that occurred when laying out large paragraphs of text. Previously the time to perform layout was non-linear with respect to the input size and laying out paragraphs of text with more than ~1k characters was very slow.
The new TextWrapMode style implements the semantics of the text-wrap-mode CSS property and allows text-wrapping to be disabled completely for a span of text.
Migration
Some modules have been moved:
parley::editorandparley::layout::editorare nowparley::editing.parley::layout::cursoris nowparley::cursor.
Fontique no longer sets the dlopen feature of yeslogic-fontconfig-sys by default. If you wish to run Fontique on a Linux system without fontconfig installed then you will need to enable the new fontconfig-dlopen feature of the fontique crate. If you wish to compile Fontique on a Linux system without the fontconfig-dlopen enabled then you will need the fontconfig dev package (e.g. libfontconfig1-dev on Ubuntu) installed.
Added
Parley
- Add
TextWrapModestyle. This allow line wrapping to be disabled completely for a span of text (excluding explicit line breaks). (#367 by @nicoburns) - Add
Cluster::from_point_exactmethod for hit-testing spans of text. This is useful for implementing "hover" or "click" functionality. (#447 by @nicoburns)
Changed
Parley
- Split off various modules into "editing" folder. (#440 by @PoignardAzur)
- Split contents of layout/mod.rs file. (#444 by @PoignardAzur)
Fontique
Fixed
Parley
- Running line height calculation. (#448 by @taj-p)
- Optimise line height computation. (#449 by @nicoburns)
- Add word and letter spacing to text layout based on style properties. (#468 by @dolsup)
- Hang trailing whitespace preceding explicit newline. (#276 by @wfdewith)
Fontique
- Fix build on platforms without 64bit atomics. (#451 by @nicoburns)
New Contributors
- @dolsup made their first contribution in #468
- @ogoffart made their first contribution in #467
- @PoignardAzur made their first contribution in #440
Full Changelog: v0.6.0...v0.7.0
v0.6.0
| Name | Crates.io | Docs |
|---|---|---|
| Parley | Crates.io | Docs |
| Fontique | Crates.io | Docs |
This release has an MSRV of 1.82.
Highlights
Parley now uses HarfRust rather than Swash. This means that Parley now has production-quality shaping for all scripts and can be recommended for general usage.
Migration
As Parley now uses it's own parley::BoundingBox in place of kurbo::Rect, you may need to convert the type if you were previously passing one of these values into a function that expects kurbo::Rect. The following function may be used to perform this conversion:
fn bounding_box_to_rect(bb: parley::BoundingBox) -> kurbo::Rect { kurbo::Rect::new(bb.x0, bb.y0, bb.x1, bb.y1) }Added
Parley
- Shift-click support through
Selection::shift_click_extensionandPlainEditorDriver::shift_click_extension. (#385 by @kekelp) - Add some benchmarks using Tango. (#405 by @taj-p)
Fontique
- Cache character mapping metadata for each font to improve performance of font selection. (#413 by @dfrg)
- Upgrade
icu4xdependencies to v2.x. (#418 by @nicoburns) - Added an
unregister_fontmethod to remove a font from a collection. (#395 by @taj-p)
Changed
Parley
- Breaking change:
Alignmentvariants have been renamed to better match CSS.Alignment::Justifiedis nowAlignment::JustifyandAlignment::Middleis nowAlignment::Center. (#389 by @waywardmonkeys) - In the
PlainEditor, triple-click now selects paragraphs rather than words (#381 by @DJMcNab) - Updated to
accesskit0.21. (#390 by @mwcampbell) - Uses
HarfRustfor text shaping. (#400 by @taj-p) - Parley no longer depends on
penikoorkurbo. (#414 by @nicoburns):- Breaking change: The use of
peniko::Fonthas been replaced withlinebender_resource_handle::FontData, as suchparley::Fontis now calledParley::FontData.
Note that this is the same type as in previous releases, and so is fully backwards-compatible, just with a different name. - Breaking change: The use of
kurbo::Recthas been replaced with a newparley::BoundingBoxtype.
- Breaking change: The use of
Fontique
- The fontconfig backend, used to enumerate system fonts on Linux, has been rewritten to call into the system's fontconfig library instead of parsing fontconfig's configuration files itself. This should significantly improve the behavior of system fonts and generic families on Linux. (#378 by @valadaptive)
- Fontique no longer depends on
peniko. The use ofpeniko::Blobhas been replaced withlinebender_resource_handle::Blob. This is unlikely to affect users of the crate. (#414 by @nicoburns)
Fixed
Parley
- Selection extension moves the focus to the side being extended. (#385 by @kekelp)
- Ranged builder default style not respecting
scale. (#368 by @xStrom) - Cluster source character not correct. (#402 by @taj-p)
- Don't justify the last line of a paragraph. (#410 by @taj-p)
Fontique
- Font family name aliases (secondary names for font families, often in another language) not being registered. (#380 by @valadaptive)
New Contributors
Full Changelog: v0.5.0...v0.6.0
v0.5.0
| Name | Crates.io | Docs |
|---|---|---|
parley | Crates.io | Docs |
fontique | Crates.io | Docs |
This release has an MSRV of 1.82.
Added
Parley
- Editor features required by Android IME. (#334 by @mwcampbell)
Changed
Parley
- Breaking change:
Layout::min_content_width,Layout::max_content_width, andLayout::content_widthshave been replaced withLayout::calculate_content_widths, which does not internally cache the widths. This means thatLayoutis nowSyncagain, but callers will have to cache the min and max content widths themselves. (#353 by @valadaptive) - Breaking change: the line height style property (
StyleProperty::LineHeightand theline_heightfield onTextStyle) is now aLineHeightenum that allows you to specify absolute, font-size-relative, and font-metrics-relative line heights.
Previously, it was always font-size-relative. (#362 by @valadaptive)- The default line height was previously
LineHeight::FontSizeRelative(1.0)if you usedRangedStyleBuilder, orLineHeight::FontSizeRelative(1.2)if you usedTreeStyleBuilder.
It is nowLineHeight::MetricsRelative(1.0)in both cases.
This will affect layout if you don't specify your own line height.
- The default line height was previously
- Breaking change:
{RangedBuilder, TreeBuilder}::{build_into, build}methods now consumeself. (#369 by @dhardy)
New Contributors
Full Changelog: v0.4.0...v0.5.0
v0.4.0
| Name | Crates.io | Docs |
|---|---|---|
parley | Crates.io | Docs |
fontique | Crates.io | Docs |
This release has an MSRV of 1.82.
Migration
Quantization of vertical layout metrics is now optional.
For an easy upgrade we recommend enabling it by setting quantize to true when calling LayoutContext::ranged_builder or LayoutContext::tree_builder.
Added
Parley
- Option to skip quantization of vertical layout metrics for advanced rendering use cases. (#297 by @valadaptive, #344 by @xStrom)
- The
WordBreakandOverflowWrapstyle properties for controlling line wrapping. (#315 by @valadaptive) PlainEditormethodsraw_selectionandraw_text. (#316, #317 by @mwcampbell)PlainEditor::selection_geometry_with, the equivalent ofSelection::geometry_withmethod. (#318 by @valadaptive)BreakLines::is_donemethod to check if all the text has been placed into lines. (#319 by @valadaptive)
Changed
Parley
- Breaking change:
Selection::geometry,Selection::geometry_with, andPlainEditor::selection_geometrynow include the line indices that the selection rectangles belong to. (#318 by @valadaptive) - Updated to
accesskit0.19. (#294 by @waywardmonkeys, #348 by @xStrom) - Now displaying selected newlines as whitespace in the selection highlight. (#296 by @valadaptive)
- Made
BreakReasonpublic. (#300 by @valadaptive)
Fontique
- Breaking change:
Collection::register_fontsnow takes aBlob<u8>instead of aVec<u8>. (#306 by @valadaptive) - Breaking change:
Collection::register_fontsnow takes an optional second parameter which allows overriding the metadata used for matching the font. (#312 by @valadaptive)
Fixed
Parley
- Text editing for layouts which contain inline boxes. (#299 by @valadaptive)
- Cursor navigation in RTL text sometimes getting stuck within a line. (#331 by @valadaptive)
- Using
Layout::alignon an aligned layout without breaking lines again. (#342 by @xStrom) - Selection box height going below ascent + descent with small line heights. (#344 by @xStrom)
- Rounding error accumulation of vertical layout metrics. (#344 by @xStrom)
Fontique
New Contributors
- @valadaptive made their first contribution in #300
- @NoahR02 made their first contribution in #335
Full Changelog: v0.3.0...v0.4.0
Parley 0.3.0
Parley 0.2.0
With growing community effort, we have reached v0.2.0 of Parley!
This release also conincides with the release of v0.2.0 of Fontique.
This release has an MSRV of 1.75.
This remains alpha-quality software. There are plenty of issues, known and unknown, and we look forward to further development.
Added
Parley
- Example using tiny-skia which renders into a png (#55 by @nicoburns)
- Breaking change: There is now a blanket implementation for
Brush.
- Breaking change: There is now a blanket implementation for
- A swash example which renders into a png (#54 by @nicoburns)
- An example with Vello on Winit which shows a basic text editor (#106 by @dfrg)
PlainEditor, a basic action-based text editor based on ParleySelectionandCursor(#126 by @xorgy)- Tree style builder (#76 by @nicoburns)
- Conversions for
FontFamily,FontStack, andStylePropertyto make styling more ergonomic (#129 by @xorgy)
Changed
General
- Repository layout updated to match Linebender standard (#59 by @waywardmonkeys)
Parley
- Emoji clusters now get an Emoji family added by default (#56 by @dfrg)
- Style builders now accept
Into<StyleProperty<'a, B: Brush>>so you can push aGenericFamilyorFontStackdirectly. (#129 by @xorgy)
Fontique
- Removed unsafe code from fontconfig cache (#78 by @waywardmonkeys)
- Switched to
windows-rsfordwritebackend (#85 by @dfrg)
Fixed
Fontique
- Search correct paths for fonts on Apple platforms (#71 by @waywardmonkeys)
Removed
Fontique
- Breaking change: removed conversion to/from
icu_properties::Scriptforfontique::Script(#72 by @waywardmonkeys)- This can be restored by using the
icu_propertiesfeature offontique.
- This can be restored by using the
Full Changelog: v0.1.0...v0.2.0