asposefontnodejs 24.8.0 → 24.10.1
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/AsposeFontForNode.wasm +0 -0
- package/AsposeFontforNode.cjs +2 -2
- package/AsposeFontforNode.mjs +2 -2
- package/LICENSE.md +14 -14
- package/README.md +78 -100
- package/package.json +52 -53
package/LICENSE.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
# EULA
|
|
2
|
-
|
|
3
|
-
The End User License Agreement ("EULA") contains the terms and conditions that
|
|
4
|
-
govern Your use of Aspose's products enclosed or otherwise accompanied herewith
|
|
5
|
-
(individually and collectively, the "PRODUCT") (as linked to below) and imposes
|
|
6
|
-
material limitations on Your License. You should read the EULA carefully. BY
|
|
7
|
-
INSTALLING, DOWNLOADING, COPYING OR OTHERWISE USING THE PRODUCT, YOU AGREE TO BE
|
|
8
|
-
BOUND BY THE TERMS OF THE ASPOSE EULA.
|
|
9
|
-
|
|
10
|
-
You may obtain a copy of the Aspose EULA at: https://about.aspose.com/legal/eula
|
|
11
|
-
|
|
12
|
-
## 3rd party Licenses
|
|
13
|
-
|
|
14
|
-
Please follow to ./license/3rdparty.pdf to get full info about 3rd party Licenses.
|
|
1
|
+
# EULA
|
|
2
|
+
|
|
3
|
+
The End User License Agreement ("EULA") contains the terms and conditions that
|
|
4
|
+
govern Your use of Aspose's products enclosed or otherwise accompanied herewith
|
|
5
|
+
(individually and collectively, the "PRODUCT") (as linked to below) and imposes
|
|
6
|
+
material limitations on Your License. You should read the EULA carefully. BY
|
|
7
|
+
INSTALLING, DOWNLOADING, COPYING OR OTHERWISE USING THE PRODUCT, YOU AGREE TO BE
|
|
8
|
+
BOUND BY THE TERMS OF THE ASPOSE EULA.
|
|
9
|
+
|
|
10
|
+
You may obtain a copy of the Aspose EULA at: https://about.aspose.com/legal/eula
|
|
11
|
+
|
|
12
|
+
## 3rd party Licenses
|
|
13
|
+
|
|
14
|
+
Please follow to ./license/3rdparty.pdf to get full info about 3rd party Licenses.
|
package/README.md
CHANGED
|
@@ -1,100 +1,78 @@
|
|
|
1
|
-
# Node.js API to Manipulate Font Files
|
|
2
|
-
|
|
3
|
-
Add font
|
|
4
|
-
|
|
5
|
-
[Aspose.Font for Node.js via C++](https://products.aspose.com/font/nodejs-cpp/) allows convert ttf, otf, cff, type1 font files to ttf and svg formats, read and write truetype font metadata information.
|
|
6
|
-
|
|
7
|
-
<p align="center">
|
|
8
|
-
<a title="Download complete Aspose.Font for Node.js via C++ code" href="https://releases.aspose.com/font/nodejs-cpp/new-releases/">
|
|
9
|
-
<img src="https://raw.github.com/AsposeExamples/java-examples-dashboard/master/images/downloadZip-Button-Large.png" />
|
|
10
|
-
</a>
|
|
11
|
-
</p>
|
|
12
|
-
|
|
13
|
-
##
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
## Read & Write
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
##
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
Aspose.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
##
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
```js
|
|
80
|
-
const AsposePdf = require('asposepdfnodejs');
|
|
81
|
-
const pdf_file = 'Aspose.pdf';
|
|
82
|
-
AsposePdf().then(AsposePdfModule => {
|
|
83
|
-
/*Convert a PDF-file to DocX and save the "ResultPDFtoDocX.docx"*/
|
|
84
|
-
const json = AsposePdfModule.AsposePdfToDocX(pdf_file, "ResultPDFtoDocX.docx");
|
|
85
|
-
console.log("AsposePdfToDocX => %O", json.errorCode == 0 ? json.fileNameResult : json.errorText);
|
|
86
|
-
});
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
**ECMAScript/ES6**:
|
|
90
|
-
|
|
91
|
-
```js
|
|
92
|
-
import AsposePdf from 'asposepdfnodejs';
|
|
93
|
-
const AsposePdfModule = await AsposePdf();
|
|
94
|
-
const pdf_file = 'Aspose.pdf';
|
|
95
|
-
/*Convert a PDF-file to DocX and save the "ResultPDFtoDocX.docx"*/
|
|
96
|
-
const json = AsposePdfModule.AsposePdfToDocX(pdf_file, "ResultPDFtoDocX.docx");
|
|
97
|
-
console.log("AsposePdfToDocX => %O", json.errorCode == 0 ? json.fileNameResult : json.errorText);
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
[Home](https://www.aspose.com/) | [Product Page](https://products.aspose.com/pdf/nodejs-cpp/) | [Docs](https://docs.aspose.com/pdf/nodejs-cpp/) | [Demos](https://products.aspose.app/pdf/family) | [API Reference](https://reference.aspose.com/pdf/nodejs-cpp/) | [Examples](https://github.com/aspose-pdf/aspose-pdf-js) | [Blog](https://blog.aspose.com/category/pdf/) | [Search](https://search.aspose.com/) | [Free Support](https://forum.aspose.com/c/pdf) | [Temporary License](https://purchase.aspose.com/temporary-license)
|
|
1
|
+
# Node.js API to Manipulate Font Files
|
|
2
|
+
|
|
3
|
+
Add font manipulation and conversion features to your Node.js applications.
|
|
4
|
+
|
|
5
|
+
[Aspose.Font for Node.js via C++](https://products.aspose.com/font/nodejs-cpp/) allows convert ttf, otf, cff, type1 font files to ttf and svg formats, read and write truetype font metadata information.
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a title="Download complete Aspose.Font for Node.js via C++ code" href="https://releases.aspose.com/font/nodejs-cpp/new-releases/">
|
|
9
|
+
<img src="https://raw.github.com/AsposeExamples/java-examples-dashboard/master/images/downloadZip-Button-Large.png" />
|
|
10
|
+
</a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
## Font Processing via C++
|
|
14
|
+
|
|
15
|
+
- [Load font files from disc](https://docs.aspose.com/font/cpp/loading-saving-cff-fonts/) as well as stream.
|
|
16
|
+
- Read font information and save updated font files to disc.
|
|
17
|
+
- Support for [*TrueType* and *OpenType*](https://docs.aspose.com/font/cpp/working-with-truetype-and-opentype-fonts/) Fonts.
|
|
18
|
+
- Work with [CFF](https://docs.aspose.com/font/cpp/working-with-cff-fonts/) & [Type1 fonts](https://docs.aspose.com/font/cpp/working-with-type1-fonts/) in your C++ Apps.
|
|
19
|
+
- Read Glyphs and Metrics information from Font files.
|
|
20
|
+
- Detect Latin Symbols in Fonts.
|
|
21
|
+
- Extract embedded licensing information from font files.
|
|
22
|
+
- Render text using font Glyphs.
|
|
23
|
+
|
|
24
|
+
## Read & Write Font Formats
|
|
25
|
+
|
|
26
|
+
TTF
|
|
27
|
+
|
|
28
|
+
## Read Font Formats
|
|
29
|
+
|
|
30
|
+
TTC, OpenType, CFF, Type1
|
|
31
|
+
|
|
32
|
+
## System Requirements
|
|
33
|
+
|
|
34
|
+
Aspose.Font for Node.js is developed to work in Node.js environment. It is recommended to use Node.js latest version (20.14 and above)
|
|
35
|
+
|
|
36
|
+
## Get Started with Aspose.Font for NodeJS via C++
|
|
37
|
+
|
|
38
|
+
Are you ready to give Aspose.Font for C++ a try? Simply execute `npm install asposefontnodejs`. If you already have Aspose.Font for C++ and want to upgrade the version, please execute `npm update asposefontnodejs` to get the latest version.
|
|
39
|
+
Use AsposeFontforNode
|
|
40
|
+
- in your cjs:
|
|
41
|
+
```
|
|
42
|
+
const AsposeFont = require('asposefontnodejs');
|
|
43
|
+
```
|
|
44
|
+
- or mjs modules:
|
|
45
|
+
```
|
|
46
|
+
import AsposeFont from 'asposefontnodejs';
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Examples of getting metadata
|
|
50
|
+
|
|
51
|
+
1. Run the [AsposeFontGetInfo](https://reference.aspose.com/font/nodejs-cpp/metadata/asposefontgetinfo/) function.
|
|
52
|
+
2. In case the `json.errorCode` is 0, you can get the result data. When the `json.errorCode` parameter is not equal to 0 and, accordingly, you will receive an error in your file, then information about such an error will be contained in the `json.errorText`.
|
|
53
|
+
3. The resulting json object contains `records` array. Each record contains fields `NameId`, `PlatformId`, `PlatformSpecificId`, `LanguageId`, `Info` with information from `name` table of font.
|
|
54
|
+
|
|
55
|
+
```js
|
|
56
|
+
const AsposeFont = require('asposefontnodejs');
|
|
57
|
+
|
|
58
|
+
const font_file = "./fonts/12380_C0_0.cff";
|
|
59
|
+
|
|
60
|
+
console.log('Aspose.Font for Node.js via C++ example');
|
|
61
|
+
|
|
62
|
+
AsposeFont().then(AsposeFontModule => {
|
|
63
|
+
|
|
64
|
+
//AsposeFontGetInfo - get metadata information
|
|
65
|
+
const json = AsposeFontModule.AsposeFontGetInfo(font_file);
|
|
66
|
+
console.log("AsposeFontGetInfo => %O", json.errorCode == 0 ? json.records.reduce((ret, a) => ret +
|
|
67
|
+
"\nNameId : " + a.NameId
|
|
68
|
+
+ "; PlatformId : " + a.PlatformId
|
|
69
|
+
+ "; PlatformSpecificId : " + a.PlatformSpecificId
|
|
70
|
+
+ "; LanguageId : " + a.LanguageId
|
|
71
|
+
+ "; Info : " + a.Info,"") : json.errorText);
|
|
72
|
+
|
|
73
|
+
},
|
|
74
|
+
reason => {console.log(`The unknown error has occurred: ${reason}`);}
|
|
75
|
+
);
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
[Home](https://www.aspose.com/) | [Product Page](https://products.aspose.com/font/cpp) | [Docs](https://docs.aspose.com/font/cpp/) | [API Reference](https://apireference.aspose.com/font/cpp) | [Examples](https://github.com/aspose-font/Aspose.Font-for-C/tree/master/Examples) | [Blog](https://blog.aspose.com/category/font/) | [Search](https://search.aspose.com/) | [Free Support](https://forum.aspose.com/c/font) | [Temporary License](https://purchase.aspose.com/temporary-license)
|
package/package.json
CHANGED
|
@@ -1,53 +1,52 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "asposefontnodejs",
|
|
3
|
-
"description": "Aspose.Font for Node.js via C++",
|
|
4
|
-
"version": "24.
|
|
5
|
-
"homepage": "https://products.aspose.com/font/nodejs-cpp/",
|
|
6
|
-
"readmeFilename": "README.md",
|
|
7
|
-
"main": "./AsposeFontforNode.cjs",
|
|
8
|
-
"module": "./AsposeFontforNode.mjs",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"import": "./AsposeFontforNode.mjs",
|
|
12
|
-
"require": "./AsposeFontforNode.cjs"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"files": [
|
|
16
|
-
"AsposeFontforNode.cjs",
|
|
17
|
-
"AsposeFontforNode.mjs",
|
|
18
|
-
"AsposeFontforNode.wasm",
|
|
19
|
-
"license/*",
|
|
20
|
-
"fonts/Lora-Regular.ttf",
|
|
21
|
-
"fonts/acade1.afm",
|
|
22
|
-
"fonts/Montserrat-Regular.eot",
|
|
23
|
-
"fonts/12380_C0_0.cff",
|
|
24
|
-
"LICENSE.md",
|
|
25
|
-
"README.md",
|
|
26
|
-
"example.cjs",
|
|
27
|
-
"example.mjs"
|
|
28
|
-
],
|
|
29
|
-
"scripts": {
|
|
30
|
-
"example:cjs": "node ./example.cjs",
|
|
31
|
-
"example:esm": "node ./example.mjs"
|
|
32
|
-
},
|
|
33
|
-
"engines": {
|
|
34
|
-
"node": ">=16.4.0"
|
|
35
|
-
},
|
|
36
|
-
"author": {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
"license": "See Licence in LICENCE.md",
|
|
41
|
-
"keywords": [
|
|
42
|
-
"Aspose",
|
|
43
|
-
"Aspose.Font",
|
|
44
|
-
"TTF",
|
|
45
|
-
"WOFF",
|
|
46
|
-
"WOFF2",
|
|
47
|
-
"Font",
|
|
48
|
-
"C++",
|
|
49
|
-
"WebAssembly"
|
|
50
|
-
],
|
|
51
|
-
"dependencies": {
|
|
52
|
-
|
|
53
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "asposefontnodejs",
|
|
3
|
+
"description": "Aspose.Font for Node.js via C++",
|
|
4
|
+
"version": "24.10.1",
|
|
5
|
+
"homepage": "https://products.aspose.com/font/nodejs-cpp/",
|
|
6
|
+
"readmeFilename": "README.md",
|
|
7
|
+
"main": "./AsposeFontforNode.cjs",
|
|
8
|
+
"module": "./AsposeFontforNode.mjs",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./AsposeFontforNode.mjs",
|
|
12
|
+
"require": "./AsposeFontforNode.cjs"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"AsposeFontforNode.cjs",
|
|
17
|
+
"AsposeFontforNode.mjs",
|
|
18
|
+
"AsposeFontforNode.wasm",
|
|
19
|
+
"license/*",
|
|
20
|
+
"fonts/Lora-Regular.ttf",
|
|
21
|
+
"fonts/acade1.afm",
|
|
22
|
+
"fonts/Montserrat-Regular.eot",
|
|
23
|
+
"fonts/12380_C0_0.cff",
|
|
24
|
+
"LICENSE.md",
|
|
25
|
+
"README.md",
|
|
26
|
+
"example.cjs",
|
|
27
|
+
"example.mjs"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"example:cjs": "node ./example.cjs",
|
|
31
|
+
"example:esm": "node ./example.mjs"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=16.4.0"
|
|
35
|
+
},
|
|
36
|
+
"author": {
|
|
37
|
+
"name": "Aspose.Font for C++ Team",
|
|
38
|
+
"url": "https://products.aspose.com/font/"
|
|
39
|
+
},
|
|
40
|
+
"license": "See Licence in LICENCE.md",
|
|
41
|
+
"keywords": [
|
|
42
|
+
"Aspose",
|
|
43
|
+
"Aspose.Font",
|
|
44
|
+
"TTF",
|
|
45
|
+
"WOFF",
|
|
46
|
+
"WOFF2",
|
|
47
|
+
"Font",
|
|
48
|
+
"C++",
|
|
49
|
+
"WebAssembly"
|
|
50
|
+
],
|
|
51
|
+
"dependencies": {}
|
|
52
|
+
}
|