text-shaper 0.1.17 → 0.1.18
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/index.js +4 -4
- package/dist/raster/types.d.ts +11 -0
- package/package.json +1 -1
- package/dist/index.js.map +0 -143
package/dist/raster/types.d.ts
CHANGED
|
@@ -23,6 +23,13 @@ export declare enum PixelMode {
|
|
|
23
23
|
* - "height": fontSize is treated as ascender-descender-lineGap height
|
|
24
24
|
*/
|
|
25
25
|
export type FontSizeMode = "em" | "height";
|
|
26
|
+
/**
|
|
27
|
+
* Hinting target mode for TrueType interpreter behavior
|
|
28
|
+
* - "auto": keep current behavior based on pixel mode
|
|
29
|
+
* - "light": force light/subpixel-style hinting behavior
|
|
30
|
+
* - "normal": force normal/full hinting behavior
|
|
31
|
+
*/
|
|
32
|
+
export type HintTarget = "auto" | "light" | "normal";
|
|
26
33
|
/**
|
|
27
34
|
* Options for rasterizing a glyph from a font
|
|
28
35
|
*/
|
|
@@ -33,6 +40,8 @@ export interface GlyphRasterizeOptions {
|
|
|
33
40
|
padding?: number;
|
|
34
41
|
/** Use TrueType hinting if available */
|
|
35
42
|
hinting?: boolean;
|
|
43
|
+
/** Hinting target mode (default: "auto") */
|
|
44
|
+
hintTarget?: HintTarget;
|
|
36
45
|
/** Interpret fontSize as em or full height */
|
|
37
46
|
sizeMode?: FontSizeMode;
|
|
38
47
|
}
|
|
@@ -191,6 +200,8 @@ export interface AtlasOptions {
|
|
|
191
200
|
pixelMode?: PixelMode;
|
|
192
201
|
/** Enable hinting */
|
|
193
202
|
hinting?: boolean;
|
|
203
|
+
/** Hinting target mode (default: "auto") */
|
|
204
|
+
hintTarget?: HintTarget;
|
|
194
205
|
}
|
|
195
206
|
/**
|
|
196
207
|
* Options for building an MSDF atlas
|