Releases: chearon/dropflow
Releases · chearon/dropflow
v0.6.1
v0.6.0
0.6.0
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.
Changed
flow.loadno longer throws errors. Check thestatusorloadedpromise on the returnedFontFaces instead.
Added
- Support for the
<img>element (JPEG, PNG, GIF, and BMP) flow.createObjectURLandflow.revokeObjectURLAPIs
Fixed
zoomwasn't applied to length values of line-heightflow.layouttwice before paint could result in incorrect inline backgrounds
v0.5.1
v0.5.0
Changed
- 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
- 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).