three-text 0.2.4 → 0.2.6

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.
@@ -3,3 +3,13 @@ export declare const FONT_SIGNATURE_OPEN_TYPE_CFF = 1330926671;
3
3
  export declare const FONT_SIGNATURE_TRUE_TYPE_COLLECTION = 1953784678;
4
4
  export declare const FONT_SIGNATURE_WOFF = 2001684038;
5
5
  export declare const FONT_SIGNATURE_WOFF2 = 2001684018;
6
+ export declare const TABLE_TAG_HEAD = 1751474532;
7
+ export declare const TABLE_TAG_HHEA = 1751672161;
8
+ export declare const TABLE_TAG_OS2 = 1330851634;
9
+ export declare const TABLE_TAG_FVAR = 1719034226;
10
+ export declare const TABLE_TAG_STAT = 1398030676;
11
+ export declare const TABLE_TAG_NAME = 1851878757;
12
+ export declare const TABLE_TAG_CFF = 1128678944;
13
+ export declare const TABLE_TAG_CFF2 = 1128678962;
14
+ export declare const TABLE_TAG_GSUB = 1196643650;
15
+ export declare const TABLE_TAG_GPOS = 1196445523;
@@ -0,0 +1,3 @@
1
+ export declare function convertFontFeaturesToString(features?: {
2
+ [tag: string]: boolean | number;
3
+ }): string | undefined;
@@ -65,10 +65,17 @@ export interface LoadedFont {
65
65
  fontVariations?: {
66
66
  [key: string]: number;
67
67
  };
68
+ fontFeatures?: {
69
+ [tag: string]: boolean | number;
70
+ };
68
71
  isVariable?: boolean;
69
72
  variationAxes?: {
70
73
  [key: string]: VariationAxis;
71
74
  };
75
+ availableFeatures?: string[];
76
+ featureNames?: {
77
+ [tag: string]: string;
78
+ };
72
79
  _buffer?: ArrayBuffer;
73
80
  }
74
81
  export interface HarfBuzzModule {
@@ -87,7 +94,7 @@ export interface HarfBuzzAPI {
87
94
  createFace: (blob: HarfBuzzBlob, index: number) => HarfBuzzFace;
88
95
  createFont: (face: HarfBuzzFace) => HarfBuzzFont;
89
96
  createBuffer: () => HarfBuzzBuffer;
90
- shape: (font: HarfBuzzFont, buffer: HarfBuzzBuffer) => void;
97
+ shape: (font: HarfBuzzFont, buffer: HarfBuzzBuffer, features?: string) => void;
91
98
  }
92
99
  export interface HarfBuzzBlob {
93
100
  destroy: () => void;
@@ -270,6 +277,9 @@ export interface TextOptions {
270
277
  fontVariations?: {
271
278
  [key: string]: number;
272
279
  };
280
+ fontFeatures?: {
281
+ [tag: string]: boolean | number;
282
+ };
273
283
  maxTextLength?: number;
274
284
  removeOverlaps?: boolean;
275
285
  curveFidelity?: CurveFidelityConfig;
@@ -1,8 +1,8 @@
1
1
  export declare const isLogEnabled: boolean;
2
- declare class DebugLogger {
2
+ declare class Logger {
3
3
  warn(message: string, ...args: any[]): void;
4
4
  error(message: string, ...args: any[]): void;
5
5
  log(message: string, ...args: any[]): void;
6
6
  }
7
- export declare const debugLogger: DebugLogger;
7
+ export declare const logger: Logger;
8
8
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "three-text",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "3D font rendering and text layout engine for the web",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",