- Changed the package format from CommonJS (CJS) only to a dual package supporting both CommonJS and ES Modules (ESM).
- Gothic glyphs now support stroke type 4 (otsu-curve as in 乙) and 6 (complex curve).
- Gothic glyphs now support reflection and rotation operations.
- Return type of
[Symbol.iterator]
method of Polygons
is now an Iterator<Polygon>
(previously IterableIterator<Polygon>
).
- Return type of
[Symbol.iterator]
method of Polygon
is now an Iterator<Readonly<Point>>
(previously Iterator<Point>
).
- Fixed the bug that gothic glyphs sometimes lack left hooks or upward hooks.
- Improved compatibility with the original engine for non-standard head or tail stroke types.
- Added TSDoc to the public APIs in the type definition files (
lib/*.d.ts
). Internal methods are now marked @internal
.
- Fixed incompatibility with the original engine in some edge cases.
- Fixed the type definition of
Polygons.generateSVG(curve)
: its parameter is now optional (defaults to false
).
- Fixed the type definition of
Kage.kFont
so that the font parameters (kage.kFont.kMinWidthU
etc.) are correctly typed.
- Added support for new head stroke type 27 (roofed narrow as in right-top corner of 乁).
- Added font parameter
kMinWidthU
, which controls the size of uroko (open end of horizontal stroke).
- Changed tail width of
2:x:4
strokes where x ≥ 1000.
- Fixed the problem of top-left corner turning over under some conditions.
- Fixed routine of checking for crossing with otsu strokes.
- Added
Buhin
to exported members of entry point.
Polygons
and Buhin
are accessible as Kage
's static properties.
- The script for use in browser environment is now included in the tarball.
- Font parameters are moved from
Kage
to Kage.kFont
.
const kage = new Kage();
-kage.kMinWidthY = 3;
-kage.kMinWidthT = 8;
+kage.kFont.kMinWidthY = 3;
+kage.kFont.kMinWidthT = 8;
// ... the same goes for other parameters ...
- Assigning a value to
Kage.kShotai
now resets all font parameters to the default values. Set Kage.kShotai
before modifying any font parameter.
- Passing size as a parameter to
Kage
constructor is now deprecated. Use Kage.kFont.setSize(size)
instead.
-const kage = new Kage(1);
+const kage = new Kage();
+kage.kFont.setSize(1);
- Improved compatibility with the original engine for glyphs using reflect and/or rotate operations.
- Fixed vertical reflection (
0:97
).
Kage.makeGlyphSeparated
now supports reflect and rotate operations.
- Added
Kage.makeGlyphSeparated
.