Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@cprecioso/canvas-text-layout

cprecioso9MIT2.0.0TypeScript support: included

A mini text layout engine for canvas

canvas, text, layout, multiline

readme

@cprecioso/canvas-text-layout

A homebrewed library to layout text in a canvas. It can split text into lines, align them, and place them in a containing box, respecting alignment, and more.

$ yarn add @cprecioso/canvas-text-layout    # if you use yarn
$ npm install @cprecioso/canvas-text-layout # if you use npm

Check out the API documentation for more information.

changelog

Changelog

2.0.0 (2024-02-12)

⚠ BREAKING CHANGES

  • reorganize exports
  • reorganize code
  • make layoutLine code easier to follow

Features

  • make layoutLine code easier to follow (519268c)
  • reorganize exports (50b5b78)

Bug Fixes

  • move lazy to its own package (144cf16)

Code Refactoring