Skip to content

v0.5.0

Choose a tag to compare

@chearon chearon released this 11 Apr 00:37
· 181 commits to master since this release

Changed

  • Styles must now be passed through flow.style before being given to h.
  • cascadeStyles has been removed. Pass an array of styles to h instead.
  • Removed getRootStyle
  • paintToCanvas no longer has a density argument. Use the zoom CSS property instead.
  • Changed the font registration API to match document.fonts in web browsers. Instead of registerFont, import fonts and FontFace. See the README for more details.
  • parse is now an individual file without the rest of the API. Change import * as flow from 'dropflow/with-parse.js' to import * as flow from 'dropflow' and import parse from 'dropflow/parse.js'
  • Replaced loadNotoFonts with registerNotoFonts. Call flow.load on the document after the latter.

Added

  • Added support for the zoom property
  • Support for multiple styles on an element
  • Support for hardware pixel snapping (#16)
  • Added flow.FontFace, flow.fonts, flow.createFaceFromTables (see Changed above)
  • Added unicodeRange to FontFaceDescriptors
  • Added flow.load for loading all fonts needed by a document
  • Added support for @napi-rs/canvas and skia-canvas via environments (see examples)
  • Exposed environment hooks so that dropflow's behavior can be customized (see updated README).