painbrush

1.0.21.1.0
src/typography.d.ts
+src/typography.d.tsNew file
+20
Index: package/src/typography.d.ts
===================================================================
--- package/src/typography.d.ts
+++ package/src/typography.d.ts
@@ -0,0 +1,20 @@
+import type { SingleChannelLayer } from "./layer.ts";
+import type { PackerCharactersWithTrim } from "../src-packer/_.js";
+export type FontHandle = Buffer<ArrayBuffer> | string | {
+    toString: () => string;
+} | PxFontFile;
+export type FontMetrics = {
+    height: number;
+    width: number;
+    spaces: number;
+};
+export type PxFontFile = {
+    alphabet: string;
+    characters: PackerCharactersWithTrim;
+    metrics: FontMetrics;
+};
+export interface Font {
+    getCharacter: (c: string) => SingleChannelLayer;
+}
+export declare const loadBuiltInFont: () => Promise<Font>;
+export declare const useFont: (handle: Promise<FontHandle>) => Promise<Font>;