harfbuzzjs 0.10.3 → 1.0.0-beta.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/LICENSE +1 -4
- package/README.md +41 -48
- package/dist/harfbuzz-subset.wasm +0 -0
- package/dist/harfbuzz.d.ts +4 -0
- package/dist/harfbuzz.js +2 -0
- package/{hb.wasm → dist/harfbuzz.wasm} +0 -0
- package/dist/index.d.mts +610 -0
- package/dist/index.mjs +1237 -0
- package/package.json +50 -37
- package/Makefile +0 -70
- package/config-override-subset.h +0 -7
- package/config-override.h +0 -14
- package/em.runtime +0 -12
- package/examples/hb-subset.example.node.js +0 -66
- package/examples/hbjs.example.html +0 -16
- package/examples/hbjs.example.js +0 -37
- package/examples/hbjs.example.node.js +0 -8
- package/examples/nohbjs.html +0 -64
- package/hb-subset.symbols +0 -34
- package/hb-subset.wasm +0 -0
- package/hb.js +0 -2
- package/hb.symbols +0 -96
- package/hbjs.js +0 -1463
- package/index.js +0 -8
- package/logo.png +0 -0
- package/test/fonts/noto/NotoSans-Regular.otf +0 -0
- package/test/fonts/noto/NotoSans-Regular.ttf +0 -0
- package/test/fonts/noto/NotoSansArabic-Variable.ttf +0 -0
- package/test/fonts/noto/NotoSansDevanagari-Regular.otf +0 -0
- package/test/fonts/noto/OFL.txt +0 -93
- package/test/index.js +0 -1040
package/package.json
CHANGED
|
@@ -1,38 +1,51 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
2
|
+
"name": "harfbuzzjs",
|
|
3
|
+
"version": "1.0.0-beta.1",
|
|
4
|
+
"description": "Minimal version of HarfBuzz for JavaScript use",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.mts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.mts",
|
|
11
|
+
"default": "./dist/index.mjs"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"prepublishOnly": "make",
|
|
19
|
+
"test": "make test"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"harfbuzz",
|
|
23
|
+
"opentype",
|
|
24
|
+
"truetype",
|
|
25
|
+
"ttf",
|
|
26
|
+
"otf",
|
|
27
|
+
"graphics",
|
|
28
|
+
"complex scripts",
|
|
29
|
+
"typography",
|
|
30
|
+
"font rendering",
|
|
31
|
+
"font",
|
|
32
|
+
"fonts",
|
|
33
|
+
"emoji"
|
|
34
|
+
],
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/harfbuzz/harfbuzzjs.git"
|
|
38
|
+
},
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"bugs": "https://github.com/harfbuzz/harfbuzzjs/issues",
|
|
41
|
+
"homepage": "https://harfbuzz.github.io/harfbuzzjs",
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@types/emscripten": "^1.41.5",
|
|
44
|
+
"@types/node": "^25.5.0",
|
|
45
|
+
"vitest": "^4.1.2",
|
|
46
|
+
"tsdown": "^0.21.7",
|
|
47
|
+
"typedoc": "^0.28.18",
|
|
48
|
+
"typescript": "^6.0.2",
|
|
49
|
+
"prettier": "^3.8.3"
|
|
50
|
+
}
|
|
51
|
+
}
|
package/Makefile
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
MAKEFLAGS += -s
|
|
2
|
-
|
|
3
|
-
CXX = em++
|
|
4
|
-
|
|
5
|
-
COMMON_CXXFLAGS = \
|
|
6
|
-
-std=c++11 \
|
|
7
|
-
-fno-exceptions \
|
|
8
|
-
-fno-rtti \
|
|
9
|
-
-fno-threadsafe-statics \
|
|
10
|
-
-fvisibility-inlines-hidden \
|
|
11
|
-
-Oz \
|
|
12
|
-
-I. \
|
|
13
|
-
-DHB_TINY \
|
|
14
|
-
-DHB_USE_INTERNAL_QSORT \
|
|
15
|
-
-DHB_EXPERIMENTAL_API
|
|
16
|
-
|
|
17
|
-
HB_CXXFLAGS = \
|
|
18
|
-
$(COMMON_CXXFLAGS) \
|
|
19
|
-
-flto \
|
|
20
|
-
-DHB_CONFIG_OVERRIDE_H=\"config-override.h\"
|
|
21
|
-
|
|
22
|
-
HB_LDFLAGS = \
|
|
23
|
-
--no-entry \
|
|
24
|
-
-s MODULARIZE \
|
|
25
|
-
-s EXPORT_NAME=createHarfBuzz \
|
|
26
|
-
-s EXPORTED_FUNCTIONS=@hb.symbols \
|
|
27
|
-
-s EXPORTED_RUNTIME_METHODS=@em.runtime \
|
|
28
|
-
-s INITIAL_MEMORY=256KB \
|
|
29
|
-
-s ALLOW_MEMORY_GROWTH \
|
|
30
|
-
-s ALLOW_TABLE_GROWTH \
|
|
31
|
-
-lexports.js
|
|
32
|
-
|
|
33
|
-
HB_SRCS = harfbuzz/src/harfbuzz.cc
|
|
34
|
-
HB_DEPS = config-override.h hb.symbols em.runtime
|
|
35
|
-
HB_TARGET = hb.js
|
|
36
|
-
|
|
37
|
-
HB_SUBSET_CXXFLAGS = \
|
|
38
|
-
$(COMMON_CXXFLAGS) \
|
|
39
|
-
-DHB_CONFIG_OVERRIDE_H=\"config-override-subset.h\"
|
|
40
|
-
|
|
41
|
-
HB_SUBSET_LDFLAGS = \
|
|
42
|
-
--no-entry \
|
|
43
|
-
-s EXPORTED_FUNCTIONS=@hb-subset.symbols \
|
|
44
|
-
-s INITIAL_MEMORY=65MB
|
|
45
|
-
|
|
46
|
-
HB_SUBSET_SRCS = harfbuzz/src/harfbuzz-subset.cc
|
|
47
|
-
HB_SUBSET_DEPS = config-override-subset.h hb-subset.symbols
|
|
48
|
-
HB_SUBSET_TARGET = hb-subset.wasm
|
|
49
|
-
|
|
50
|
-
.PHONY: all clean hb hb-subset test
|
|
51
|
-
|
|
52
|
-
all: hb hb-subset
|
|
53
|
-
|
|
54
|
-
hb: $(HB_TARGET)
|
|
55
|
-
|
|
56
|
-
hb-subset: $(HB_SUBSET_TARGET)
|
|
57
|
-
|
|
58
|
-
test: all
|
|
59
|
-
npx mocha test/index.js
|
|
60
|
-
|
|
61
|
-
$(HB_TARGET): $(HB_SRCS) $(HB_DEPS)
|
|
62
|
-
echo " CXX $@"
|
|
63
|
-
$(CXX) $(HB_CXXFLAGS) $(HB_LDFLAGS) -o $@ $(HB_SRCS)
|
|
64
|
-
|
|
65
|
-
$(HB_SUBSET_TARGET): $(HB_SUBSET_SRCS) $(HB_SUBSET_DEPS)
|
|
66
|
-
echo " CXX $@"
|
|
67
|
-
$(CXX) $(HB_SUBSET_CXXFLAGS) $(HB_SUBSET_LDFLAGS) -o $@ $(HB_SUBSET_SRCS)
|
|
68
|
-
|
|
69
|
-
clean:
|
|
70
|
-
rm -f $(HB_TARGET) $(HB_SUBSET_TARGET) hb.wasm
|
package/config-override-subset.h
DELETED
package/config-override.h
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#undef HB_NO_CFF
|
|
2
|
-
#undef HB_NO_OT_FONT_CFF
|
|
3
|
-
#undef HB_NO_DRAW
|
|
4
|
-
#undef HB_NO_BUFFER_MESSAGE
|
|
5
|
-
#undef HB_NO_BUFFER_SERIALIZE
|
|
6
|
-
#undef HB_NO_VAR
|
|
7
|
-
#undef HB_NO_OT_FONT_GLYPH_NAMES
|
|
8
|
-
#undef HB_NO_FACE_COLLECT_UNICODES
|
|
9
|
-
#undef HB_NO_AVAR2
|
|
10
|
-
#undef HB_NO_CUBIC_GLYF
|
|
11
|
-
#undef HB_NO_VAR_COMPOSITES
|
|
12
|
-
#undef HB_NO_NAME
|
|
13
|
-
#undef HB_NO_LAYOUT_FEATURE_PARAMS
|
|
14
|
-
#define HB_BUFFER_MESSAGE_MORE 1
|
package/em.runtime
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
// Based on https://github.com/harfbuzz/harfbuzzjs/issues/9#issuecomment-507874962
|
|
2
|
-
// Which was based on https://github.com/harfbuzz/harfbuzzjs/issues/9#issuecomment-507622485
|
|
3
|
-
const { readFile, writeFile } = require('fs').promises;
|
|
4
|
-
const { join, extname, basename } = require('path');
|
|
5
|
-
const { performance } = require('node:perf_hooks');
|
|
6
|
-
|
|
7
|
-
const SUBSET_TEXT = 'abc';
|
|
8
|
-
|
|
9
|
-
(async () => {
|
|
10
|
-
const { instance: { exports } } = await WebAssembly.instantiate(await readFile(join(__dirname, '../hb-subset.wasm')));
|
|
11
|
-
const fileName = 'NotoSans-Regular.ttf';
|
|
12
|
-
const fontBlob = await readFile(join(__dirname, '../test/fonts/noto', fileName));
|
|
13
|
-
|
|
14
|
-
const t = performance.now();
|
|
15
|
-
const heapu8 = new Uint8Array(exports.memory.buffer);
|
|
16
|
-
const fontBuffer = exports.malloc(fontBlob.byteLength);
|
|
17
|
-
heapu8.set(new Uint8Array(fontBlob), fontBuffer);
|
|
18
|
-
|
|
19
|
-
/* Creating a face */
|
|
20
|
-
const blob = exports.hb_blob_create(fontBuffer, fontBlob.byteLength, 2/*HB_MEMORY_MODE_WRITABLE*/, 0, 0);
|
|
21
|
-
const face = exports.hb_face_create(blob, 0);
|
|
22
|
-
exports.hb_blob_destroy(blob);
|
|
23
|
-
|
|
24
|
-
/* Add your glyph indices here and subset */
|
|
25
|
-
const input = exports.hb_subset_input_create_or_fail();
|
|
26
|
-
const unicode_set = exports.hb_subset_input_unicode_set(input);
|
|
27
|
-
for (const text of SUBSET_TEXT) {
|
|
28
|
-
exports.hb_set_add(unicode_set, text.codePointAt(0));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// exports.hb_subset_input_set_drop_hints(input, true);
|
|
32
|
-
const subset = exports.hb_subset_or_fail(face, input);
|
|
33
|
-
|
|
34
|
-
/* Clean up */
|
|
35
|
-
exports.hb_subset_input_destroy(input);
|
|
36
|
-
|
|
37
|
-
/* Get result blob */
|
|
38
|
-
const resultBlob = exports.hb_face_reference_blob(subset);
|
|
39
|
-
|
|
40
|
-
const offset = exports.hb_blob_get_data(resultBlob, 0);
|
|
41
|
-
const subsetByteLength = exports.hb_blob_get_length(resultBlob);
|
|
42
|
-
if (subsetByteLength === 0) {
|
|
43
|
-
exports.hb_blob_destroy(resultBlob);
|
|
44
|
-
exports.hb_face_destroy(subset);
|
|
45
|
-
exports.hb_face_destroy(face);
|
|
46
|
-
exports.free(fontBuffer);
|
|
47
|
-
throw new Error(
|
|
48
|
-
'Failed to create subset font, maybe the input file is corrupted?'
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// Output font data(Uint8Array)
|
|
53
|
-
const subsetFontBlob = heapu8.subarray(offset, offset + exports.hb_blob_get_length(resultBlob));
|
|
54
|
-
console.info('✨ Subset done in', performance.now() - t, 'ms');
|
|
55
|
-
|
|
56
|
-
const extName = extname(fileName).toLowerCase();
|
|
57
|
-
const fontName = basename(fileName, extName);
|
|
58
|
-
await writeFile(join(__dirname, '/', `${fontName}.subset${extName}`), subsetFontBlob);
|
|
59
|
-
console.info(`Wrote subset to: ${__dirname}/${fontName}.subset${extName}`);
|
|
60
|
-
|
|
61
|
-
/* Clean up */
|
|
62
|
-
exports.hb_blob_destroy(resultBlob);
|
|
63
|
-
exports.hb_face_destroy(subset);
|
|
64
|
-
exports.hb_face_destroy(face);
|
|
65
|
-
exports.free(fontBuffer);
|
|
66
|
-
})();
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<script src="../hb.js"></script>
|
|
2
|
-
<script src="../hbjs.js"></script>
|
|
3
|
-
<script src="hbjs.example.js"></script>
|
|
4
|
-
<script>
|
|
5
|
-
|
|
6
|
-
let harfBuzzModule; // not really needed with the hbjs wrapper
|
|
7
|
-
createHarfBuzz().then(hbmodule=>{
|
|
8
|
-
harfBuzzModule = hbmodule;
|
|
9
|
-
fetch('../test/fonts/noto/NotoSans-Regular.ttf').then(function (x) {
|
|
10
|
-
return x.arrayBuffer();
|
|
11
|
-
}).then(function (blob) {
|
|
12
|
-
document.body.innerText = JSON.stringify(example(hbjs(hbmodule), new Uint8Array(blob)), undefined, 2);
|
|
13
|
-
document.body.style.whiteSpace = 'pre';
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
</script>
|
package/examples/hbjs.example.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
function example(hb, fontBlob, text) {
|
|
2
|
-
var blob = hb.createBlob(fontBlob);
|
|
3
|
-
var face = hb.createFace(blob, 0);
|
|
4
|
-
// console.log(face.getAxisInfos());
|
|
5
|
-
var font = hb.createFont(face);
|
|
6
|
-
// font.setVariations({ wdth: 200, wght: 700 });
|
|
7
|
-
font.setScale(1000, 1000); // Optional, if not given will be in font upem
|
|
8
|
-
|
|
9
|
-
var buffer = hb.createBuffer();
|
|
10
|
-
buffer.addText(text || 'abc');
|
|
11
|
-
buffer.guessSegmentProperties();
|
|
12
|
-
// buffer.setDirection('ltr'); // optional as can be set by guessSegmentProperties also
|
|
13
|
-
hb.shape(font, buffer); // features are not supported yet
|
|
14
|
-
var result = buffer.json(font);
|
|
15
|
-
|
|
16
|
-
// returns glyphs paths, totally optional
|
|
17
|
-
var glyphs = {};
|
|
18
|
-
result.forEach(function (x) {
|
|
19
|
-
if (glyphs[x.g]) return;
|
|
20
|
-
glyphs[x.g] = {
|
|
21
|
-
name: font.glyphName(x.g),
|
|
22
|
-
path: font.glyphToPath(x.g),
|
|
23
|
-
json: font.glyphToJson(x.g)
|
|
24
|
-
};
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
var unicodes = face.collectUnicodes()
|
|
28
|
-
|
|
29
|
-
buffer.destroy();
|
|
30
|
-
font.destroy();
|
|
31
|
-
face.destroy();
|
|
32
|
-
blob.destroy();
|
|
33
|
-
return { shape: result, glyphs: glyphs, unicodes: unicodes };
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Should be replaced with something more reliable
|
|
37
|
-
try { module.exports = example; } catch (e) { }
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
var fs = require('fs');
|
|
2
|
-
var path = require('path');
|
|
3
|
-
var example = require('./hbjs.example.js');
|
|
4
|
-
|
|
5
|
-
require('../').then(function (hbjs) {
|
|
6
|
-
console.log(example(hbjs, new Uint8Array(fs.readFileSync(path.resolve(__dirname, '../test/fonts/noto/NotoSans-Regular.ttf')))));
|
|
7
|
-
console.log(example(hbjs, new Uint8Array(fs.readFileSync(path.resolve(__dirname, '../test/fonts/noto/NotoSansArabic-Variable.ttf'))), "أبجد"));
|
|
8
|
-
}, console.log);
|
package/examples/nohbjs.html
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<script src="../hb.js"></script>
|
|
3
|
-
<script>
|
|
4
|
-
var utf8Encoder = new TextEncoder("utf8");
|
|
5
|
-
|
|
6
|
-
let harfBuzzModule;
|
|
7
|
-
createHarfBuzz().then(hbmodule=>{
|
|
8
|
-
harfBuzzModule = hbmodule;
|
|
9
|
-
var exports = hbmodule.wasmExports;
|
|
10
|
-
|
|
11
|
-
fetch('../test/fonts/noto/NotoSans-Regular.ttf').then(function (x) {
|
|
12
|
-
return x.arrayBuffer();
|
|
13
|
-
}).then(function (fontBlob) {
|
|
14
|
-
var heapu8 = new Uint8Array(exports.memory.buffer);
|
|
15
|
-
var heapu32 = new Uint32Array(exports.memory.buffer);
|
|
16
|
-
var heapi32 = new Int32Array(exports.memory.buffer);
|
|
17
|
-
|
|
18
|
-
var fontBuffer = exports.malloc(fontBlob.byteLength);
|
|
19
|
-
heapu8.set(new Uint8Array(fontBlob), fontBuffer);
|
|
20
|
-
|
|
21
|
-
var blob = exports.hb_blob_create(fontBuffer, fontBlob.byteLength, 2/*HB_MEMORY_MODE_WRITABLE*/, 0, 0);
|
|
22
|
-
var face = exports.hb_face_create(blob, 0);
|
|
23
|
-
var font = exports.hb_font_create(face);
|
|
24
|
-
|
|
25
|
-
var buffer = exports.hb_buffer_create();
|
|
26
|
-
{
|
|
27
|
-
var text = utf8Encoder.encode('abc');
|
|
28
|
-
var text_ptr = exports.malloc(text.byteLength);
|
|
29
|
-
heapu8.set(text, text_ptr);
|
|
30
|
-
exports.hb_buffer_add_utf8(buffer, text_ptr, text.byteLength, 0, -1);
|
|
31
|
-
exports.free(text_ptr);
|
|
32
|
-
}
|
|
33
|
-
exports.hb_buffer_guess_segment_properties(buffer);
|
|
34
|
-
// exports.hb_buffer_set_direction(5); 4: ltr, 5: rtl, 6: ttb. 7: btt
|
|
35
|
-
|
|
36
|
-
exports.hb_shape(font, buffer, 0, 0);
|
|
37
|
-
|
|
38
|
-
var length = exports.hb_buffer_get_length(buffer);
|
|
39
|
-
var result = [];
|
|
40
|
-
var infosPtr32 = exports.hb_buffer_get_glyph_infos(buffer, 0) / 4;
|
|
41
|
-
var positionsPtr32 = exports.hb_buffer_get_glyph_positions(buffer, 0) / 4;
|
|
42
|
-
var infos = heapu32.subarray(infosPtr32, infosPtr32 + 5 * length);
|
|
43
|
-
var positions = heapi32.subarray(positionsPtr32, positionsPtr32 + 5 * length);
|
|
44
|
-
for (var i = 0; i < length; ++i) {
|
|
45
|
-
result.push({
|
|
46
|
-
g: infos[i * 5 + 0],
|
|
47
|
-
cl: infos[i * 5 + 2],
|
|
48
|
-
ax: positions[i * 5 + 0],
|
|
49
|
-
ay: positions[i * 5 + 1],
|
|
50
|
-
dx: positions[i * 5 + 2],
|
|
51
|
-
dy: positions[i * 5 + 3]
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
exports.hb_buffer_destroy(buffer);
|
|
56
|
-
exports.hb_font_destroy(font);
|
|
57
|
-
exports.hb_face_destroy(face);
|
|
58
|
-
exports.hb_blob_create(blob);
|
|
59
|
-
exports.free(fontBuffer);
|
|
60
|
-
|
|
61
|
-
document.body.innerText = JSON.stringify(result);
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
</script>
|
package/hb-subset.symbols
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
_hb_blob_create
|
|
2
|
-
_hb_blob_destroy
|
|
3
|
-
_hb_blob_get_data
|
|
4
|
-
_hb_blob_get_length
|
|
5
|
-
_hb_face_create
|
|
6
|
-
_hb_face_destroy
|
|
7
|
-
_hb_face_get_empty
|
|
8
|
-
_hb_face_reference_blob
|
|
9
|
-
_hb_set_add
|
|
10
|
-
_hb_set_clear
|
|
11
|
-
_hb_set_create
|
|
12
|
-
_hb_set_del
|
|
13
|
-
_hb_set_destroy
|
|
14
|
-
_hb_set_invert
|
|
15
|
-
_hb_set_union
|
|
16
|
-
_hb_subset_input_create_or_fail
|
|
17
|
-
_hb_subset_input_destroy
|
|
18
|
-
_hb_subset_input_get_flags
|
|
19
|
-
_hb_subset_input_get_user_data
|
|
20
|
-
_hb_subset_input_glyph_set
|
|
21
|
-
_hb_subset_input_pin_all_axes_to_default
|
|
22
|
-
_hb_subset_input_pin_axis_location
|
|
23
|
-
_hb_subset_input_pin_axis_to_default
|
|
24
|
-
_hb_subset_input_reference
|
|
25
|
-
_hb_subset_input_set
|
|
26
|
-
_hb_subset_input_set_axis_range
|
|
27
|
-
_hb_subset_input_set_flags
|
|
28
|
-
_hb_subset_input_set_user_data
|
|
29
|
-
_hb_subset_input_unicode_set
|
|
30
|
-
_hb_subset_input_keep_everything
|
|
31
|
-
_hb_subset_or_fail
|
|
32
|
-
_hb_subset_preprocess
|
|
33
|
-
_malloc
|
|
34
|
-
_free
|
package/hb-subset.wasm
DELETED
|
Binary file
|
package/hb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var createHarfBuzz=(()=>{var _scriptName=typeof document!="undefined"?document.currentScript?.src:undefined;return async function(moduleArg={}){var moduleRtn;var Module=moduleArg;var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof WorkerGlobalScope!="undefined";var ENVIRONMENT_IS_NODE=typeof process=="object"&&process.versions?.node&&process.type!="renderer";var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};if(typeof __filename!="undefined"){_scriptName=__filename}else if(ENVIRONMENT_IS_WORKER){_scriptName=self.location.href}var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("fs");scriptDirectory=__dirname+"/";readBinary=filename=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename);return ret};readAsync=async(filename,binary=true)=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename,binary?undefined:"utf8");return ret};if(process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{scriptDirectory=new URL(".",_scriptName).href}catch{}{if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=async url=>{if(isFileURI(url)){return new Promise((resolve,reject)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){resolve(xhr.response);return}reject(xhr.status)};xhr.onerror=reject;xhr.send(null)})}var response=await fetch(url,{credentials:"same-origin"});if(response.ok){return response.arrayBuffer()}throw new Error(response.status+" : "+response.url)}}}else{}var out=console.log.bind(console);var err=console.error.bind(console);var wasmBinary;var ABORT=false;var EXITSTATUS;var isFileURI=filename=>filename.startsWith("file://");var readyPromiseResolve,readyPromiseReject;var wasmMemory;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;var HEAP64,HEAPU64;var runtimeInitialized=false;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);HEAP16=new Int16Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);HEAPF64=new Float64Array(b);HEAP64=new BigInt64Array(b);HEAPU64=new BigUint64Array(b)}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(onPreRuns)}function initRuntime(){runtimeInitialized=true;wasmExports["__wasm_call_ctors"]()}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(onPostRuns)}var runDependencies=0;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;Module["monitorRunDependencies"]?.(runDependencies)}function removeRunDependency(id){runDependencies--;Module["monitorRunDependencies"]?.(runDependencies);if(runDependencies==0){if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){Module["onAbort"]?.(what);what="Aborted("+what+")";err(what);ABORT=true;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject?.(e);throw e}var wasmBinaryFile;function findWasmBinary(){return locateFile("hb.wasm")}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}async function getWasmBinary(binaryFile){if(!wasmBinary){try{var response=await readAsync(binaryFile);return new Uint8Array(response)}catch{}}return getBinarySync(binaryFile)}async function instantiateArrayBuffer(binaryFile,imports){try{var binary=await getWasmBinary(binaryFile);var instance=await WebAssembly.instantiate(binary,imports);return instance}catch(reason){err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)}}async function instantiateAsync(binary,binaryFile,imports){if(!binary&&!isFileURI(binaryFile)&&!ENVIRONMENT_IS_NODE){try{var response=fetch(binaryFile,{credentials:"same-origin"});var instantiationResult=await WebAssembly.instantiateStreaming(response,imports);return instantiationResult}catch(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation")}}return instantiateArrayBuffer(binaryFile,imports)}function getWasmImports(){return{env:wasmImports,wasi_snapshot_preview1:wasmImports}}async function createWasm(){function receiveInstance(instance,module){wasmExports=instance.exports;Module["wasmExports"]=wasmExports;wasmMemory=wasmExports["memory"];updateMemoryViews();wasmTable=wasmExports["__indirect_function_table"];assignWasmExports(wasmExports);removeRunDependency("wasm-instantiate");return wasmExports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){return receiveInstance(result["instance"])}var info=getWasmImports();if(Module["instantiateWasm"]){return new Promise((resolve,reject)=>{Module["instantiateWasm"](info,(mod,inst)=>{resolve(receiveInstance(mod,inst))})})}wasmBinaryFile??=findWasmBinary();var result=await instantiateAsync(wasmBinary,wasmBinaryFile,info);var exports=receiveInstantiationResult(result);return exports}class ExitStatus{name="ExitStatus";constructor(status){this.message=`Program terminated with exit(${status})`;this.status=status}}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var onPostRuns=[];var addOnPostRun=cb=>onPostRuns.push(cb);var onPreRuns=[];var addOnPreRun=cb=>onPreRuns.push(cb);var noExitRuntime=true;var stackRestore=val=>__emscripten_stack_restore(val);var stackSave=()=>_emscripten_stack_get_current();var __abort_js=()=>abort("");var runtimeKeepaliveCounter=0;var __emscripten_runtime_keepalive_clear=()=>{noExitRuntime=false;runtimeKeepaliveCounter=0};var timers={};var handleException=e=>{if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}quit_(1,e)};var keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0;var _proc_exit=code=>{EXITSTATUS=code;if(!keepRuntimeAlive()){Module["onExit"]?.(code);ABORT=true}quit_(code,new ExitStatus(code))};var exitJS=(status,implicit)=>{EXITSTATUS=status;_proc_exit(status)};var _exit=exitJS;var maybeExit=()=>{if(!keepRuntimeAlive()){try{_exit(EXITSTATUS)}catch(e){handleException(e)}}};var callUserCallback=func=>{if(ABORT){return}try{func();maybeExit()}catch(e){handleException(e)}};var _emscripten_get_now=()=>performance.now();var __setitimer_js=(which,timeout_ms)=>{if(timers[which]){clearTimeout(timers[which].id);delete timers[which]}if(!timeout_ms)return 0;var id=setTimeout(()=>{delete timers[which];callUserCallback(()=>__emscripten_timeout(which,_emscripten_get_now()))},timeout_ms);timers[which]={id,timeout_ms};return 0};var getHeapMax=()=>2147483648;var alignMemory=(size,alignment)=>Math.ceil(size/alignment)*alignment;var growMemory=size=>{var oldHeapSize=wasmMemory.buffer.byteLength;var pages=(size-oldHeapSize+65535)/65536|0;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignMemory(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};var uleb128EncodeWithLen=arr=>{const n=arr.length;return[n%128|128,n>>7,...arr]};var wasmTypeCodes={i:127,p:127,j:126,f:125,d:124,e:111};var generateTypePack=types=>uleb128EncodeWithLen(Array.from(types,type=>{var code=wasmTypeCodes[type];return code}));var convertJsFunctionToWasm=(func,sig)=>{var bytes=Uint8Array.of(0,97,115,109,1,0,0,0,1,...uleb128EncodeWithLen([1,96,...generateTypePack(sig.slice(1)),...generateTypePack(sig[0]==="v"?"":sig[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var module=new WebAssembly.Module(bytes);var instance=new WebAssembly.Instance(module,{e:{f:func}});var wrappedFunc=instance.exports["f"];return wrappedFunc};var wasmTable;var getWasmTableEntry=funcPtr=>wasmTable.get(funcPtr);var updateTableMap=(offset,count)=>{if(functionsInTableMap){for(var i=offset;i<offset+count;i++){var item=getWasmTableEntry(i);if(item){functionsInTableMap.set(item,i)}}}};var functionsInTableMap;var getFunctionAddress=func=>{if(!functionsInTableMap){functionsInTableMap=new WeakMap;updateTableMap(0,wasmTable.length)}return functionsInTableMap.get(func)||0};var freeTableIndexes=[];var getEmptyTableSlot=()=>{if(freeTableIndexes.length){return freeTableIndexes.pop()}return wasmTable["grow"](1)};var setWasmTableEntry=(idx,func)=>wasmTable.set(idx,func);var addFunction=(func,sig)=>{var rtn=getFunctionAddress(func);if(rtn){return rtn}var ret=getEmptyTableSlot();try{setWasmTableEntry(ret,func)}catch(err){if(!(err instanceof TypeError)){throw err}var wrapped=convertJsFunctionToWasm(func,sig);setWasmTableEntry(ret,wrapped)}functionsInTableMap.set(func,ret);return ret};var removeFunction=index=>{functionsInTableMap.delete(getWasmTableEntry(index));setWasmTableEntry(index,null);freeTableIndexes.push(index)};var stackAlloc=sz=>__emscripten_stack_alloc(sz);{if(Module["noExitRuntime"])noExitRuntime=Module["noExitRuntime"];if(Module["print"])out=Module["print"];if(Module["printErr"])err=Module["printErr"];if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"]}Module["wasmExports"]=wasmExports;Module["stackSave"]=stackSave;Module["stackRestore"]=stackRestore;Module["stackAlloc"]=stackAlloc;Module["addFunction"]=addFunction;Module["removeFunction"]=removeFunction;var _hb_blob_create,_hb_blob_destroy,_hb_blob_get_length,_hb_blob_get_data,_hb_buffer_serialize,_hb_buffer_create,_hb_buffer_reset,_hb_buffer_reference,_hb_buffer_destroy,_hb_buffer_get_content_type,_hb_buffer_set_direction,_hb_buffer_set_script,_hb_buffer_set_language,_hb_buffer_set_flags,_hb_buffer_set_cluster_level,_hb_buffer_clear_contents,_hb_buffer_get_length,_hb_buffer_get_glyph_infos,_hb_buffer_get_glyph_positions,_hb_glyph_info_get_glyph_flags,_hb_buffer_guess_segment_properties,_hb_buffer_add_utf8,_hb_buffer_add_utf16,_hb_buffer_add_codepoints,_hb_buffer_set_message_func,_hb_language_from_string,_hb_language_to_string,_hb_script_from_string,_hb_version,_hb_version_string,_hb_feature_from_string,_malloc,_free,_hb_draw_funcs_set_move_to_func,_hb_draw_funcs_set_line_to_func,_hb_draw_funcs_set_quadratic_to_func,_hb_draw_funcs_set_cubic_to_func,_hb_draw_funcs_set_close_path_func,_hb_draw_funcs_create,_hb_draw_funcs_destroy,_hb_face_create,_hb_face_destroy,_hb_face_reference_table,_hb_face_get_upem,_hb_face_collect_unicodes,_hb_font_funcs_create,_hb_font_funcs_destroy,_hb_font_funcs_set_font_h_extents_func,_hb_font_funcs_set_font_v_extents_func,_hb_font_funcs_set_nominal_glyph_func,_hb_font_funcs_set_nominal_glyphs_func,_hb_font_funcs_set_variation_glyph_func,_hb_font_funcs_set_glyph_h_advance_func,_hb_font_funcs_set_glyph_v_advance_func,_hb_font_funcs_set_glyph_h_advances_func,_hb_font_funcs_set_glyph_v_advances_func,_hb_font_funcs_set_glyph_h_origin_func,_hb_font_funcs_set_glyph_v_origin_func,_hb_font_funcs_set_glyph_h_kerning_func,_hb_font_funcs_set_glyph_extents_func,_hb_font_funcs_set_glyph_name_func,_hb_font_funcs_set_glyph_from_name_func,_hb_font_get_h_extents,_hb_font_get_v_extents,_hb_font_get_glyph_h_advance,_hb_font_get_glyph_v_advance,_hb_font_get_glyph_h_origin,_hb_font_get_glyph_v_origin,_hb_font_get_glyph_extents,_hb_font_get_glyph_from_name,_hb_font_draw_glyph,_hb_font_glyph_to_string,_hb_font_create,_hb_font_set_variations,_hb_font_create_sub_font,_hb_font_reference,_hb_font_destroy,_hb_font_set_funcs,_hb_font_set_scale,_hb_ot_layout_get_glyph_class,_hb_ot_layout_table_get_script_tags,_hb_ot_layout_table_get_feature_tags,_hb_ot_layout_script_get_language_tags,_hb_ot_layout_language_get_feature_tags,_hb_ot_layout_feature_get_name_ids,_hb_ot_name_list_names,_hb_ot_name_get_utf16,_hb_set_create,_hb_set_destroy,_hb_ot_tag_to_script,_hb_ot_tag_to_language,_hb_ot_var_get_axis_infos,_hb_set_get_population,_hb_set_next_many,_hb_shape,__emscripten_timeout,__emscripten_stack_restore,__emscripten_stack_alloc,_emscripten_stack_get_current;function assignWasmExports(wasmExports){Module["_hb_blob_create"]=_hb_blob_create=wasmExports["hb_blob_create"];Module["_hb_blob_destroy"]=_hb_blob_destroy=wasmExports["hb_blob_destroy"];Module["_hb_blob_get_length"]=_hb_blob_get_length=wasmExports["hb_blob_get_length"];Module["_hb_blob_get_data"]=_hb_blob_get_data=wasmExports["hb_blob_get_data"];Module["_hb_buffer_serialize"]=_hb_buffer_serialize=wasmExports["hb_buffer_serialize"];Module["_hb_buffer_create"]=_hb_buffer_create=wasmExports["hb_buffer_create"];Module["_hb_buffer_reset"]=_hb_buffer_reset=wasmExports["hb_buffer_reset"];Module["_hb_buffer_reference"]=_hb_buffer_reference=wasmExports["hb_buffer_reference"];Module["_hb_buffer_destroy"]=_hb_buffer_destroy=wasmExports["hb_buffer_destroy"];Module["_hb_buffer_get_content_type"]=_hb_buffer_get_content_type=wasmExports["hb_buffer_get_content_type"];Module["_hb_buffer_set_direction"]=_hb_buffer_set_direction=wasmExports["hb_buffer_set_direction"];Module["_hb_buffer_set_script"]=_hb_buffer_set_script=wasmExports["hb_buffer_set_script"];Module["_hb_buffer_set_language"]=_hb_buffer_set_language=wasmExports["hb_buffer_set_language"];Module["_hb_buffer_set_flags"]=_hb_buffer_set_flags=wasmExports["hb_buffer_set_flags"];Module["_hb_buffer_set_cluster_level"]=_hb_buffer_set_cluster_level=wasmExports["hb_buffer_set_cluster_level"];Module["_hb_buffer_clear_contents"]=_hb_buffer_clear_contents=wasmExports["hb_buffer_clear_contents"];Module["_hb_buffer_get_length"]=_hb_buffer_get_length=wasmExports["hb_buffer_get_length"];Module["_hb_buffer_get_glyph_infos"]=_hb_buffer_get_glyph_infos=wasmExports["hb_buffer_get_glyph_infos"];Module["_hb_buffer_get_glyph_positions"]=_hb_buffer_get_glyph_positions=wasmExports["hb_buffer_get_glyph_positions"];Module["_hb_glyph_info_get_glyph_flags"]=_hb_glyph_info_get_glyph_flags=wasmExports["hb_glyph_info_get_glyph_flags"];Module["_hb_buffer_guess_segment_properties"]=_hb_buffer_guess_segment_properties=wasmExports["hb_buffer_guess_segment_properties"];Module["_hb_buffer_add_utf8"]=_hb_buffer_add_utf8=wasmExports["hb_buffer_add_utf8"];Module["_hb_buffer_add_utf16"]=_hb_buffer_add_utf16=wasmExports["hb_buffer_add_utf16"];Module["_hb_buffer_add_codepoints"]=_hb_buffer_add_codepoints=wasmExports["hb_buffer_add_codepoints"];Module["_hb_buffer_set_message_func"]=_hb_buffer_set_message_func=wasmExports["hb_buffer_set_message_func"];Module["_hb_language_from_string"]=_hb_language_from_string=wasmExports["hb_language_from_string"];Module["_hb_language_to_string"]=_hb_language_to_string=wasmExports["hb_language_to_string"];Module["_hb_script_from_string"]=_hb_script_from_string=wasmExports["hb_script_from_string"];Module["_hb_version"]=_hb_version=wasmExports["hb_version"];Module["_hb_version_string"]=_hb_version_string=wasmExports["hb_version_string"];Module["_hb_feature_from_string"]=_hb_feature_from_string=wasmExports["hb_feature_from_string"];Module["_malloc"]=_malloc=wasmExports["malloc"];Module["_free"]=_free=wasmExports["free"];Module["_hb_draw_funcs_set_move_to_func"]=_hb_draw_funcs_set_move_to_func=wasmExports["hb_draw_funcs_set_move_to_func"];Module["_hb_draw_funcs_set_line_to_func"]=_hb_draw_funcs_set_line_to_func=wasmExports["hb_draw_funcs_set_line_to_func"];Module["_hb_draw_funcs_set_quadratic_to_func"]=_hb_draw_funcs_set_quadratic_to_func=wasmExports["hb_draw_funcs_set_quadratic_to_func"];Module["_hb_draw_funcs_set_cubic_to_func"]=_hb_draw_funcs_set_cubic_to_func=wasmExports["hb_draw_funcs_set_cubic_to_func"];Module["_hb_draw_funcs_set_close_path_func"]=_hb_draw_funcs_set_close_path_func=wasmExports["hb_draw_funcs_set_close_path_func"];Module["_hb_draw_funcs_create"]=_hb_draw_funcs_create=wasmExports["hb_draw_funcs_create"];Module["_hb_draw_funcs_destroy"]=_hb_draw_funcs_destroy=wasmExports["hb_draw_funcs_destroy"];Module["_hb_face_create"]=_hb_face_create=wasmExports["hb_face_create"];Module["_hb_face_destroy"]=_hb_face_destroy=wasmExports["hb_face_destroy"];Module["_hb_face_reference_table"]=_hb_face_reference_table=wasmExports["hb_face_reference_table"];Module["_hb_face_get_upem"]=_hb_face_get_upem=wasmExports["hb_face_get_upem"];Module["_hb_face_collect_unicodes"]=_hb_face_collect_unicodes=wasmExports["hb_face_collect_unicodes"];Module["_hb_font_funcs_create"]=_hb_font_funcs_create=wasmExports["hb_font_funcs_create"];Module["_hb_font_funcs_destroy"]=_hb_font_funcs_destroy=wasmExports["hb_font_funcs_destroy"];Module["_hb_font_funcs_set_font_h_extents_func"]=_hb_font_funcs_set_font_h_extents_func=wasmExports["hb_font_funcs_set_font_h_extents_func"];Module["_hb_font_funcs_set_font_v_extents_func"]=_hb_font_funcs_set_font_v_extents_func=wasmExports["hb_font_funcs_set_font_v_extents_func"];Module["_hb_font_funcs_set_nominal_glyph_func"]=_hb_font_funcs_set_nominal_glyph_func=wasmExports["hb_font_funcs_set_nominal_glyph_func"];Module["_hb_font_funcs_set_nominal_glyphs_func"]=_hb_font_funcs_set_nominal_glyphs_func=wasmExports["hb_font_funcs_set_nominal_glyphs_func"];Module["_hb_font_funcs_set_variation_glyph_func"]=_hb_font_funcs_set_variation_glyph_func=wasmExports["hb_font_funcs_set_variation_glyph_func"];Module["_hb_font_funcs_set_glyph_h_advance_func"]=_hb_font_funcs_set_glyph_h_advance_func=wasmExports["hb_font_funcs_set_glyph_h_advance_func"];Module["_hb_font_funcs_set_glyph_v_advance_func"]=_hb_font_funcs_set_glyph_v_advance_func=wasmExports["hb_font_funcs_set_glyph_v_advance_func"];Module["_hb_font_funcs_set_glyph_h_advances_func"]=_hb_font_funcs_set_glyph_h_advances_func=wasmExports["hb_font_funcs_set_glyph_h_advances_func"];Module["_hb_font_funcs_set_glyph_v_advances_func"]=_hb_font_funcs_set_glyph_v_advances_func=wasmExports["hb_font_funcs_set_glyph_v_advances_func"];Module["_hb_font_funcs_set_glyph_h_origin_func"]=_hb_font_funcs_set_glyph_h_origin_func=wasmExports["hb_font_funcs_set_glyph_h_origin_func"];Module["_hb_font_funcs_set_glyph_v_origin_func"]=_hb_font_funcs_set_glyph_v_origin_func=wasmExports["hb_font_funcs_set_glyph_v_origin_func"];Module["_hb_font_funcs_set_glyph_h_kerning_func"]=_hb_font_funcs_set_glyph_h_kerning_func=wasmExports["hb_font_funcs_set_glyph_h_kerning_func"];Module["_hb_font_funcs_set_glyph_extents_func"]=_hb_font_funcs_set_glyph_extents_func=wasmExports["hb_font_funcs_set_glyph_extents_func"];Module["_hb_font_funcs_set_glyph_name_func"]=_hb_font_funcs_set_glyph_name_func=wasmExports["hb_font_funcs_set_glyph_name_func"];Module["_hb_font_funcs_set_glyph_from_name_func"]=_hb_font_funcs_set_glyph_from_name_func=wasmExports["hb_font_funcs_set_glyph_from_name_func"];Module["_hb_font_get_h_extents"]=_hb_font_get_h_extents=wasmExports["hb_font_get_h_extents"];Module["_hb_font_get_v_extents"]=_hb_font_get_v_extents=wasmExports["hb_font_get_v_extents"];Module["_hb_font_get_glyph_h_advance"]=_hb_font_get_glyph_h_advance=wasmExports["hb_font_get_glyph_h_advance"];Module["_hb_font_get_glyph_v_advance"]=_hb_font_get_glyph_v_advance=wasmExports["hb_font_get_glyph_v_advance"];Module["_hb_font_get_glyph_h_origin"]=_hb_font_get_glyph_h_origin=wasmExports["hb_font_get_glyph_h_origin"];Module["_hb_font_get_glyph_v_origin"]=_hb_font_get_glyph_v_origin=wasmExports["hb_font_get_glyph_v_origin"];Module["_hb_font_get_glyph_extents"]=_hb_font_get_glyph_extents=wasmExports["hb_font_get_glyph_extents"];Module["_hb_font_get_glyph_from_name"]=_hb_font_get_glyph_from_name=wasmExports["hb_font_get_glyph_from_name"];Module["_hb_font_draw_glyph"]=_hb_font_draw_glyph=wasmExports["hb_font_draw_glyph"];Module["_hb_font_glyph_to_string"]=_hb_font_glyph_to_string=wasmExports["hb_font_glyph_to_string"];Module["_hb_font_create"]=_hb_font_create=wasmExports["hb_font_create"];Module["_hb_font_set_variations"]=_hb_font_set_variations=wasmExports["hb_font_set_variations"];Module["_hb_font_create_sub_font"]=_hb_font_create_sub_font=wasmExports["hb_font_create_sub_font"];Module["_hb_font_reference"]=_hb_font_reference=wasmExports["hb_font_reference"];Module["_hb_font_destroy"]=_hb_font_destroy=wasmExports["hb_font_destroy"];Module["_hb_font_set_funcs"]=_hb_font_set_funcs=wasmExports["hb_font_set_funcs"];Module["_hb_font_set_scale"]=_hb_font_set_scale=wasmExports["hb_font_set_scale"];Module["_hb_ot_layout_get_glyph_class"]=_hb_ot_layout_get_glyph_class=wasmExports["hb_ot_layout_get_glyph_class"];Module["_hb_ot_layout_table_get_script_tags"]=_hb_ot_layout_table_get_script_tags=wasmExports["hb_ot_layout_table_get_script_tags"];Module["_hb_ot_layout_table_get_feature_tags"]=_hb_ot_layout_table_get_feature_tags=wasmExports["hb_ot_layout_table_get_feature_tags"];Module["_hb_ot_layout_script_get_language_tags"]=_hb_ot_layout_script_get_language_tags=wasmExports["hb_ot_layout_script_get_language_tags"];Module["_hb_ot_layout_language_get_feature_tags"]=_hb_ot_layout_language_get_feature_tags=wasmExports["hb_ot_layout_language_get_feature_tags"];Module["_hb_ot_layout_feature_get_name_ids"]=_hb_ot_layout_feature_get_name_ids=wasmExports["hb_ot_layout_feature_get_name_ids"];Module["_hb_ot_name_list_names"]=_hb_ot_name_list_names=wasmExports["hb_ot_name_list_names"];Module["_hb_ot_name_get_utf16"]=_hb_ot_name_get_utf16=wasmExports["hb_ot_name_get_utf16"];Module["_hb_set_create"]=_hb_set_create=wasmExports["hb_set_create"];Module["_hb_set_destroy"]=_hb_set_destroy=wasmExports["hb_set_destroy"];Module["_hb_ot_tag_to_script"]=_hb_ot_tag_to_script=wasmExports["hb_ot_tag_to_script"];Module["_hb_ot_tag_to_language"]=_hb_ot_tag_to_language=wasmExports["hb_ot_tag_to_language"];Module["_hb_ot_var_get_axis_infos"]=_hb_ot_var_get_axis_infos=wasmExports["hb_ot_var_get_axis_infos"];Module["_hb_set_get_population"]=_hb_set_get_population=wasmExports["hb_set_get_population"];Module["_hb_set_next_many"]=_hb_set_next_many=wasmExports["hb_set_next_many"];Module["_hb_shape"]=_hb_shape=wasmExports["hb_shape"];__emscripten_timeout=wasmExports["_emscripten_timeout"];__emscripten_stack_restore=wasmExports["_emscripten_stack_restore"];__emscripten_stack_alloc=wasmExports["_emscripten_stack_alloc"];_emscripten_stack_get_current=wasmExports["emscripten_stack_get_current"]}var wasmImports={_abort_js:__abort_js,_emscripten_runtime_keepalive_clear:__emscripten_runtime_keepalive_clear,_setitimer_js:__setitimer_js,emscripten_resize_heap:_emscripten_resize_heap,proc_exit:_proc_exit};var wasmExports=await createWasm();function run(){if(runDependencies>0){dependenciesFulfilled=run;return}preRun();if(runDependencies>0){dependenciesFulfilled=run;return}function doRun(){Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve?.(Module);Module["onRuntimeInitialized"]?.();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(()=>{setTimeout(()=>Module["setStatus"](""),1);doRun()},1)}else{doRun()}}function preInit(){if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].shift()()}}}preInit();run();if(runtimeInitialized){moduleRtn=Module}else{moduleRtn=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject})}
|
|
2
|
-
;return moduleRtn}})();if(typeof exports==="object"&&typeof module==="object"){module.exports=createHarfBuzz;module.exports.default=createHarfBuzz}else if(typeof define==="function"&&define["amd"])define([],()=>createHarfBuzz);
|
package/hb.symbols
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
_hb_blob_create
|
|
2
|
-
_hb_blob_destroy
|
|
3
|
-
_hb_blob_get_data
|
|
4
|
-
_hb_blob_get_length
|
|
5
|
-
_hb_buffer_add_utf16
|
|
6
|
-
_hb_buffer_add_utf8
|
|
7
|
-
_hb_buffer_add_codepoints
|
|
8
|
-
_hb_buffer_create
|
|
9
|
-
_hb_buffer_reference
|
|
10
|
-
_hb_buffer_destroy
|
|
11
|
-
_hb_buffer_get_glyph_infos
|
|
12
|
-
_hb_buffer_get_glyph_positions
|
|
13
|
-
_hb_buffer_get_length
|
|
14
|
-
_hb_buffer_get_content_type
|
|
15
|
-
_hb_buffer_guess_segment_properties
|
|
16
|
-
_hb_buffer_set_cluster_level
|
|
17
|
-
_hb_buffer_set_direction
|
|
18
|
-
_hb_buffer_set_flags
|
|
19
|
-
_hb_buffer_set_language
|
|
20
|
-
_hb_buffer_set_script
|
|
21
|
-
_hb_buffer_reset
|
|
22
|
-
_hb_buffer_clear_contents
|
|
23
|
-
_hb_buffer_set_message_func
|
|
24
|
-
_hb_buffer_serialize
|
|
25
|
-
_hb_face_create
|
|
26
|
-
_hb_face_collect_unicodes
|
|
27
|
-
_hb_face_destroy
|
|
28
|
-
_hb_face_get_upem
|
|
29
|
-
_hb_face_reference_table
|
|
30
|
-
_hb_font_create
|
|
31
|
-
_hb_font_destroy
|
|
32
|
-
_hb_font_reference
|
|
33
|
-
_hb_font_create_sub_font
|
|
34
|
-
_hb_font_glyph_to_string
|
|
35
|
-
_hb_font_set_scale
|
|
36
|
-
_hb_font_set_variations
|
|
37
|
-
_hb_font_get_h_extents
|
|
38
|
-
_hb_font_get_v_extents
|
|
39
|
-
_hb_font_get_glyph_extents
|
|
40
|
-
_hb_font_get_glyph_from_name
|
|
41
|
-
_hb_font_get_glyph_h_advance
|
|
42
|
-
_hb_font_get_glyph_v_advance
|
|
43
|
-
_hb_font_get_glyph_h_origin
|
|
44
|
-
_hb_font_get_glyph_v_origin
|
|
45
|
-
_hb_font_set_funcs
|
|
46
|
-
_hb_font_funcs_create
|
|
47
|
-
_hb_font_funcs_destroy
|
|
48
|
-
_hb_font_funcs_set_glyph_extents_func
|
|
49
|
-
_hb_font_funcs_set_glyph_from_name_func
|
|
50
|
-
_hb_font_funcs_set_glyph_h_advance_func
|
|
51
|
-
_hb_font_funcs_set_glyph_h_advances_func
|
|
52
|
-
_hb_font_funcs_set_glyph_h_origin_func
|
|
53
|
-
_hb_font_funcs_set_glyph_v_advance_func
|
|
54
|
-
_hb_font_funcs_set_glyph_v_advances_func
|
|
55
|
-
_hb_font_funcs_set_glyph_h_kerning_func
|
|
56
|
-
_hb_font_funcs_set_glyph_v_origin_func
|
|
57
|
-
_hb_font_funcs_set_nominal_glyph_func
|
|
58
|
-
_hb_font_funcs_set_nominal_glyphs_func
|
|
59
|
-
_hb_font_funcs_set_variation_glyph_func
|
|
60
|
-
_hb_font_funcs_set_font_h_extents_func
|
|
61
|
-
_hb_font_funcs_set_font_v_extents_func
|
|
62
|
-
_hb_font_funcs_set_glyph_name_func
|
|
63
|
-
_hb_font_draw_glyph
|
|
64
|
-
_hb_draw_funcs_create
|
|
65
|
-
_hb_draw_funcs_destroy
|
|
66
|
-
_hb_draw_funcs_set_move_to_func
|
|
67
|
-
_hb_draw_funcs_set_line_to_func
|
|
68
|
-
_hb_draw_funcs_set_quadratic_to_func
|
|
69
|
-
_hb_draw_funcs_set_cubic_to_func
|
|
70
|
-
_hb_draw_funcs_set_close_path_func
|
|
71
|
-
_hb_glyph_info_get_glyph_flags
|
|
72
|
-
_hb_language_from_string
|
|
73
|
-
_hb_ot_layout_table_get_script_tags
|
|
74
|
-
_hb_ot_layout_table_get_feature_tags
|
|
75
|
-
_hb_ot_layout_script_get_language_tags
|
|
76
|
-
_hb_ot_layout_language_get_feature_tags
|
|
77
|
-
_hb_ot_layout_get_glyph_class
|
|
78
|
-
_hb_ot_layout_feature_get_name_ids
|
|
79
|
-
_hb_ot_name_list_names
|
|
80
|
-
_hb_ot_name_get_utf16
|
|
81
|
-
_hb_ot_tag_to_language
|
|
82
|
-
_hb_ot_tag_to_script
|
|
83
|
-
_hb_ot_var_get_axis_infos
|
|
84
|
-
_hb_script_from_string
|
|
85
|
-
_hb_feature_from_string
|
|
86
|
-
_hb_language_from_string
|
|
87
|
-
_hb_language_to_string
|
|
88
|
-
_hb_set_create
|
|
89
|
-
_hb_set_destroy
|
|
90
|
-
_hb_set_get_population
|
|
91
|
-
_hb_set_next_many
|
|
92
|
-
_hb_shape
|
|
93
|
-
_hb_version
|
|
94
|
-
_hb_version_string
|
|
95
|
-
_malloc
|
|
96
|
-
_free
|