intellifont-engine 1.0.0 ā 2.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/README.md +355 -173
- package/browser/canvas-dna.js +626 -0
- package/browser/demo.html +759 -0
- package/browser/image-pipeline.js +1182 -0
- package/browser/intellifont-inspector.js +299 -0
- package/index.d.ts +177 -0
- package/index.js +760 -194
- package/intellifont-engine.node +0 -0
- package/package.json +63 -57
- package/setup.js +34 -0
package/intellifont-engine.node
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,58 +1,64 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "intellifont-engine",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"build:
|
|
20
|
-
"test": "node
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "intellifont-engine",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Visual font identification engine. Identifies fonts from images, documents, URLs, and web pages. Includes hybrid ML matching, browser extensions, and WASM build.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
7
|
+
"napi": {
|
|
8
|
+
"name": "intellifont-engine",
|
|
9
|
+
"package": {
|
|
10
|
+
"name": "intellifont-engine"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"artifacts": "napi artifacts",
|
|
15
|
+
"build": "napi build --release",
|
|
16
|
+
"build:debug": "napi build",
|
|
17
|
+
"test": "node test.js",
|
|
18
|
+
"version": "napi version",
|
|
19
|
+
"build:db": "node ../../../../scripts/build-font-database.js",
|
|
20
|
+
"build:db:test": "node ../../../../scripts/build-font-database.js --limit 20",
|
|
21
|
+
"build:db:dryrun": "node ../../../../scripts/build-font-database.js --dry-run",
|
|
22
|
+
"build:browser-db": "node ../../../../scripts/build-browser-db.js",
|
|
23
|
+
"build:icons": "node ../../../../scripts/generate-icons.js",
|
|
24
|
+
"build:extension": "node ../../../../scripts/build-extension.js"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"font",
|
|
28
|
+
"font-recognition",
|
|
29
|
+
"font-identification",
|
|
30
|
+
"typography",
|
|
31
|
+
"image-analysis",
|
|
32
|
+
"visual-matching",
|
|
33
|
+
"pdf",
|
|
34
|
+
"document-analysis",
|
|
35
|
+
"browser-extension",
|
|
36
|
+
"wasm",
|
|
37
|
+
"rust",
|
|
38
|
+
"napi"
|
|
39
|
+
],
|
|
40
|
+
"author": "IntelliFont Team",
|
|
41
|
+
"license": "Apache-2.0",
|
|
42
|
+
"repository": {
|
|
43
|
+
"type": "git",
|
|
44
|
+
"url": "https://github.com/magic-emperor/Intellifont.git"
|
|
45
|
+
},
|
|
46
|
+
"engines": {
|
|
47
|
+
"node": ">= 14"
|
|
48
|
+
},
|
|
49
|
+
"files": [
|
|
50
|
+
"index.js",
|
|
51
|
+
"index.d.ts",
|
|
52
|
+
"intellifont-engine.node",
|
|
53
|
+
"setup.js",
|
|
54
|
+
"README.md",
|
|
55
|
+
"LICENSE",
|
|
56
|
+
"browser/canvas-dna.js",
|
|
57
|
+
"browser/intellifont-inspector.js",
|
|
58
|
+
"browser/image-pipeline.js",
|
|
59
|
+
"browser/demo.html"
|
|
60
|
+
],
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@napi-rs/cli": "^2.16.0"
|
|
63
|
+
}
|
|
58
64
|
}
|
package/setup.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
console.log('ā
intelliFont Engine Setup');
|
|
5
|
+
console.log('---------------------------');
|
|
6
|
+
|
|
7
|
+
try {
|
|
8
|
+
const binaryPath = path.join(__dirname, 'intellifont-engine.node');
|
|
9
|
+
if (fs.existsSync(binaryPath)) {
|
|
10
|
+
console.log(`[OK] Native binary found: ${binaryPath}`);
|
|
11
|
+
const stats = fs.statSync(binaryPath);
|
|
12
|
+
console.log(`[OK] Size: ${(stats.size / 1024 / 1024).toFixed(2)} MB`);
|
|
13
|
+
|
|
14
|
+
// Check for main entry point
|
|
15
|
+
const mainPath = path.join(__dirname, 'index.js');
|
|
16
|
+
if (fs.existsSync(mainPath)) {
|
|
17
|
+
console.log(`[OK] JS Entry point found: ${mainPath}`);
|
|
18
|
+
|
|
19
|
+
console.log('\nš Installation Successful!');
|
|
20
|
+
console.log('\nUsage Examples:');
|
|
21
|
+
console.log(' const { identify_visual_font } = require("intellifont-engine");');
|
|
22
|
+
console.log(' // See README.md for full API documentation');
|
|
23
|
+
} else {
|
|
24
|
+
console.warn('ā ļø Warning: index.js not found');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
} else {
|
|
28
|
+
console.error('ā Error: Native binary not found. Build may have failed.');
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
} catch (e) {
|
|
32
|
+
console.error('ā Setup failed:', e);
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|