three-text 0.3.1 → 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/dist/index.cjs +335 -107
- package/dist/index.d.ts +17 -0
- package/dist/index.js +335 -107
- package/dist/index.min.cjs +619 -572
- package/dist/index.min.js +623 -576
- package/dist/index.umd.js +335 -107
- package/dist/index.umd.min.js +599 -552
- package/dist/types/core/font/FontMetadata.d.ts +17 -0
- package/package.json +1 -1
- package/dist/types/utils/LRUCache.d.ts +0 -38
package/dist/index.d.ts
CHANGED
|
@@ -436,6 +436,15 @@ declare class Text {
|
|
|
436
436
|
|
|
437
437
|
declare const DEFAULT_CURVE_FIDELITY: CurveFidelityConfig;
|
|
438
438
|
|
|
439
|
+
interface FontDataExtraction {
|
|
440
|
+
metrics: ExtractedMetrics;
|
|
441
|
+
features: {
|
|
442
|
+
tags: string[];
|
|
443
|
+
names: {
|
|
444
|
+
[tag: string]: string;
|
|
445
|
+
};
|
|
446
|
+
} | undefined;
|
|
447
|
+
}
|
|
439
448
|
declare class FontMetadataExtractor {
|
|
440
449
|
static extractMetadata(fontBuffer: ArrayBuffer): ExtractedMetrics;
|
|
441
450
|
static extractFeatureTags(fontBuffer: ArrayBuffer): {
|
|
@@ -447,6 +456,14 @@ declare class FontMetadataExtractor {
|
|
|
447
456
|
private static extractFeatureDataFromTable;
|
|
448
457
|
private static extractAxisNames;
|
|
449
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;
|
|
450
467
|
static getVerticalMetrics(metrics: ExtractedMetrics): VerticalMetrics;
|
|
451
468
|
static getFontMetrics(metrics: ExtractedMetrics): FontMetrics;
|
|
452
469
|
}
|