@nativescript/font-manager 1.0.0
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/LICENSE +201 -0
- package/README.md +13 -0
- package/font-face-set.android.d.ts +34 -0
- package/font-face-set.android.js +151 -0
- package/font-face-set.android.js.map +1 -0
- package/font-face-set.ios.d.ts +34 -0
- package/font-face-set.ios.js +137 -0
- package/font-face-set.ios.js.map +1 -0
- package/font-face.android.d.ts +64 -0
- package/font-face.android.js +256 -0
- package/font-face.android.js.map +1 -0
- package/font-face.ios.d.ts +64 -0
- package/font-face.ios.js +264 -0
- package/font-face.ios.js.map +1 -0
- package/index.d.ts +2 -0
- package/index.js +3 -0
- package/index.js.map +1 -0
- package/nativescript.config.d.ts +3 -0
- package/nativescript.config.js +13 -0
- package/nativescript.config.js.map +1 -0
- package/package.json +35 -0
- package/platforms/android/include.gradle +3 -0
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { knownFolders, Utils } from '@nativescript/core';
|
|
2
|
+
const url_ex = /url\(([^)]+?)\.(woff2?|ttf|otf|eot)\)/;
|
|
3
|
+
export function loadFontsFromCSS(url) {
|
|
4
|
+
return new Promise((resolve, reject) => {
|
|
5
|
+
const cb = new kotlin.jvm.functions.Function2({
|
|
6
|
+
invoke(fonts, error) {
|
|
7
|
+
const count = fonts.size();
|
|
8
|
+
const ret = new Array(count);
|
|
9
|
+
if (error) {
|
|
10
|
+
reject(error);
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
for (let i = 0; i < count; i++) {
|
|
14
|
+
ret[i] = FontFace.fromNative(fonts.get(i));
|
|
15
|
+
}
|
|
16
|
+
resolve(ret);
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
org.nativescript.fontmanager.FontFace.importFromRemote(Utils.android.getApplicationContext(), url, false, cb);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
export function importFontsFromCSS(url) {
|
|
24
|
+
return new Promise((resolve, reject) => {
|
|
25
|
+
const cb = new kotlin.jvm.functions.Function2({
|
|
26
|
+
invoke(fonts, error) {
|
|
27
|
+
const count = fonts.size();
|
|
28
|
+
const ret = new Array(count);
|
|
29
|
+
if (error) {
|
|
30
|
+
reject(error);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
for (let i = 0; i < count; i++) {
|
|
34
|
+
const font = fonts.get(i);
|
|
35
|
+
ret[i] = FontFace.fromNative(font);
|
|
36
|
+
}
|
|
37
|
+
resolve(ret);
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
org.nativescript.fontmanager.FontFace.importFromRemote(Utils.android.getApplicationContext(), url, true, cb);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
const ctor_ = Symbol('[[ctor]]');
|
|
45
|
+
export class FontFace {
|
|
46
|
+
constructor(family, source, descriptors, ctor, native) {
|
|
47
|
+
if (ctor === ctor_ && native instanceof org.nativescript.fontmanager.FontFace) {
|
|
48
|
+
this.native_ = native;
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (source) {
|
|
52
|
+
if (ArrayBuffer.isView(source) || source instanceof ArrayBuffer) {
|
|
53
|
+
this.native_ = new org.nativescript.fontmanager.FontFace(family, source);
|
|
54
|
+
}
|
|
55
|
+
else if (typeof source === 'string') {
|
|
56
|
+
const matches = source.match(url_ex) ?? [];
|
|
57
|
+
this.extension = matches[2];
|
|
58
|
+
let path = matches[1];
|
|
59
|
+
if (path && path.startsWith('~/')) {
|
|
60
|
+
path = path.replace('~', knownFolders.currentApp().path);
|
|
61
|
+
}
|
|
62
|
+
const url = `${path}${this.extension ? '.' + this.extension : ''}`;
|
|
63
|
+
this.native_ = new org.nativescript.fontmanager.FontFace(family, url ?? source ?? null);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
this.native_ = new org.nativescript.fontmanager.FontFace(family);
|
|
68
|
+
}
|
|
69
|
+
if (descriptors) {
|
|
70
|
+
const parts = [`@font-face { font-family: '${family}';`];
|
|
71
|
+
if (descriptors.style !== undefined)
|
|
72
|
+
parts.push(`font-style: ${descriptors.style};`);
|
|
73
|
+
if (descriptors.weight !== undefined)
|
|
74
|
+
parts.push(`font-weight: ${descriptors.weight};`);
|
|
75
|
+
if (descriptors.stretch !== undefined)
|
|
76
|
+
parts.push(`font-stretch: ${descriptors.stretch};`);
|
|
77
|
+
if (descriptors.display !== undefined)
|
|
78
|
+
parts.push(`font-display: ${descriptors.display};`);
|
|
79
|
+
if (descriptors.featureSettings !== undefined)
|
|
80
|
+
parts.push(`font-feature-settings: ${descriptors.featureSettings};`);
|
|
81
|
+
if (descriptors.variationSettings !== undefined)
|
|
82
|
+
parts.push(`font-variation-settings: ${descriptors.variationSettings};`);
|
|
83
|
+
if (descriptors.unicodeRange !== undefined)
|
|
84
|
+
parts.push(`unicode-range: ${descriptors.unicodeRange};`);
|
|
85
|
+
if (descriptors.ascentOverride !== undefined)
|
|
86
|
+
parts.push(`ascent-override: ${descriptors.ascentOverride};`);
|
|
87
|
+
if (descriptors.descentOverride !== undefined)
|
|
88
|
+
parts.push(`descent-override: ${descriptors.descentOverride};`);
|
|
89
|
+
if (descriptors.lineGapOverride !== undefined)
|
|
90
|
+
parts.push(`line-gap-override: ${descriptors.lineGapOverride};`);
|
|
91
|
+
if (descriptors.kerning !== undefined)
|
|
92
|
+
parts.push(`font-kerning: ${descriptors.kerning};`);
|
|
93
|
+
if (descriptors.variantLigatures !== undefined)
|
|
94
|
+
parts.push(`font-variant-ligatures: ${descriptors.variantLigatures};`);
|
|
95
|
+
parts.push('}');
|
|
96
|
+
this.native_.updateDescriptor(parts.join(' '));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
toJSON() {
|
|
100
|
+
return {
|
|
101
|
+
ascentOverride: this.ascentOverride,
|
|
102
|
+
descentOverride: this.descentOverride,
|
|
103
|
+
display: this.display,
|
|
104
|
+
family: this.family,
|
|
105
|
+
status: this.status,
|
|
106
|
+
style: this.style,
|
|
107
|
+
weight: this.weight,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
load() {
|
|
111
|
+
return new Promise((resolve, reject) => {
|
|
112
|
+
if (this.status === 'loaded') {
|
|
113
|
+
resolve();
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
const cb = new kotlin.jvm.functions.Function1({
|
|
117
|
+
invoke(error) {
|
|
118
|
+
if (error) {
|
|
119
|
+
reject(error);
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
resolve();
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
this.native_.load(Utils.android.getApplicationContext(), cb);
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
get ascentOverride() {
|
|
130
|
+
return this.native_.getAscentOverride();
|
|
131
|
+
}
|
|
132
|
+
set ascentOverride(value) {
|
|
133
|
+
this.native_.setFontAscentOverride(value);
|
|
134
|
+
}
|
|
135
|
+
get descentOverride() {
|
|
136
|
+
return this.native_.getDescentOverride();
|
|
137
|
+
}
|
|
138
|
+
set descentOverride(value) {
|
|
139
|
+
this.native_.setFontDescentOverride(value);
|
|
140
|
+
}
|
|
141
|
+
get lineGapOverride() {
|
|
142
|
+
return this.native_.getLineGapOverride();
|
|
143
|
+
}
|
|
144
|
+
set lineGapOverride(value) {
|
|
145
|
+
this.native_.setFontLineGapOverride(value);
|
|
146
|
+
}
|
|
147
|
+
get stretch() {
|
|
148
|
+
return this.native_.getStretch();
|
|
149
|
+
}
|
|
150
|
+
set stretch(value) {
|
|
151
|
+
this.native_.setFontStretch(value);
|
|
152
|
+
}
|
|
153
|
+
get unicodeRange() {
|
|
154
|
+
return this.native_.getUnicodeRange();
|
|
155
|
+
}
|
|
156
|
+
set unicodeRange(value) {
|
|
157
|
+
this.native_.setFontUnicodeRange(value);
|
|
158
|
+
}
|
|
159
|
+
get featureSettings() {
|
|
160
|
+
return this.native_.getFeatureSettings();
|
|
161
|
+
}
|
|
162
|
+
set featureSettings(value) {
|
|
163
|
+
this.native_.setFontFeatureSettings(value);
|
|
164
|
+
}
|
|
165
|
+
get variationSettings() {
|
|
166
|
+
return this.native_.getVariationSettings();
|
|
167
|
+
}
|
|
168
|
+
set variationSettings(value) {
|
|
169
|
+
this.native_.setFontVariationSettings(value);
|
|
170
|
+
}
|
|
171
|
+
get display() {
|
|
172
|
+
switch (this.native_.getDisplay()) {
|
|
173
|
+
case org.nativescript.fontmanager.FontDisplay.Auto:
|
|
174
|
+
return 'auto';
|
|
175
|
+
case org.nativescript.fontmanager.FontDisplay.Block:
|
|
176
|
+
return 'block';
|
|
177
|
+
case org.nativescript.fontmanager.FontDisplay.Fallback:
|
|
178
|
+
return 'fallback';
|
|
179
|
+
case org.nativescript.fontmanager.FontDisplay.Optional:
|
|
180
|
+
return 'optional';
|
|
181
|
+
case org.nativescript.fontmanager.FontDisplay.Swap:
|
|
182
|
+
return 'swap';
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
set display(value) {
|
|
186
|
+
this.native_.setFontDisplay(value);
|
|
187
|
+
}
|
|
188
|
+
get family() {
|
|
189
|
+
return this.native_.getFontFamily();
|
|
190
|
+
}
|
|
191
|
+
get status() {
|
|
192
|
+
switch (this.native_.getStatus()) {
|
|
193
|
+
case org.nativescript.fontmanager.FontFaceStatus.Loaded:
|
|
194
|
+
return 'loaded';
|
|
195
|
+
case org.nativescript.fontmanager.FontFaceStatus.Loading:
|
|
196
|
+
return 'loading';
|
|
197
|
+
case org.nativescript.fontmanager.FontFaceStatus.Unloaded:
|
|
198
|
+
return 'unloaded';
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
get style() {
|
|
202
|
+
return this.native_.getStyle().toString();
|
|
203
|
+
}
|
|
204
|
+
set style(value) {
|
|
205
|
+
this.native_.setFontStyle(value);
|
|
206
|
+
}
|
|
207
|
+
get weight() {
|
|
208
|
+
switch (this.native_.getWeight()) {
|
|
209
|
+
case org.nativescript.fontmanager.FontWeight.Thin:
|
|
210
|
+
return 'thin';
|
|
211
|
+
case org.nativescript.fontmanager.FontWeight.ExtraLight:
|
|
212
|
+
return 'extra-light';
|
|
213
|
+
case org.nativescript.fontmanager.FontWeight.Light:
|
|
214
|
+
return 'light';
|
|
215
|
+
case org.nativescript.fontmanager.FontWeight.Normal:
|
|
216
|
+
return 'normal';
|
|
217
|
+
case org.nativescript.fontmanager.FontWeight.Medium:
|
|
218
|
+
return 'medium';
|
|
219
|
+
case org.nativescript.fontmanager.FontWeight.SemiBold:
|
|
220
|
+
return 'semi-bold';
|
|
221
|
+
case org.nativescript.fontmanager.FontWeight.Bold:
|
|
222
|
+
return 'bold';
|
|
223
|
+
case org.nativescript.fontmanager.FontWeight.ExtraBold:
|
|
224
|
+
return 'extra-bold';
|
|
225
|
+
case org.nativescript.fontmanager.FontWeight.Black:
|
|
226
|
+
return 'black';
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
set weight(value) {
|
|
230
|
+
this.native_.setFontWeight(value);
|
|
231
|
+
}
|
|
232
|
+
get kerning() {
|
|
233
|
+
return this.native_.getKerning();
|
|
234
|
+
}
|
|
235
|
+
set kerning(value) {
|
|
236
|
+
this.native_.setFontKerning(value);
|
|
237
|
+
}
|
|
238
|
+
get variantLigatures() {
|
|
239
|
+
return this.native_.getVariantLigatures();
|
|
240
|
+
}
|
|
241
|
+
set variantLigatures(value) {
|
|
242
|
+
this.native_.setFontVariantLigatures(value);
|
|
243
|
+
}
|
|
244
|
+
updateDescriptor(css) {
|
|
245
|
+
this.native_.updateDescriptor(css);
|
|
246
|
+
}
|
|
247
|
+
static fromNative(native) {
|
|
248
|
+
if (native instanceof org.nativescript.fontmanager.FontFace) {
|
|
249
|
+
const font = new FontFace('', undefined, undefined, ctor_, native);
|
|
250
|
+
font.native_ = native;
|
|
251
|
+
return font;
|
|
252
|
+
}
|
|
253
|
+
return null;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
//# sourceMappingURL=font-face.android.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"font-face.android.js","sourceRoot":"","sources":["../../../packages/font-manager/font-face.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAGzD,MAAM,MAAM,GAAG,uCAAuC,CAAC;AAoBvD,MAAM,UAAU,gBAAgB,CAAC,GAAW;IAC1C,OAAO,IAAI,OAAO,CAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC5C,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC;YAC5C,MAAM,CAAC,KAA4D,EAAE,KAAa;gBAChF,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;gBAC3B,MAAM,GAAG,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;gBAC7B,IAAI,KAAK,EAAE,CAAC;oBACV,MAAM,CAAC,KAAK,CAAC,CAAC;gBAChB,CAAC;qBAAM,CAAC;oBACN,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;wBAC/B,GAAG,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC7C,CAAC;oBACD,OAAO,CAAC,GAAG,CAAC,CAAC;gBACf,CAAC;YACH,CAAC;SACF,CAAC,CAAC;QACH,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC,QAAQ,CAAC,gBAAgB,CAAC,KAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;IAChH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,GAAW;IAC5C,OAAO,IAAI,OAAO,CAAa,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CAAC,UAAU,EAAE,CAAC;IACnC,CAAC;IAED,IAAI,OAAO,CAAC,KAAa;QACvB,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAED,IAAI,gBAAgB;QAClB,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAC5C,CAAC;IAED,IAAI,gBAAgB,CAAC,KAAa;QAChC,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;IAC9C,CAAC;IAED,gBAAgB,CAAC,GAAW;QAC1B,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,MAAW;QAC3B,IAAI,MAAM,YAAY,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;YAC5D,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;YACnE,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;YACtB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
|
|
2
|
+
type stretchName = 'ultra-condensed' | 'extra-condensed' | 'condensed' | 'semi-condensed' | 'normal' | 'semi-expanded' | 'expanded' | 'extra-expanded' | 'ultra-expanded';
|
|
3
|
+
type strechPercent = '50%' | '62.5%' | '75%' | '87.5%' | '100%' | '112.5%' | '125%' | '150%' | '200%' | '300%' | '400%';
|
|
4
|
+
type stretch = stretchName | strechPercent;
|
|
5
|
+
interface FontDescriptor {
|
|
6
|
+
ascentOverride?: 'normal' | `${number}%`;
|
|
7
|
+
descentOverride?: 'normal' | `${number}%`;
|
|
8
|
+
display?: 'auto' | 'block' | 'swap' | 'fallback' | 'optional';
|
|
9
|
+
featureSettings?: string;
|
|
10
|
+
lineGapOverride?: 'normal' | `${number}%`;
|
|
11
|
+
stretch?: stretch | `${stretch} ${stretch}`;
|
|
12
|
+
style?: 'normal' | 'italic' | 'oblique' | `oblique ${number}deg`;
|
|
13
|
+
unicodeRange?: string;
|
|
14
|
+
variationSettings?: 'normal' | `${string} ${number}`;
|
|
15
|
+
weight?: 'normal' | 'bold' | 'bolder' | 'lighter' | `${number}` | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
16
|
+
kerning?: 'auto' | 'normal' | 'none';
|
|
17
|
+
variantLigatures?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function loadFontsFromCSS(url: string): Promise<any[]>;
|
|
20
|
+
export declare function importFontsFromCSS(url: string): Promise<any[]>;
|
|
21
|
+
export declare class FontFace {
|
|
22
|
+
native_: NSCFontFace;
|
|
23
|
+
private extension?;
|
|
24
|
+
constructor(family: string, source?: string | TypedArray | ArrayBuffer, descriptors?: FontDescriptor, ctor?: symbol, native?: NSCFontFace);
|
|
25
|
+
toJSON(): {
|
|
26
|
+
ascentOverride: string;
|
|
27
|
+
descentOverride: string;
|
|
28
|
+
display: string;
|
|
29
|
+
family: string;
|
|
30
|
+
status: string;
|
|
31
|
+
style: string;
|
|
32
|
+
weight: string;
|
|
33
|
+
};
|
|
34
|
+
load(): Promise<void>;
|
|
35
|
+
get ascentOverride(): string;
|
|
36
|
+
set ascentOverride(value: string);
|
|
37
|
+
get descentOverride(): string;
|
|
38
|
+
set descentOverride(value: string);
|
|
39
|
+
get lineGapOverride(): string;
|
|
40
|
+
set lineGapOverride(value: string);
|
|
41
|
+
get stretch(): string;
|
|
42
|
+
set stretch(value: string);
|
|
43
|
+
get unicodeRange(): string;
|
|
44
|
+
set unicodeRange(value: string);
|
|
45
|
+
get featureSettings(): string;
|
|
46
|
+
set featureSettings(value: string);
|
|
47
|
+
get variationSettings(): string;
|
|
48
|
+
set variationSettings(value: string);
|
|
49
|
+
get display(): string;
|
|
50
|
+
set display(value: string);
|
|
51
|
+
get family(): string;
|
|
52
|
+
get status(): "loading" | "loaded" | "unloaded";
|
|
53
|
+
get style(): string;
|
|
54
|
+
set style(value: string);
|
|
55
|
+
get weight(): string;
|
|
56
|
+
set weight(value: string);
|
|
57
|
+
get kerning(): string;
|
|
58
|
+
set kerning(value: string);
|
|
59
|
+
get variantLigatures(): string;
|
|
60
|
+
set variantLigatures(value: string);
|
|
61
|
+
updateDescriptor(css: string): void;
|
|
62
|
+
static fromNative(native: any): FontFace | null;
|
|
63
|
+
}
|
|
64
|
+
export {};
|
package/font-face.ios.js
ADDED
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { knownFolders } from '@nativescript/core';
|
|
2
|
+
const url_ex = /url\(([^)]+?)\.(woff2?|ttf|otf|eot)\)/;
|
|
3
|
+
export function loadFontsFromCSS(url) {
|
|
4
|
+
return new Promise((resolve, reject) => {
|
|
5
|
+
NSCFontResolver.shared().importFromRemoteWithURLLoadCompletion(url, false, (fonts, error) => {
|
|
6
|
+
const count = fonts.count;
|
|
7
|
+
const ret = new Array(count);
|
|
8
|
+
if (error) {
|
|
9
|
+
reject(error);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
for (let i = 0; i < count; i++) {
|
|
13
|
+
ret[i] = FontFace.fromNative(fonts.objectAtIndex(i));
|
|
14
|
+
}
|
|
15
|
+
resolve(ret);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
export function importFontsFromCSS(url) {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
NSCFontResolver.shared().importFromRemoteWithURLLoadCompletion(url, true, (fonts, error) => {
|
|
23
|
+
const count = fonts.count;
|
|
24
|
+
const ret = new Array(count);
|
|
25
|
+
if (error) {
|
|
26
|
+
reject(error);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
for (let i = 0; i < count; i++) {
|
|
30
|
+
ret[i] = FontFace.fromNative(fonts.objectAtIndex(i));
|
|
31
|
+
}
|
|
32
|
+
resolve(ret);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
const ctor_ = Symbol('[[ctor]]');
|
|
38
|
+
export class FontFace {
|
|
39
|
+
constructor(family, source, descriptors, ctor, native) {
|
|
40
|
+
if (ctor === ctor_ && native instanceof NSCFontFace) {
|
|
41
|
+
this.native_ = native;
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
let descriptor = null;
|
|
45
|
+
if (descriptors) {
|
|
46
|
+
const parts = [`@font-face { font-family: '${family}';`];
|
|
47
|
+
if (descriptors.style !== undefined)
|
|
48
|
+
parts.push(`font-style: ${descriptors.style};`);
|
|
49
|
+
if (descriptors.weight !== undefined)
|
|
50
|
+
parts.push(`font-weight: ${descriptors.weight};`);
|
|
51
|
+
if (descriptors.stretch !== undefined)
|
|
52
|
+
parts.push(`font-stretch: ${descriptors.stretch};`);
|
|
53
|
+
if (descriptors.display !== undefined)
|
|
54
|
+
parts.push(`font-display: ${descriptors.display};`);
|
|
55
|
+
if (descriptors.featureSettings !== undefined)
|
|
56
|
+
parts.push(`font-feature-settings: ${descriptors.featureSettings};`);
|
|
57
|
+
if (descriptors.variationSettings !== undefined)
|
|
58
|
+
parts.push(`font-variation-settings: ${descriptors.variationSettings};`);
|
|
59
|
+
if (descriptors.unicodeRange !== undefined)
|
|
60
|
+
parts.push(`unicode-range: ${descriptors.unicodeRange};`);
|
|
61
|
+
if (descriptors.ascentOverride !== undefined)
|
|
62
|
+
parts.push(`ascent-override: ${descriptors.ascentOverride};`);
|
|
63
|
+
if (descriptors.descentOverride !== undefined)
|
|
64
|
+
parts.push(`descent-override: ${descriptors.descentOverride};`);
|
|
65
|
+
if (descriptors.lineGapOverride !== undefined)
|
|
66
|
+
parts.push(`line-gap-override: ${descriptors.lineGapOverride};`);
|
|
67
|
+
if (descriptors.kerning !== undefined)
|
|
68
|
+
parts.push(`font-kerning: ${descriptors.kerning};`);
|
|
69
|
+
if (descriptors.variantLigatures !== undefined)
|
|
70
|
+
parts.push(`font-variant-ligatures: ${descriptors.variantLigatures};`);
|
|
71
|
+
parts.push('}');
|
|
72
|
+
const descriptorValue = parts.join(' ');
|
|
73
|
+
descriptor = NSCFontDescriptors.alloc().initWithFamily(family);
|
|
74
|
+
descriptor.update(descriptorValue);
|
|
75
|
+
}
|
|
76
|
+
if (source) {
|
|
77
|
+
if (ArrayBuffer.isView(source) || source instanceof ArrayBuffer) {
|
|
78
|
+
if (descriptor) {
|
|
79
|
+
this.native_ = NSCFontFace.alloc().initWithFontDescriptorData(descriptor, NSData.dataWithData(source));
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
this.native_ = NSCFontFace.alloc().initWithFamilyData(family, NSData.dataWithData(source));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
else if (typeof source === 'string') {
|
|
86
|
+
const matches = source.match(url_ex) ?? [];
|
|
87
|
+
this.extension = matches[2];
|
|
88
|
+
let path = matches[1];
|
|
89
|
+
if (path && path.startsWith('~/')) {
|
|
90
|
+
path = path.replace('~', knownFolders.currentApp().path);
|
|
91
|
+
}
|
|
92
|
+
const url = `${path}${this.extension ? '.' + this.extension : ''}`;
|
|
93
|
+
if (descriptor) {
|
|
94
|
+
this.native_ = NSCFontFace.alloc().initWithFontDescriptorSource(descriptor, url ?? source);
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
this.native_ = NSCFontFace.alloc().initWithFamilySource(family, url ?? source);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
if (descriptor) {
|
|
103
|
+
this.native_ = NSCFontFace.alloc().initWithFontDescriptor(descriptor);
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
this.native_ = NSCFontFace.alloc().initWithFamily(family);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
toJSON() {
|
|
111
|
+
return {
|
|
112
|
+
ascentOverride: this.ascentOverride,
|
|
113
|
+
descentOverride: this.descentOverride,
|
|
114
|
+
display: this.display,
|
|
115
|
+
family: this.family,
|
|
116
|
+
status: this.status,
|
|
117
|
+
style: this.style,
|
|
118
|
+
weight: this.weight,
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
load() {
|
|
122
|
+
return new Promise((resolve, reject) => {
|
|
123
|
+
this.native_.load((error) => {
|
|
124
|
+
if (error) {
|
|
125
|
+
reject(error);
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
resolve();
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
get ascentOverride() {
|
|
134
|
+
return this.native_.fontDescriptors.ascentOverride;
|
|
135
|
+
}
|
|
136
|
+
set ascentOverride(value) {
|
|
137
|
+
this.native_.fontDescriptors.ascentOverride = value;
|
|
138
|
+
}
|
|
139
|
+
get descentOverride() {
|
|
140
|
+
return this.native_.fontDescriptors.descentOverride;
|
|
141
|
+
}
|
|
142
|
+
set descentOverride(value) {
|
|
143
|
+
this.native_.fontDescriptors.descentOverride = value;
|
|
144
|
+
}
|
|
145
|
+
get lineGapOverride() {
|
|
146
|
+
return this.native_.fontDescriptors.lineGapOverride;
|
|
147
|
+
}
|
|
148
|
+
set lineGapOverride(value) {
|
|
149
|
+
this.native_.fontDescriptors.lineGapOverride = value;
|
|
150
|
+
}
|
|
151
|
+
get stretch() {
|
|
152
|
+
return this.native_.fontDescriptors.stretch;
|
|
153
|
+
}
|
|
154
|
+
set stretch(value) {
|
|
155
|
+
this.native_.fontDescriptors.stretch = value;
|
|
156
|
+
}
|
|
157
|
+
get unicodeRange() {
|
|
158
|
+
return this.native_.fontDescriptors.unicodeRange;
|
|
159
|
+
}
|
|
160
|
+
set unicodeRange(value) {
|
|
161
|
+
this.native_.fontDescriptors.unicodeRange = value;
|
|
162
|
+
}
|
|
163
|
+
get featureSettings() {
|
|
164
|
+
return this.native_.fontDescriptors.featureSettings;
|
|
165
|
+
}
|
|
166
|
+
set featureSettings(value) {
|
|
167
|
+
this.native_.fontDescriptors.featureSettings = value;
|
|
168
|
+
}
|
|
169
|
+
get variationSettings() {
|
|
170
|
+
return this.native_.fontDescriptors.variationSettings;
|
|
171
|
+
}
|
|
172
|
+
set variationSettings(value) {
|
|
173
|
+
this.native_.fontDescriptors.variationSettings = value;
|
|
174
|
+
}
|
|
175
|
+
get display() {
|
|
176
|
+
switch (this.native_.fontDescriptors.display) {
|
|
177
|
+
case 0 /* NSCFontDisplay.Auto */:
|
|
178
|
+
return 'auto';
|
|
179
|
+
case 1 /* NSCFontDisplay.Block */:
|
|
180
|
+
return 'block';
|
|
181
|
+
case 2 /* NSCFontDisplay.Fallback */:
|
|
182
|
+
return 'fallback';
|
|
183
|
+
case 3 /* NSCFontDisplay.Optional */:
|
|
184
|
+
return 'optional';
|
|
185
|
+
case 4 /* NSCFontDisplay.Swap */:
|
|
186
|
+
return 'swap';
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
set display(value) {
|
|
190
|
+
this.native_.setFontDisplay(value);
|
|
191
|
+
}
|
|
192
|
+
get family() {
|
|
193
|
+
return this.native_.family;
|
|
194
|
+
}
|
|
195
|
+
get status() {
|
|
196
|
+
switch (this.native_.status) {
|
|
197
|
+
case 2 /* NSCFontFaceStatus.Loaded */:
|
|
198
|
+
return 'loaded';
|
|
199
|
+
case 1 /* NSCFontFaceStatus.Loading */:
|
|
200
|
+
return 'loading';
|
|
201
|
+
case 0 /* NSCFontFaceStatus.Unloaded */:
|
|
202
|
+
return 'unloaded';
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
get style() {
|
|
206
|
+
return this.native_.fontDescriptors.style;
|
|
207
|
+
}
|
|
208
|
+
set style(value) {
|
|
209
|
+
const obliqueMatch = /^oblique\s*(.*)$/.exec(value);
|
|
210
|
+
if (obliqueMatch) {
|
|
211
|
+
this.native_.setFontStyleAngle('oblique', obliqueMatch[1] || '0deg');
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
this.native_.setFontStyleAngle(value, '');
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
get weight() {
|
|
218
|
+
switch (this.native_.fontDescriptors.weight) {
|
|
219
|
+
case 100 /* NSCFontWeight.Thin */:
|
|
220
|
+
return 'thin';
|
|
221
|
+
case 200 /* NSCFontWeight.ExtraLight */:
|
|
222
|
+
return 'extra-light';
|
|
223
|
+
case 300 /* NSCFontWeight.Light */:
|
|
224
|
+
return 'light';
|
|
225
|
+
case 400 /* NSCFontWeight.Normal */:
|
|
226
|
+
return 'normal';
|
|
227
|
+
case 500 /* NSCFontWeight.Medium */:
|
|
228
|
+
return 'medium';
|
|
229
|
+
case 600 /* NSCFontWeight.SemiBold */:
|
|
230
|
+
return 'semi-bold';
|
|
231
|
+
case 700 /* NSCFontWeight.Bold */:
|
|
232
|
+
return 'bold';
|
|
233
|
+
case 800 /* NSCFontWeight.ExtraBold */:
|
|
234
|
+
return 'extra-bold';
|
|
235
|
+
case 900 /* NSCFontWeight.Black */:
|
|
236
|
+
return 'black';
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
set weight(value) {
|
|
240
|
+
this.native_.setFontWeight(value);
|
|
241
|
+
}
|
|
242
|
+
get kerning() {
|
|
243
|
+
return this.native_.fontDescriptors.kerning;
|
|
244
|
+
}
|
|
245
|
+
set kerning(value) {
|
|
246
|
+
this.native_.fontDescriptors.kerning = value;
|
|
247
|
+
}
|
|
248
|
+
get variantLigatures() {
|
|
249
|
+
return this.native_.fontDescriptors.variantLigatures;
|
|
250
|
+
}
|
|
251
|
+
set variantLigatures(value) {
|
|
252
|
+
this.native_.fontDescriptors.variantLigatures = value;
|
|
253
|
+
}
|
|
254
|
+
updateDescriptor(css) {
|
|
255
|
+
this.native_.fontDescriptors.update(css);
|
|
256
|
+
}
|
|
257
|
+
static fromNative(native) {
|
|
258
|
+
if (native instanceof NSCFontFace) {
|
|
259
|
+
return new FontFace('', undefined, undefined, ctor_, native);
|
|
260
|
+
}
|
|
261
|
+
return null;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
//# sourceMappingURL=font-face.ios.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"font-face.ios.js","sourceRoot":"","sources":["../../../packages/font-manager/font-face.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIlD,MAAM,MAAM,GAAG,uCAAuC,CAAC;AAoBvD,MAAM,UAAU,gBAAgB,CAAC,GAAW;IAC1C,OAAO,IAAI,OAAO,CAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC5C,eAAe,CAAC,MAAM,EAAE,CAAC,qCAAqC,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YAC1F,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;YAC1B,MAAM,GAAG,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;YAC7B,IAAI,KAAK,EAAE,CAAC;gBACV,MAAM,CAAC,KAAK,CAAC,CAAC;YAChB,CAAC;iBAAM,CAAC;gBACN,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;oBAC/B,GAAG,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;gBACvD,CAAC;gBACD,OAAO,CAAC,GAAG,CAAC,CAAC;YACf,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,GAAW;IAC5C,OAAO,IAAI,OA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,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QAC/D,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
package/index.d.ts
ADDED
package/index.js
ADDED
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/font-manager/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
ios: {
|
|
3
|
+
SPMPackages: [
|
|
4
|
+
{
|
|
5
|
+
name: 'FontManager',
|
|
6
|
+
libs: ['FontManager'],
|
|
7
|
+
version: '1.0.0',
|
|
8
|
+
repositoryURL: 'https://github.com/NativeScript/font-manager.git',
|
|
9
|
+
},
|
|
10
|
+
],
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=nativescript.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nativescript.config.js","sourceRoot":"","sources":["../../../packages/font-manager/nativescript.config.ts"],"names":[],"mappings":"AAEA,eAAe;IACd,GAAG,EAAE;QACJ,WAAW,EAAE;YACZ;gBACC,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,CAAC,aAAa,CAAC;gBACrB,OAAO,EAAE,OAAO;gBAChB,aAAa,EAAE,kDAAkD;aACjE;SACD;KACD;CACqB,CAAC"}
|