three-text 0.3.0 → 0.3.2
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 +5 -34
- package/dist/index.cjs +336 -112
- package/dist/index.d.ts +17 -1
- package/dist/index.js +336 -112
- package/dist/index.min.cjs +638 -592
- package/dist/index.min.js +623 -577
- package/dist/index.umd.js +336 -112
- package/dist/index.umd.min.js +619 -573
- package/dist/three/react.d.ts +0 -1
- package/dist/types/core/font/FontMetadata.d.ts +17 -0
- package/dist/types/core/types.d.ts +0 -1
- package/package.json +1 -1
- package/dist/types/utils/LRUCache.d.ts +0 -38
package/dist/index.d.ts
CHANGED
|
@@ -304,7 +304,6 @@ interface TextOptions {
|
|
|
304
304
|
geometryOptimization?: GeometryOptimizationOptions;
|
|
305
305
|
layout?: LayoutOptions;
|
|
306
306
|
color?: [number, number, number] | ColorOptions;
|
|
307
|
-
maxCacheSizeMB?: number;
|
|
308
307
|
}
|
|
309
308
|
interface HyphenationPatternsMap {
|
|
310
309
|
[language: string]: HyphenationTrieNode;
|
|
@@ -437,6 +436,15 @@ declare class Text {
|
|
|
437
436
|
|
|
438
437
|
declare const DEFAULT_CURVE_FIDELITY: CurveFidelityConfig;
|
|
439
438
|
|
|
439
|
+
interface FontDataExtraction {
|
|
440
|
+
metrics: ExtractedMetrics;
|
|
441
|
+
features: {
|
|
442
|
+
tags: string[];
|
|
443
|
+
names: {
|
|
444
|
+
[tag: string]: string;
|
|
445
|
+
};
|
|
446
|
+
} | undefined;
|
|
447
|
+
}
|
|
440
448
|
declare class FontMetadataExtractor {
|
|
441
449
|
static extractMetadata(fontBuffer: ArrayBuffer): ExtractedMetrics;
|
|
442
450
|
static extractFeatureTags(fontBuffer: ArrayBuffer): {
|
|
@@ -448,6 +456,14 @@ declare class FontMetadataExtractor {
|
|
|
448
456
|
private static extractFeatureDataFromTable;
|
|
449
457
|
private static extractAxisNames;
|
|
450
458
|
private static getNameFromNameTable;
|
|
459
|
+
static extractAll(fontBuffer: ArrayBuffer): FontDataExtraction;
|
|
460
|
+
private static buildNameIndex;
|
|
461
|
+
private static getNameFromIndex;
|
|
462
|
+
private static extractMetricsWithIndex;
|
|
463
|
+
private static extractAxisNamesWithIndex;
|
|
464
|
+
private static extractFeaturesWithIndex;
|
|
465
|
+
private static extractFeatureData;
|
|
466
|
+
private static tagToString;
|
|
451
467
|
static getVerticalMetrics(metrics: ExtractedMetrics): VerticalMetrics;
|
|
452
468
|
static getFontMetrics(metrics: ExtractedMetrics): FontMetrics;
|
|
453
469
|
}
|