All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Bugfix release plus a small feature for the site
- Fixed
text-align: startandtext-align: end - Right float adjacent to and after another right float wasn't positioned correctly
- Resizeable panes for the website so you can see text reflowing
Images are supported! <img> acts just like it does in the browser: natural ratios are known, they can be floated, positioned, inline, block, etc. JPEG, BMP, PNG, and GIF are supported, and images paint to every backend.
flow.loadno longer throws errors. Check thestatusorloadedpromise on the returnedFontFaces instead.
- Support for the
<img>element (JPEG, PNG, GIF, and BMP) flow.createObjectURLandflow.revokeObjectURLAPIs
zoomwasn't applied to length values of line-heightflow.layouttwice before paint could result in incorrect inline backgrounds
- More accurate text coordinates when containing blocks are positioned in subpixels
- Styles must now be passed through
flow.stylebefore being given toh. cascadeStyleshas been removed. Pass an array of styles tohinstead.- Removed
getRootStyle - paintToCanvas no longer has a density argument. Use the zoom CSS property instead.
- Changed the font registration API to match
document.fontsin web browsers. Instead ofregisterFont, importfontsandFontFace. See the README for more details. parseis now an individual file without the rest of the API. Changeimport * as flow from 'dropflow/with-parse.js'toimport * as flow from 'dropflow'andimport parse from 'dropflow/parse.js'- Replaced
loadNotoFontswithregisterNotoFonts. Callflow.loadon the document after the latter.
- Added support for the
zoomproperty - Support for multiple styles on an element
- Support for hardware pixel snapping (#16)
- Added
flow.FontFace,flow.fonts,flow.createFaceFromTables(see Changed above) - Added
unicodeRangetoFontFaceDescriptors - Added
flow.loadfor loading all fonts needed by a document - Added support for
@napi-rs/canvasandskia-canvasvia environments (see examples) - Exposed environment hooks so that dropflow's behavior can be customized (see updated README).
- RTL text-align issue in the SVG painter and base direction issue in the canvas painter (#27)
- Support for
overflow - Added CHANGELOG.md
tfunction to create text nodes (likehbut for text)
- Emojis that use a ZWJ sequence are now rendered correctly
- Minor memory leak in font selection
emunits only evaluate against the parent forfont-size- Strange font selection issue that picked bold or italic
- Memory leak in word cache
- Positioned > float > text could paint twice
- Relatively positioned block containers of text could paint twice
- Exported
cascadeStyles()andHTMLElement - Now uses
fetch()instead offsin Node, in case remote URLs were registered
- API to scan documents and load Noto fonts from FontSource to cover the document
- Support for
overflow-wrap(word-break) - Support for outputting SVG
- Never try to register fonts twice
- Infinite loop with two nested floats
- Intrinsicly sized content could sometimes wrap even though it was sized not to wrap
- Exposed APIs for querying the DOM and types for painting into areas on top of it
- Allow strings to be passed to
dom()
First release! CSS 2 inline layout is complete: floats, inline-blocks, bidi, alignment, etc. Paint to canvas and HTML.