Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Releases: pixijs-userland/html-text

v3.3.1

21 Feb 17:03
Compare
Choose a tag to compare

πŸ› Fixed

  • Fix flicker between image updates (#42)

v3.3.0

08 Jan 02:53
Compare
Choose a tag to compare

🎁 Added

  • Create mjs output for browsers (#39)

🧹 Chores

  • Chore: Convert toolchain to extension-scripts (#39)

v3.2.1

03 Jan 20:10
Compare
Choose a tag to compare

πŸ› Fixed

  • Fix: Remove the usage of ShadowRoot (#36)

v3.2.0

21 Dec 19:43
Compare
Choose a tag to compare

πŸ› Fixed

  • Fixes the flicker when re-rendering
  • Don't use HTMLCanvasElement internally, use HTMLImageElement directly. Not only is this more performant, but uses less memory as well.
  • Remove Safari hack when rendering drop-shadow. This was only an issue when rendering SVG to canvas.

🚽 Deprecated

  • Drop support for trim, lineJoin and leading since these are not supported/working
  • Deprecate the canvas property, use source instead

🧹 Chores

  • Documented the defaultStyleOptions

v3.1.1

16 Dec 14:06
Compare
Choose a tag to compare

πŸ› Fixed

v3.1.0

15 Dec 21:38
Compare
Choose a tag to compare

🎁 Added

Loading Custom Fonts (#30)

Allows the use of non-web fonts by loading the fonts.

const text = new HTMLText("Hello <b>World</b>", { fontFamily: 'Custom' });

await Promise.all([
    text.style.loadFont('./path/to/custom-regular.ttf', { family: 'Custom' }),
    text.style.loadFont('./path/to/custom-bold.ttf', { family: 'Custom', weight: 'bold' });
]);

CSS Overrides

Allows settings CSS styles that are not built-in by default.

const text = new HTMLText('Hello World');

text.style.addOverride(
  'background-color: blue',
  'writing-mode: vertical-rl'
);

Global CSS Rules

Setting global rules is now easy using the stylesheet property.

const text = new HTMLText('Hello World');

text.style.stylesheet = `b { color: red }`;

measureText API (#31)

New measureText method which can be used similar to PixiJS' TextMetrics.measureText method. This returns a width and height of the bounds of your text. This method doesn't impact PixiJS rendering so it is therefore faster when attempting to do things like fit text. By default, it uses the built in text, style and resolution, but these things can be overridden.

const text = new HTMLText('Hello world!');
const { width, height } = text.measureText();

πŸ› Fixed

  • Fix Safari layout issue (#29) @littleboarx
  • Fixes cross-browser issues (#30) @bigtimebuddy
    • Safari flips the Y-axis when using text-shadow
    • More consistent to scale style values with resolution than use context.scale when drawing image

🧹 Chores

v3.0.3

04 Nov 11:22
Compare
Choose a tag to compare

πŸ› Fixed

  • Fix wordWrap: max-width instead of width for HTML element (0e66d32)

v2.1.3

04 Nov 11:26
Compare
Choose a tag to compare

πŸ› Fixed

  • Fix wordWrap: max-width instead of width for HTML element (6744080)

v3.0.2

06 Oct 16:19
Compare
Choose a tag to compare

πŸ› Fixed

v2.1.2

06 Oct 16:26
Compare
Choose a tag to compare

πŸ› Fixed