@grida/canvas-wasm 0.0.58 → 0.0.60
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/dist/grida-canvas-wasm.js +1 -1
- package/dist/grida_canvas_wasm.wasm +0 -0
- package/dist/index.d.mts +5 -17
- package/dist/index.d.ts +5 -17
- package/dist/index.js +124 -139
- package/dist/index.mjs +124 -139
- package/package.json +1 -1
|
Binary file
|
package/dist/index.d.mts
CHANGED
|
@@ -23,7 +23,7 @@ declare namespace fonts {
|
|
|
23
23
|
tag: string;
|
|
24
24
|
name: string;
|
|
25
25
|
min: number;
|
|
26
|
-
|
|
26
|
+
def: number;
|
|
27
27
|
max: number;
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -79,16 +79,19 @@ declare namespace fonts {
|
|
|
79
79
|
width_class: number;
|
|
80
80
|
is_variable: boolean;
|
|
81
81
|
is_strict_italic: boolean;
|
|
82
|
-
axes
|
|
82
|
+
axes?: Record<string, FontAxis>;
|
|
83
83
|
instances?: Array<FontInstance>;
|
|
84
84
|
features: Array<FontFeature>;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
/** Font style instance for UI consumption */
|
|
88
88
|
export interface FontStyle {
|
|
89
|
+
face_id: string;
|
|
90
|
+
face_post_script_name: string;
|
|
89
91
|
name: string;
|
|
90
92
|
postscript_name: string | null;
|
|
91
93
|
italic: boolean;
|
|
94
|
+
weight: number;
|
|
92
95
|
}
|
|
93
96
|
|
|
94
97
|
/** Complete family-level analysis result for UI consumption */
|
|
@@ -187,14 +190,6 @@ declare namespace fonts {
|
|
|
187
190
|
* @param ptr - Pointer to memory allocated by a WASM function
|
|
188
191
|
*/
|
|
189
192
|
_grida_fonts_free(ptr: number): void;
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* Returns the version of the font parsing library.
|
|
193
|
-
* This is a ping function to verify the WASM module is working.
|
|
194
|
-
*
|
|
195
|
-
* @returns Version string
|
|
196
|
-
*/
|
|
197
|
-
_grida_fonts_version(): number;
|
|
198
193
|
}
|
|
199
194
|
}
|
|
200
195
|
|
|
@@ -269,13 +264,6 @@ declare class FontsAPI {
|
|
|
269
264
|
* @returns Promise resolving to FaceRecord
|
|
270
265
|
*/
|
|
271
266
|
parseFont(fontData: ArrayBuffer | Uint8Array, faceId: string, userFontStyleItalic?: boolean): Promise<fonts.types.FaceRecord>;
|
|
272
|
-
/**
|
|
273
|
-
* Gets the version of the font parsing library.
|
|
274
|
-
* This is a ping function to verify the WASM module is working.
|
|
275
|
-
*
|
|
276
|
-
* @returns Version string
|
|
277
|
-
*/
|
|
278
|
-
getVersion(): string;
|
|
279
267
|
}
|
|
280
268
|
|
|
281
269
|
declare class Scene {
|
package/dist/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ declare namespace fonts {
|
|
|
23
23
|
tag: string;
|
|
24
24
|
name: string;
|
|
25
25
|
min: number;
|
|
26
|
-
|
|
26
|
+
def: number;
|
|
27
27
|
max: number;
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -79,16 +79,19 @@ declare namespace fonts {
|
|
|
79
79
|
width_class: number;
|
|
80
80
|
is_variable: boolean;
|
|
81
81
|
is_strict_italic: boolean;
|
|
82
|
-
axes
|
|
82
|
+
axes?: Record<string, FontAxis>;
|
|
83
83
|
instances?: Array<FontInstance>;
|
|
84
84
|
features: Array<FontFeature>;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
/** Font style instance for UI consumption */
|
|
88
88
|
export interface FontStyle {
|
|
89
|
+
face_id: string;
|
|
90
|
+
face_post_script_name: string;
|
|
89
91
|
name: string;
|
|
90
92
|
postscript_name: string | null;
|
|
91
93
|
italic: boolean;
|
|
94
|
+
weight: number;
|
|
92
95
|
}
|
|
93
96
|
|
|
94
97
|
/** Complete family-level analysis result for UI consumption */
|
|
@@ -187,14 +190,6 @@ declare namespace fonts {
|
|
|
187
190
|
* @param ptr - Pointer to memory allocated by a WASM function
|
|
188
191
|
*/
|
|
189
192
|
_grida_fonts_free(ptr: number): void;
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* Returns the version of the font parsing library.
|
|
193
|
-
* This is a ping function to verify the WASM module is working.
|
|
194
|
-
*
|
|
195
|
-
* @returns Version string
|
|
196
|
-
*/
|
|
197
|
-
_grida_fonts_version(): number;
|
|
198
193
|
}
|
|
199
194
|
}
|
|
200
195
|
|
|
@@ -269,13 +264,6 @@ declare class FontsAPI {
|
|
|
269
264
|
* @returns Promise resolving to FaceRecord
|
|
270
265
|
*/
|
|
271
266
|
parseFont(fontData: ArrayBuffer | Uint8Array, faceId: string, userFontStyleItalic?: boolean): Promise<fonts.types.FaceRecord>;
|
|
272
|
-
/**
|
|
273
|
-
* Gets the version of the font parsing library.
|
|
274
|
-
* This is a ping function to verify the WASM module is working.
|
|
275
|
-
*
|
|
276
|
-
* @returns Version string
|
|
277
|
-
*/
|
|
278
|
-
getVersion(): string;
|
|
279
267
|
}
|
|
280
268
|
|
|
281
269
|
declare class Scene {
|