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.
- package/README.md +47 -24
- package/dist/index.cjs +193 -63
- package/dist/index.d.ts +18 -1
- package/dist/index.js +193 -63
- package/dist/index.min.cjs +2 -2
- package/dist/index.min.js +2 -2
- package/dist/index.umd.js +193 -63
- package/dist/index.umd.min.js +2 -2
- package/dist/p5/index.cjs +4 -8
- package/dist/p5/index.js +4 -8
- package/dist/three/react.d.ts +11 -1
- package/dist/types/core/font/FontMetadata.d.ts +7 -0
- package/dist/types/core/font/constants.d.ts +10 -0
- package/dist/types/core/shaping/fontFeatures.d.ts +3 -0
- package/dist/types/core/types.d.ts +11 -1
- package/dist/types/utils/{DebugLogger.d.ts → Logger.d.ts} +2 -2
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -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
|
|
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
|
|
7
|
+
export declare const logger: Logger;
|
|
8
8
|
export {};
|