@grida/canvas-wasm 0.0.45 → 0.0.47

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.
Binary file
package/dist/index.d.mts CHANGED
@@ -93,6 +93,9 @@ declare namespace createGridaCanvas {
93
93
  data_ptr: number,
94
94
  data_len: number
95
95
  ): void;
96
+ _has_missing_fonts(state: GridaCanvasWebGlApplicationPtr): boolean;
97
+ _list_missing_fonts(state: GridaCanvasWebGlApplicationPtr): Ptr;
98
+ _list_available_fonts(state: GridaCanvasWebGlApplicationPtr): Ptr;
96
99
  _set_main_camera_transform(
97
100
  state: GridaCanvasWebGlApplicationPtr,
98
101
  a: number,
@@ -222,6 +225,9 @@ type ExportAsImage = {
222
225
  format: "PNG" | "JPEG" | "WEBP" | "BMP";
223
226
  constraints: ExportConstraints;
224
227
  };
228
+ type FontKey = {
229
+ family: string;
230
+ };
225
231
  type VectorNetworkVertex = Vector2;
226
232
  type VectorNetworkSegment = {
227
233
  a: number;
@@ -276,6 +282,9 @@ declare class Grida2D {
276
282
  * @param data - Raw font file bytes (e.g. TTF/OTF).
277
283
  */
278
284
  registerFont(family: string, data: Uint8Array): void;
285
+ hasMissingFonts(): boolean;
286
+ listMissingFonts(): FontKey[];
287
+ listAvailableFonts(): FontKey[];
279
288
  /**
280
289
  * Tick the application clock.
281
290
  * bind this to requestAnimationFrame loop or similar
@@ -344,4 +353,4 @@ declare class Grida2D {
344
353
  devtools_rendering_set_show_ruler(show: boolean): void;
345
354
  }
346
355
 
347
- export { Grida2D, type GridaCanvasModuleInitOptions, init as default };
356
+ export { type FontKey, Grida2D, type GridaCanvasModuleInitOptions, init as default };
package/dist/index.d.ts CHANGED
@@ -93,6 +93,9 @@ declare namespace createGridaCanvas {
93
93
  data_ptr: number,
94
94
  data_len: number
95
95
  ): void;
96
+ _has_missing_fonts(state: GridaCanvasWebGlApplicationPtr): boolean;
97
+ _list_missing_fonts(state: GridaCanvasWebGlApplicationPtr): Ptr;
98
+ _list_available_fonts(state: GridaCanvasWebGlApplicationPtr): Ptr;
96
99
  _set_main_camera_transform(
97
100
  state: GridaCanvasWebGlApplicationPtr,
98
101
  a: number,
@@ -222,6 +225,9 @@ type ExportAsImage = {
222
225
  format: "PNG" | "JPEG" | "WEBP" | "BMP";
223
226
  constraints: ExportConstraints;
224
227
  };
228
+ type FontKey = {
229
+ family: string;
230
+ };
225
231
  type VectorNetworkVertex = Vector2;
226
232
  type VectorNetworkSegment = {
227
233
  a: number;
@@ -276,6 +282,9 @@ declare class Grida2D {
276
282
  * @param data - Raw font file bytes (e.g. TTF/OTF).
277
283
  */
278
284
  registerFont(family: string, data: Uint8Array): void;
285
+ hasMissingFonts(): boolean;
286
+ listMissingFonts(): FontKey[];
287
+ listAvailableFonts(): FontKey[];
279
288
  /**
280
289
  * Tick the application clock.
281
290
  * bind this to requestAnimationFrame loop or similar
@@ -344,4 +353,4 @@ declare class Grida2D {
344
353
  devtools_rendering_set_show_ruler(show: boolean): void;
345
354
  }
346
355
 
347
- export { Grida2D, type GridaCanvasModuleInitOptions, init as default };
356
+ export { type FontKey, Grida2D, type GridaCanvasModuleInitOptions, init as default };