text-shaper 0.1.18 → 0.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,5 @@
1
1
  /**
2
- * Context lookup tables for Brotli decompression
3
- * Based on brotli.js reference implementation (Apache 2.0 License)
2
+ * Context lookup tables for Brotli decompression.
4
3
  */
5
4
  export declare const CONTEXT_LOOKUP: Uint8Array<ArrayBuffer>;
6
5
  export declare const CONTEXT_LOOKUP_OFFSETS: Uint16Array<ArrayBuffer>;
@@ -1,7 +1,5 @@
1
1
  /**
2
- * Pure TypeScript Brotli Decompressor
3
- * Based on the brotli.js reference implementation (MIT License)
4
- * https://github.com/devongovett/brotli.js
2
+ * Pure TypeScript Brotli decompressor.
5
3
  */
6
4
  interface HuffmanCode {
7
5
  bits: number;
@@ -10,13 +8,14 @@ interface HuffmanCode {
10
8
  declare class BitReader {
11
9
  private data;
12
10
  private buf;
11
+ private bufPtr;
13
12
  private pos;
13
+ private inputPos;
14
14
  private val;
15
15
  private bitPos;
16
16
  private bitEndPos;
17
17
  private eos;
18
18
  constructor(data: Uint8Array);
19
- private fillBuffer;
20
19
  readMoreInput(): void;
21
20
  fillBitWindow(): void;
22
21
  readBits(n: number): number;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Brotli static dictionary bytes.
3
+ */
4
+ export declare const DICTIONARY_DATA: Uint8Array<ArrayBuffer>;
@@ -1,8 +1,5 @@
1
1
  /**
2
- * Brotli static dictionary
3
- * Based on brotli.js reference implementation (Apache 2.0 License)
4
- *
5
- * The dictionary is loaded lazily to avoid bloating the initial bundle.
2
+ * Brotli static dictionary.
6
3
  */
7
4
  export declare const DICTIONARY_OFFSETS_BY_LENGTH: Uint32Array<ArrayBuffer>;
8
5
  export declare const DICTIONARY_SIZE_BITS_BY_LENGTH: Uint8Array<ArrayBuffer>;
@@ -1,6 +1,5 @@
1
1
  /**
2
- * Dictionary word transformations for Brotli decompression
3
- * Based on brotli.js reference implementation (Apache 2.0 License)
2
+ * Dictionary word transformations for Brotli decompression.
4
3
  */
5
4
  interface Transform {
6
5
  prefix: Uint8Array;
@@ -1,5 +1,5 @@
1
1
  import type { GlyphId, int16, uint16 } from "../../types.ts";
2
- import type { Reader } from "../binary/reader.ts";
2
+ import { Reader } from "../binary/reader.ts";
3
3
  /**
4
4
  * Glyph Variations table (gvar)
5
5
  * Contains variation data for TrueType glyph outlines
@@ -44,7 +44,7 @@ export interface PointDelta {
44
44
  * @param _numGlyphs - Number of glyphs (currently unused)
45
45
  * @returns Parsed gvar table with per-glyph variation data
46
46
  */
47
- export declare function parseGvar(reader: Reader, _numGlyphs: number): GvarTable;
47
+ export declare function parseGvar(reader: Reader, _numGlyphs: number, getGlyphPointCount?: (glyphId: GlyphId) => number): GvarTable;
48
48
  /**
49
49
  * Parse packed deltas
50
50
  */
package/dist/index.d.ts CHANGED
@@ -105,7 +105,7 @@ export { adaptiveBlur, cascadeBlur, fastGaussianBlur, } from "./raster/cascade-b
105
105
  export { type ColorStop as GradientColorStop, createGradientBitmap, type Gradient, interpolateGradient, type LinearGradient, type RadialGradient, rasterizePathWithGradient, } from "./raster/gradient.ts";
106
106
  export { LCD_FILTER_DEFAULT, LCD_FILTER_LEGACY, LCD_FILTER_LIGHT, lcdToRGBA, LcdMode, rasterizeLcd, } from "./raster/lcd-filter.ts";
107
107
  export { assignEdgeColors, buildMsdfAsciiAtlas, buildMsdfAtlas, buildMsdfStringAtlas, type MsdfEdge, type MsdfOptions, median, msdfAtlasToRGB, msdfAtlasToRGBA, type Point as MsdfPoint, renderMsdf, type SignedDistanceResult, signedDistanceToCubic, signedDistanceToLine, signedDistanceToQuadratic, } from "./raster/msdf.ts";
108
- export { bitmapToGray, bitmapToRGBA, rasterizeGlyph, rasterizeGlyphWithTransform, rasterizePath, rasterizeText, } from "./raster/rasterize.ts";
108
+ export { bitmapToGray, bitmapToRGBA, rasterizeGlyph, rasterizeGlyphWithVariation, rasterizeGlyphWithTransform, rasterizePath, rasterizeText, } from "./raster/rasterize.ts";
109
109
  export { renderSdf, type SdfOptions } from "./raster/sdf.ts";
110
110
  export { type LineCap, type LineJoin, type StrokerOptions, strokePath, } from "./raster/stroker.ts";
111
111
  export { condensePath, emboldenPath, obliquePath } from "./raster/synth.ts";