Skip to content

pixi-cjk is a plugin for Pixi.js to display the Chinese/Japanese/Korean correctly

License

Notifications You must be signed in to change notification settings

huang-yuwei/pixi-cjk

Repository files navigation

PIXI CJK

pixi-cjk is a plugin for Pixi.js to display the Chinese/Japanese/Korean correctly

Features

  • prevent illegal break-lines in CJK (which also called kinsoku-shori)
  • prevent unneeded breaking space when follwoing by CJK character

Setup

npm install pixi-cjk

Usage

Apply the Text style with breakWords: true, then improt the plugin. It should cover the CJK styling for you.

import 'pixi-cjk';

How it works

Example

before-after