Releases: linebender/parley
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_extension
andPlainEditorDriver::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
icu4x
dependencies to v2.x. (#418 by @nicoburns) - Added an
unregister_font
method to remove a font from a collection. (#395 by @taj-p)
Changed
Parley
- Breaking change:
Alignment
variants have been renamed to better match CSS.Alignment::Justified
is nowAlignment::Justify
andAlignment::Middle
is nowAlignment::Center
. (#389 by @waywardmonkeys) - In the
PlainEditor
, triple-click now selects paragraphs rather than words (#381 by @DJMcNab) - Updated to
accesskit
0.21. (#390 by @mwcampbell) - Uses
HarfRust
for text shaping. (#400 by @taj-p) - Parley no longer depends on
peniko
orkurbo
. (#414 by @nicoburns):- Breaking change: The use of
peniko::Font
has been replaced withlinebender_resource_handle::FontData
, as suchparley::Font
is 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::Rect
has been replaced with a newparley::BoundingBox
type.
- 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::Blob
has 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_widths
have been replaced withLayout::calculate_content_widths
, which does not internally cache the widths. This means thatLayout
is nowSync
again, but callers will have to cache the min and max content widths themselves. (#353 by @valadaptive) - Breaking change: the line height style property (
StyleProperty::LineHeight
and theline_height
field onTextStyle
) is now aLineHeight
enum 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
WordBreak
andOverflowWrap
style properties for controlling line wrapping. (#315 by @valadaptive) PlainEditor
methodsraw_selection
andraw_text
. (#316, #317 by @mwcampbell)PlainEditor::selection_geometry_with
, the equivalent ofSelection::geometry_with
method. (#318 by @valadaptive)BreakLines::is_done
method 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_geometry
now include the line indices that the selection rectangles belong to. (#318 by @valadaptive) - Updated to
accesskit
0.19. (#294 by @waywardmonkeys, #348 by @xStrom) - Now displaying selected newlines as whitespace in the selection highlight. (#296 by @valadaptive)
- Made
BreakReason
public. (#300 by @valadaptive)
Fontique
- Breaking change:
Collection::register_fonts
now takes aBlob<u8>
instead of aVec<u8>
. (#306 by @valadaptive) - Breaking change:
Collection::register_fonts
now 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::align
on 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 ParleySelection
andCursor
(#126 by @xorgy)- Tree style builder (#76 by @nicoburns)
- Conversions for
FontFamily
,FontStack
, andStyleProperty
to 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 aGenericFamily
orFontStack
directly. (#129 by @xorgy)
Fontique
- Removed unsafe code from fontconfig cache (#78 by @waywardmonkeys)
- Switched to
windows-rs
fordwrite
backend (#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::Script
forfontique::Script
(#72 by @waywardmonkeys)- This can be restored by using the
icu_properties
feature offontique
.
- This can be restored by using the
Full Changelog: v0.1.0...v0.2.0