Releases: kas-gui/kas-text
Releases · kas-gui/kas-text
0.8.1
0.8.0
Change log
- Remove
rastermodule (#91) - Removed
FontLibrary::initandText::configure(#94) - Remove support for
harfbuzz_rsandfontdue(#95) - Remove trait
EditableText(#98) - Replace
fontdbwithfontique, replacing usage of hard-coded font families and removing configuration of font aliases (#93, #94) - Revise
FontSelectortype: make into a smallCopytype and embed inTextobjects. Replaces usage of pre-resolvedFontId, allowing font selection to be delayed until run-breaking and to use inferred script. (#94) - Replace field
Effect::auxwithEffect::e(#99) - Support Swash in font library (#91) and use for text analysis (#94)
- Support font synthesis (#95)
- Add
GlyphRuntype, replacing fnsText{,Display}::glyphs{,_with_effects}withruns(#96, #99) - Add fn
TextDisplay::apply_offset(#98, #100) - Fix behaviour of
Align::Stretchin some cases (#100)
PRs
- Add Swash to font store & make accessible; remove raster module by @dhardy in #91
- Switch from fontdb to fontique by @dhardy in #93
- Switch to Fontique + Swash by @dhardy in #94
- Support font synthesis; remove deps harfbuzz-rs & fontdue; update deps by @dhardy in #95
- Expose positioned glyphs by run by @dhardy in #96
- Remove trait EditableText, add fn apply_offset, misc by @dhardy in #98
- Replace Effect::aux with e; merge fns runs, runs_with_effects by @dhardy in #99
- Fix offset of line bounds and behaviour of Align::Stretch by @dhardy in #100
- Prepare version 0.8.0 by @dhardy in #101
0.7.0
What's Changed
- Add
Direction::AutoRtl,text_is_rtl(#80) - Set the default font size to 16px (#80)
TextAPI: do not exposeprepare_runs,required_action(#81); more tweaks (#84)- Move status tracking and
Envfields intoText(#82) - Remove
TextApi,TextApiExtandEditableTextApitraits (#85) - Revise
fontsmodule: renameselector::DatabasetoResolver, separate outfontdb::Database, reviseinit(#87, #88) - Bump MSRV to 1.80.0 (#87)
Full Changelog: 0.6.0...0.7.0
0.6.0
0.5.0
Error handling (#65):
- Add
NotReadyerror type - Most methods now return
Result<T, NotReady>instead of panicking
Text environment (#68):
- Remove
UpdateEnvtype - Rename
Text::newtonew_env,Text::new_multitoText::newand
removeText::new_single. Note: in usage, theEnvironment::wrapflag
is usually set anyway. Environmentis nowCopyText::envreturnsEnvironmentby copy not referenceText::env_mutreplaced withText::set_env, which sets required actionsEnvironment::dirrenamed todirection- Enum
Directionadjusted to include bidi and non-bidi modes. Environment::flagsand its typeEnvFlagsremoved.
Environment::wrap: booladded andDirectionadjusted (see above).
PX_PALIGNoption removed (behaviour is now always enabled).- Parameters
dppandpt_sizeofEnvironment,TextDisplay::prepare_runs
andFormattableText::font_tokensare replaced with the singledpem.
Text preparation:
- Add
Action::VAlignrequiring onlyTextDisplay::vertically_alignaction - Remove
TextDisplay::prepare(butTextApi::prepareremains) TextDisplay::resize_runsis no longer a public methodTextDisplay::prepare_runsmay callresize_runsautomatically depending
on preparation status- Remove
TextApi::resize_runsandTextApi::prepare_lines - All
TextApiandTextApiExtmethods doing any preparation now do all
required preparation, and avoid unnecessary steps.
Text measurements (#68):
- Add
TextDisplay::bounding_boxandTextApiExt::bounding_box(#68, #69) - Add
TextDisplay::measure_widthandTextDisplay::vertically_align - Add
TextApi::measure_widthandTextApi::measure_height - Remove
TextDisplay::line_is_ltrandTextApiExt::line_is_ltr - Add
TextApiExt::text_is_rtl TextDisplay::line_is_rtlandTextApiExt::line_is_rtlnow return type
Result<Option<bool>, NotReady>, returningOk(None)if text is emptyTextDisplay::prepare_linesreturns the bottom-right corner of the bounding
box around content instead of the size of content.
Font fallback:
FontLibrary::face_for_charandface_for_char_or_firsttake an extra
parameter:last_face_id: Option<FaceId>. This allows the font fallback
mechanism to avoid switching the font unnecessarily. In usage, letters and
numbers are selected as before while other characters are selected from the
last font face used if possible, resulting in longer runs being passed to
the shaper when using fallback fonts.
Misc:
- CI: test stable and check Clippy lints (#69).
- Add
Range::is_empty - Add
num_glyphsfeature flag (#69) - Memory optimisations for
TextDisplay: removeline_runs(#71) - Replace
highlight_lineswithhighlight_range(#72) - Add
fonts::any_loaded(#73)
Fixes:
- Do not add "line gap" before first line. (In practice this is often 0 anyway.)
- Do not vertically align text too tall for the input bounds.
- Markdown formatter: use heading level sizes as defined by CSS
- Fix position of text highlights on vertically aligned text (#67).
- Fix
r_boundfor trailing space (#71)