@drawmotive/textgraph 0.1.0-alpha.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 +21 -0
- package/README.md +92 -0
- package/docs/api-v1.md +87 -0
- package/docs/releases.md +100 -0
- package/examples/browser.html +5 -0
- package/examples/browser.js +4 -0
- package/examples/node.mjs +4 -0
- package/examples/render-png.mjs +11 -0
- package/examples/worker.js +6 -0
- package/generated/wasm/DrawMotive.TextGraph.Bridge.runtimeconfig.json +52 -0
- package/generated/wasm/DrawMotive.TextGraph.Bridge.wasm +0 -0
- package/generated/wasm/FuzzyBubbles-LICENSE.txt +93 -0
- package/generated/wasm/FuzzyBubbles-Regular.ttf +0 -0
- package/generated/wasm/Graphics.Core.wasm +0 -0
- package/generated/wasm/Grpc.Core.Api.wasm +0 -0
- package/generated/wasm/HarfBuzzSharp.wasm +0 -0
- package/generated/wasm/MagicOnion.Abstractions.wasm +0 -0
- package/generated/wasm/MagicOnion.Serialization.MessagePack.wasm +0 -0
- package/generated/wasm/MagicOnion.Shared.wasm +0 -0
- package/generated/wasm/Markdig.wasm +0 -0
- package/generated/wasm/Math.Core.wasm +0 -0
- package/generated/wasm/MemoryPack.Core.wasm +0 -0
- package/generated/wasm/MessagePack.Annotations.wasm +0 -0
- package/generated/wasm/MessagePack.wasm +0 -0
- package/generated/wasm/Microsoft.AspNetCore.Components.Web.wasm +0 -0
- package/generated/wasm/Microsoft.Extensions.DependencyInjection.Abstractions.wasm +0 -0
- package/generated/wasm/Microsoft.Extensions.DependencyInjection.wasm +0 -0
- package/generated/wasm/Microsoft.Extensions.Hosting.Abstractions.wasm +0 -0
- package/generated/wasm/Microsoft.Extensions.Logging.Abstractions.wasm +0 -0
- package/generated/wasm/Microsoft.Extensions.Logging.wasm +0 -0
- package/generated/wasm/Microsoft.Extensions.Options.wasm +0 -0
- package/generated/wasm/Microsoft.Extensions.Primitives.wasm +0 -0
- package/generated/wasm/Microsoft.NET.StringTools.wasm +0 -0
- package/generated/wasm/Nanoid.wasm +0 -0
- package/generated/wasm/NotoSans-LICENSE.txt +93 -0
- package/generated/wasm/NotoSans-Regular.ttf +0 -0
- package/generated/wasm/Polly.Core.wasm +0 -0
- package/generated/wasm/Polly.wasm +0 -0
- package/generated/wasm/R3.BlazorWebAssembly.wasm +0 -0
- package/generated/wasm/R3.wasm +0 -0
- package/generated/wasm/RBush.wasm +0 -0
- package/generated/wasm/SkiaSharp.HarfBuzz.wasm +0 -0
- package/generated/wasm/SkiaSharp.wasm +0 -0
- package/generated/wasm/Stateless.wasm +0 -0
- package/generated/wasm/System.Collections.Concurrent.wasm +0 -0
- package/generated/wasm/System.Collections.Immutable.wasm +0 -0
- package/generated/wasm/System.Collections.NonGeneric.wasm +0 -0
- package/generated/wasm/System.Collections.Specialized.wasm +0 -0
- package/generated/wasm/System.Collections.wasm +0 -0
- package/generated/wasm/System.ComponentModel.Annotations.wasm +0 -0
- package/generated/wasm/System.ComponentModel.Primitives.wasm +0 -0
- package/generated/wasm/System.ComponentModel.TypeConverter.wasm +0 -0
- package/generated/wasm/System.ComponentModel.wasm +0 -0
- package/generated/wasm/System.Console.wasm +0 -0
- package/generated/wasm/System.Diagnostics.StackTrace.wasm +0 -0
- package/generated/wasm/System.Diagnostics.Tracing.wasm +0 -0
- package/generated/wasm/System.IO.Compression.Brotli.wasm +0 -0
- package/generated/wasm/System.IO.Compression.wasm +0 -0
- package/generated/wasm/System.IO.Pipelines.wasm +0 -0
- package/generated/wasm/System.Linq.Expressions.wasm +0 -0
- package/generated/wasm/System.Linq.wasm +0 -0
- package/generated/wasm/System.Memory.wasm +0 -0
- package/generated/wasm/System.Net.Http.wasm +0 -0
- package/generated/wasm/System.Net.Primitives.wasm +0 -0
- package/generated/wasm/System.Numerics.Vectors.wasm +0 -0
- package/generated/wasm/System.ObjectModel.wasm +0 -0
- package/generated/wasm/System.Private.CoreLib.wasm +0 -0
- package/generated/wasm/System.Private.Uri.wasm +0 -0
- package/generated/wasm/System.Reflection.Emit.ILGeneration.wasm +0 -0
- package/generated/wasm/System.Reflection.Emit.wasm +0 -0
- package/generated/wasm/System.Reflection.Primitives.wasm +0 -0
- package/generated/wasm/System.Runtime.InteropServices.JavaScript.wasm +0 -0
- package/generated/wasm/System.Runtime.InteropServices.wasm +0 -0
- package/generated/wasm/System.Runtime.Intrinsics.wasm +0 -0
- package/generated/wasm/System.Runtime.Loader.wasm +0 -0
- package/generated/wasm/System.Runtime.Numerics.wasm +0 -0
- package/generated/wasm/System.Runtime.Serialization.Primitives.wasm +0 -0
- package/generated/wasm/System.Runtime.wasm +0 -0
- package/generated/wasm/System.Security.Cryptography.wasm +0 -0
- package/generated/wasm/System.Text.Encoding.Extensions.wasm +0 -0
- package/generated/wasm/System.Text.Encodings.Web.wasm +0 -0
- package/generated/wasm/System.Text.Json.wasm +0 -0
- package/generated/wasm/System.Text.RegularExpressions.wasm +0 -0
- package/generated/wasm/System.Threading.Channels.wasm +0 -0
- package/generated/wasm/System.Threading.Thread.wasm +0 -0
- package/generated/wasm/System.Threading.ThreadPool.wasm +0 -0
- package/generated/wasm/System.Threading.wasm +0 -0
- package/generated/wasm/System.wasm +0 -0
- package/generated/wasm/ZstdSharp.wasm +0 -0
- package/generated/wasm/dotnet.boot.js +443 -0
- package/generated/wasm/dotnet.js +4 -0
- package/generated/wasm/dotnet.native.js +5513 -0
- package/generated/wasm/dotnet.native.wasm +0 -0
- package/generated/wasm/dotnet.runtime.js +4 -0
- package/generated/wasm/main.mjs +5 -0
- package/generated/wasm/netstandard.wasm +0 -0
- package/generated/wasm/themes.css +85 -0
- package/generated/wasm-manifest.js +572 -0
- package/generated/wasm-manifest.json +572 -0
- package/package.json +66 -0
- package/schemas/render.schema.json +167 -0
- package/schemas/validation.schema.json +70 -0
- package/schemas/wasm-manifest.schema.json +208 -0
- package/src/adapters.js +27 -0
- package/src/index.d.ts +171 -0
- package/src/index.js +78 -0
- package/src/platform/browser.d.ts +13 -0
- package/src/platform/browser.js +13 -0
- package/src/platform/node.d.ts +3 -0
- package/src/platform/node.js +12 -0
- package/src/platform/worker.d.ts +3 -0
- package/src/platform/worker.js +4 -0
- package/src/runtime/assets.js +27 -0
- package/src/runtime/browser.js +41 -0
- package/src/runtime/dotnet.js +100 -0
- package/src/runtime/errors.js +14 -0
- package/src/runtime/integrity.js +12 -0
- package/src/runtime/language-packs.js +32 -0
- package/src/runtime/lifecycle.js +84 -0
- package/src/runtime/manifest.js +60 -0
- package/src/runtime/node.js +21 -0
- package/src/runtime/render-resources.js +51 -0
- package/src/runtime/rendering.js +66 -0
- package/src/runtime/shared.js +17 -0
- package/src/runtime/validation.js +38 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 drawmotive
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# TextGraph SDK
|
|
2
|
+
|
|
3
|
+
Render TextGraph diagrams as PNG images and validate diagram source.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @drawmotive/textgraph@alpha
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Requires Node.js 22+ or a modern browser.
|
|
12
|
+
|
|
13
|
+
Alpha releases require `@alpha` or an exact version such as `@0.1.0-alpha.1`. Once a stable release is available, `npm install @drawmotive/textgraph` installs the stable version.
|
|
14
|
+
|
|
15
|
+
## Quickstart
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { writeFile } from "node:fs/promises";
|
|
19
|
+
import { initializeTextGraph } from "@drawmotive/textgraph";
|
|
20
|
+
|
|
21
|
+
const textgraph = await initializeTextGraph();
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
const result = await textgraph.renderPng("A -> B");
|
|
25
|
+
|
|
26
|
+
if (result.success) {
|
|
27
|
+
await writeFile("diagram.png", result.png);
|
|
28
|
+
} else {
|
|
29
|
+
console.log(result.diagnostics);
|
|
30
|
+
}
|
|
31
|
+
} finally {
|
|
32
|
+
await textgraph.dispose();
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
PNG output defaults to bytes, scale `2`, padding `10`, and a white background. Reuse an instance for multiple diagrams, then call `dispose()`.
|
|
37
|
+
|
|
38
|
+
## Higher resolution
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
const result = await textgraph.renderPng("A -> B", {
|
|
42
|
+
scale: 4,
|
|
43
|
+
padding: 24,
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Display in a browser
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
import { initializeTextGraph } from "@drawmotive/textgraph/browser";
|
|
51
|
+
|
|
52
|
+
const textgraph = await initializeTextGraph();
|
|
53
|
+
const result = await textgraph.renderPng("A -> B", {
|
|
54
|
+
encoding: "base64",
|
|
55
|
+
maxWidth: 1200,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
if (result.success) {
|
|
59
|
+
const image = document.createElement("img");
|
|
60
|
+
image.src = `data:image/png;base64,${result.png}`;
|
|
61
|
+
image.alt = "A connects to B";
|
|
62
|
+
document.body.append(image);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
await textgraph.dispose();
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Additional languages
|
|
69
|
+
|
|
70
|
+
Additional language packages are not yet published.
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npm install @drawmotive/textgraph-fonts-zh-cn
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
import { initializeTextGraph } from "@drawmotive/textgraph";
|
|
78
|
+
import { zhCN } from "@drawmotive/textgraph-fonts-zh-cn";
|
|
79
|
+
|
|
80
|
+
const textgraph = await initializeTextGraph({ languagePacks: [zhCN] });
|
|
81
|
+
const result = await textgraph.renderPng("A: 开始\nB: 完成\nA -> B");
|
|
82
|
+
await textgraph.dispose();
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Validation
|
|
86
|
+
|
|
87
|
+
```typescript
|
|
88
|
+
const result = await textgraph.validate("A -> B");
|
|
89
|
+
console.log(result.valid, result.diagnostics);
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Diagram errors return diagnostics. Operational errors throw `DrawMotiveError`. See the [API reference](docs/api-v1.md) for options, cancellation, and deployment.
|
package/docs/api-v1.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# TextGraph API, protocol 1
|
|
2
|
+
|
|
3
|
+
This contract covers validation and PNG rendering. Validation checks parsing and semantic reference resolution; it does not certify layout feasibility or renderability. Empty source is valid. Public AST, editable layout and file APIs remain separate milestones.
|
|
4
|
+
|
|
5
|
+
```javascript
|
|
6
|
+
import { initializeTextGraph } from '@drawmotive/textgraph';
|
|
7
|
+
const runtime = await initializeTextGraph();
|
|
8
|
+
try {
|
|
9
|
+
console.log(await runtime.validate('A -> B'));
|
|
10
|
+
} finally {
|
|
11
|
+
await runtime.dispose();
|
|
12
|
+
}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Public data
|
|
16
|
+
|
|
17
|
+
Initialization resolves after manifest and real bridge agree on ABI, protocol and validation capability. Import does not start .NET or fetch runtime data. `runtime.info` reports package/ABI/protocol versions and actual capabilities. `state` is `ready`, `disposing` or `disposed`.
|
|
18
|
+
|
|
19
|
+
`validate(source, { signal }?)` returns immutable detached `{ valid, diagnostics }`. Parse errors stop semantic resolution. Diagnostics contain `code`, `severity` (`error` or `warning`), `stage` (`parse` or `semantic`), `message`, and optional `location: { line, column }`. Lines and UTF-16 columns are zero-based, including CRLF and supplementary Unicode characters. Unknown locations are omitted; end spans are not fabricated. Initial codes are `TG_PARSE_ERROR`, `TG_PARSE_WARNING`, `TG_SEMANTIC_ERROR`, `TG_SEMANTIC_WARNING`. Message wording may evolve.
|
|
20
|
+
|
|
21
|
+
## PNG rendering
|
|
22
|
+
|
|
23
|
+
`renderPng(source, options?)` returns `{ success: true, png, width, height, diagnostics }` or `{ success: false, diagnostics }`. Diagram failures resolve with diagnostics and contain no image data. Successful results and diagnostics are frozen; byte output is a detached, caller-owned `Uint8Array`. Output uses a white background.
|
|
24
|
+
|
|
25
|
+
| Option | Default | Meaning |
|
|
26
|
+
| --- | --- | --- |
|
|
27
|
+
| `encoding` | `"bytes"` | `"bytes"` returns `Uint8Array`; `"base64"` returns a string without a data-URL prefix. |
|
|
28
|
+
| `scale` | `2` | Positive finite render scale. |
|
|
29
|
+
| `padding` | `10` | Non-negative finite padding in diagram units. |
|
|
30
|
+
| `maxWidth` | Omitted | Positive safe integer maximum output width in pixels; preserves proportions and only reduces output size. |
|
|
31
|
+
| `signal` | Omitted | Cancels queued work or discards completed work after cancellation. |
|
|
32
|
+
|
|
33
|
+
Literal encodings infer their corresponding PNG type in TypeScript; union encodings return `Uint8Array | string`. Render diagnostics may use `parse`, `semantic`, `layout`, `render`, or `font` stages. `validate()` retains its original parse/semantic contract.
|
|
34
|
+
|
|
35
|
+
Scale and padding must remain finite when represented as 32-bit floats; scale must also remain greater than zero. Invalid arguments reject with `INVALID_ARGUMENT`.
|
|
36
|
+
|
|
37
|
+
After applying `maxWidth`, output is limited to 16,384 pixels per side and 16,777,216 pixels in total. Larger images return the `TG_RENDER_SIZE_LIMIT` diagnostic. PNG dimensions and signature are checked against the response metadata; malformed responses reject with `INVALID_RESPONSE`.
|
|
38
|
+
|
|
39
|
+
## Fonts and language packs
|
|
40
|
+
|
|
41
|
+
Default rendering includes Noto Sans and Fuzzy Bubbles. Configure additional fonts with `initializeTextGraph({ languagePacks: [...] })`. A `TextGraphLanguagePack` has a non-empty `fonts` array of `{ family, source }` and optional ordered `fallbackFamilies`. Font sources are `URL` objects or non-empty `Uint8Array` values. In Node, use `pathToFileURL()` for filesystem paths; relative asset modules can use `new URL("./font.ttf", import.meta.url)` across platforms.
|
|
42
|
+
|
|
43
|
+
The initializer copies byte arrays, URLs and descriptor arrays before asynchronous work, so later caller mutations cannot change rendering resources. Families must be unique across all packs and bundled defaults. Fallback families must name configured fonts. Descriptor validation performs no font I/O. Font contents are loaded and configured on first render; validate-only use does not read fonts or themes. Font-loading or configuration failures reject with `DrawMotiveError`; a later render can retry.
|
|
44
|
+
|
|
45
|
+
Bundled resource URLs use `resolveAsset`. Language-pack sources use their supplied URL directly and the platform data loader, including custom `fetch` or the network adapter for network URLs. `@drawmotive/textgraph-fonts-zh-cn` exports a `zhCN` descriptor for Simplified Chinese. The optional package is installed separately.
|
|
46
|
+
|
|
47
|
+
## Lifecycle
|
|
48
|
+
|
|
49
|
+
Validation, render preparation and rendering calls serialize through one queue per instance. Independent instances have independent runtime module graphs and queues. Cancellation is checked before and after native work. Cancelling queued work prevents execution; it cannot preempt native parsing, layout or rendering already running on the same thread. A Promise does not move computation off the main thread.
|
|
50
|
+
|
|
51
|
+
`dispose()` is idempotent, rejects new work immediately and drains accepted work before releasing owned native font resources, cache timers and wrapper references. The wrapper stays disposed even if cleanup fails. .NET has no portable host-safe unload: its Node exit API terminates the process. Disposal does not promise reclamation of the entire VM/module cache. Reuse an instance; terminate its host-owned Worker for hard cancellation and full environment reclamation.
|
|
52
|
+
|
|
53
|
+
Existing `loadRuntime`, `readonly` and `mutate` hooks remain for development compatibility, outside the stable business API. Injected legacy runtimes may initialize without validation; `validate()` then reports `UNSUPPORTED_CAPABILITY`.
|
|
54
|
+
|
|
55
|
+
## Platforms
|
|
56
|
+
|
|
57
|
+
- Node 22 or later: root or `/node`; runtime modules use installed-package `file:` URLs, data uses `node:fs/promises`. HTTP data can use injected fetch, but Node does not import remote HTTP JavaScript. Node `worker_threads` uses `/node`.
|
|
58
|
+
- Browser: `/browser` or browser conditional export. Modern Chromium, Firefox and WebKit with WebAssembly, ESM, fetch, BigInt and Web Crypto are tested. HTTPS or localhost is required for Web Crypto. Exact engine versions are pinned by the Playwright lockfile; historical minimum browser versions are not claimed.
|
|
59
|
+
- Browser module Web Worker: `/worker` inside a host-created Worker; no DOM, window, automatic RPC or Worker pool.
|
|
60
|
+
|
|
61
|
+
Root condition precedence is worker/browser/node/default. Explicit entries avoid bundler ambiguity. Browser/Worker source graphs exclude Node imports.
|
|
62
|
+
|
|
63
|
+
## Assets, CSP and offline operation
|
|
64
|
+
|
|
65
|
+
Defaults resolve relative to the installed module. `resolveAsset(asset, defaultUrl)` may return an absolute URL or URL object for each asset. Deploy the complete `generated/wasm` directory: bundlers must preserve/copy these files and configure the resolver for their deployed location. It covers both JS and data. Instance query parameters isolate mutable .NET ESM state; servers should serve identical module bytes regardless of that query.
|
|
66
|
+
|
|
67
|
+
`fetch` or `adapters.network.fetch` receives data URLs and the applicable initialization or render signal. JS uses dynamic import, which injected fetch cannot intercept. Offline installations must cache the module graph as well as WASM/data at importable URLs, using a Service Worker or local server. No GitHub Releases download is required.
|
|
68
|
+
|
|
69
|
+
Serve WASM as `application/wasm`, JS as `text/javascript`, and provide applicable CORS headers for cross-origin assets. Same-origin CSP: `default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; connect-src 'self'; worker-src 'self'`. No eval, new Function or DOM script injection is used. Cross-origin isolation and SharedArrayBuffer are not required by this single-threaded runtime.
|
|
70
|
+
|
|
71
|
+
Serve font files as `font/ttf` and themes as `text/css`. To display base64 PNGs, add `img-src 'self' data:` to CSP; include `blob:` too when displaying Blob URLs.
|
|
72
|
+
|
|
73
|
+
## Errors
|
|
74
|
+
|
|
75
|
+
DSL failures resolve with diagnostics. Operational errors reject with `DrawMotiveError`: stable `code`, optional `cause`, frozen structured `details`. Codes include `INVALID_ARGUMENT`, `INVALID_MANIFEST`, `INVALID_ASSET_URL`, `RESOURCE_NOT_FOUND`, `ASSET_INTEGRITY_MISMATCH`, `ABI_MISMATCH`, `UNSUPPORTED_CAPABILITY`, `INITIALIZATION_FAILED`, `UNSUPPORTED_ENVIRONMENT`, `INVALID_RESPONSE`, `RUNTIME_FAILED`, `INSTANCE_DISPOSED`, `INVALID_ADAPTER`. Cancellation errors have name `AbortError`. Messages and underlying runtime causes are not stable.
|
|
76
|
+
|
|
77
|
+
## ABI and versioning
|
|
78
|
+
|
|
79
|
+
ABI 1.0.0 retains GetAbiVersion/GetPackageKind/CountParseDiagnostics and adds GetRuntimeInfo(), Validate(source) and Execute(requestJson) on DrawMotive.TextGraph.Bridge.Program. Info returns JSON `{ abiVersion, packageKind, protocolVersion: 1, capabilities }`; Validate returns `{ protocolVersion: 1, valid, diagnostics }`. Wrappers require `textgraph-validate-v1`; PNG rendering additionally requires `textgraph-render-v1` and the manifest `bridge.execute` export. Legacy validation exports remain supported. This is a managed export/JSON protocol, not a raw WASM pointer ABI.
|
|
80
|
+
|
|
81
|
+
`generated/wasm-manifest.json` is authoritative; its ESM projection avoids JSON-module browser assumptions. Shipped schemas describe the manifest, validation response and rendering response. Manifest schema, ABI, protocol and npm versions are separate. Additive exports use capabilities; incompatible wire changes require a new supported version. npm versions and bundled assets are released together. DSL/file-format versions are not frozen by this milestone.
|
|
82
|
+
|
|
83
|
+
Assets have relative path, media type, byte count and SHA-256. Packaging checks reject missing/extra assets, debug files, hash/projection/version drift. Runtime data assets are hash-checked before native startup. Bundled fonts and themes are loaded and hash-checked lazily before the first render; license files require no runtime I/O. These checks establish distribution consistency, not authenticated runtime signatures. `privateSource.commit` identifies committed private C# and bridge inputs. Toolchain changes may change bytes; cross-toolchain byte-for-byte reproducibility is not promised.
|
|
84
|
+
|
|
85
|
+
The rendering wire uses one `Execute(requestJson)` export. Configuration is performed once before the first render with `{ protocolVersion: 1, operation: "configure", theme, fonts: [{ family, data }], fallbackFamilies }`, where `data` is base64 font data. Its response is `{ protocolVersion: 1, success, diagnostics }`. A render request is `{ protocolVersion: 1, operation: "render", source, export: { format: "png", scale, padding, maxWidth? } }`. Native success returns base64 `png`, `width`, `height`, and diagnostics; failures contain only `success: false` and diagnostics beside the protocol version. The JavaScript wrapper converts image data to the requested encoding.
|
|
86
|
+
|
|
87
|
+
For rendering-capable bridges, disposal sends `{ protocolVersion: 1, operation: "dispose" }` and validates the same success/diagnostics envelope as configuration. This request releases native resources without loading fonts or shutting down the host runtime. Legacy validation-only bridges release wrapper references directly.
|
package/docs/releases.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Releasing TextGraph
|
|
2
|
+
|
|
3
|
+
Releases are selected deliberately and published by `.github/workflows/release.yml`. A push to `main` only runs CI. A tag named `textgraph-v<VERSION>` tests, packs, and publishes that version. Manual dispatch accepts an existing release tag for retries.
|
|
4
|
+
|
|
5
|
+
## Channels
|
|
6
|
+
|
|
7
|
+
| Version | npm dist-tag | Installation |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| `0.1.0-alpha.1` | `alpha` | `npm install @drawmotive/textgraph@alpha` |
|
|
10
|
+
| `0.1.0` | `latest` | `npm install @drawmotive/textgraph` |
|
|
11
|
+
|
|
12
|
+
An exact prerelease version also works: `npm install @drawmotive/textgraph@0.1.0-alpha.1`. Alpha releases never change `latest`. Until a real stable version exists, default installation has no matching stable version and fails; no placeholder stable version is published. Versions are immutable. To graduate an alpha, prepare and publish a new stable version instead of moving `latest` to an alpha.
|
|
13
|
+
|
|
14
|
+
The scripts accept stable SemVer and `X.Y.Z-alpha.N`. Other channels require an explicit release-policy change. The Chinese font package has its own release lifecycle and is not published by this workflow.
|
|
15
|
+
|
|
16
|
+
## Account setup
|
|
17
|
+
|
|
18
|
+
1. Use an npm account with permission to publish under `@drawmotive`, with the account protection required by npm.
|
|
19
|
+
2. Create the GitHub repository environment `npm`. Restrict deployment refs to `textgraph-v*` tags. Add required reviewers if releases need a second approval.
|
|
20
|
+
3. Once the npm package exists, open its Settings and add a GitHub Actions trusted publisher: owner `drawmotive`, repository `textgraph`, workflow filename `release.yml`, environment `npm`.
|
|
21
|
+
4. The workflow uses a GitHub-hosted runner, Node.js 22, npm 11.11.1, and `id-token: write`. No long-lived npm token is needed for subsequent releases.
|
|
22
|
+
|
|
23
|
+
Trusted publishing requires npm 11.5.1+ and Node.js 22.14.0+. Publication from a public repository automatically includes provenance. A private repository does not produce public npm provenance; repository visibility is a separate owner decision. See [npm trusted publishers](https://docs.npmjs.com/trusted-publishers/).
|
|
24
|
+
|
|
25
|
+
## Prepare a version
|
|
26
|
+
|
|
27
|
+
Native builds belong to the private DrawMotive repository. Commit native source, resource, and bridge changes first, then run there:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm run release:textgraph -- 0.1.0-alpha.1
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
This updates the package and lock versions, builds Release assets from the recorded private source commit, generates matching JSON/ESM manifests, updates the root workspace lock, and verifies asset hashes. It does not commit, push, tag, or publish. The `just release-textgraph 0.1.0-alpha.1` alias runs the same command.
|
|
34
|
+
|
|
35
|
+
For a JavaScript-only release reusing already verified native bytes, run in this package:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm run release:prepare -- 0.1.0-alpha.2
|
|
39
|
+
npm run release:verify
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
This retains the actual native source provenance. ABI and protocol versions are not npm release numbers. Update the changelog and installation instructions for the chosen channel.
|
|
43
|
+
|
|
44
|
+
## Verify and pack
|
|
45
|
+
|
|
46
|
+
Run from a standalone checkout of this package, or use `--workspaces=false` for installation inside the private workspace:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npm ci
|
|
50
|
+
npm run release:pack
|
|
51
|
+
npx playwright install --with-deps chromium firefox webkit
|
|
52
|
+
npm run test:browser
|
|
53
|
+
npm run release:publish -- --dry-run
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The package is written to `.release/drawmotive-textgraph-<VERSION>.tgz`; `.release/release.json` records its version, channel, and SHA-512 integrity. The publication script uses those exact bytes and verifies registry channels and integrity after publication. Never edit an artifact or its receipt.
|
|
57
|
+
|
|
58
|
+
Commit the package changes on the task branch, review them, and integrate according to repository policy. Push the package commit before updating and pushing the private parent repository submodule pointer.
|
|
59
|
+
|
|
60
|
+
## First publication
|
|
61
|
+
|
|
62
|
+
When the package does not exist yet, its trusted publisher may not be configurable. Bootstrap the verified release once from an authenticated terminal:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm login --registry=https://registry.npmjs.org/
|
|
66
|
+
npm whoami --registry=https://registry.npmjs.org/
|
|
67
|
+
npm run release:publish
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
If npm requires a one-time code, run with `NPM_CONFIG_OTP` set in the local terminal. Do not commit credentials or paste tokens into issues, pull requests, or logs. A local bootstrap does not obtain GitHub Actions provenance. Configure the trusted publisher immediately after the package exists.
|
|
71
|
+
|
|
72
|
+
## Subsequent releases
|
|
73
|
+
|
|
74
|
+
After preparation, tests, and review, create the tag on the verified package commit:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
git tag -a textgraph-v0.1.0-alpha.2 -m "Release 0.1.0-alpha.2"
|
|
78
|
+
git push origin main
|
|
79
|
+
git push origin textgraph-v0.1.0-alpha.2
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
The release workflow resolves the tag to a commit, runs the existing three-platform Node.js and three-browser tests, packs the tested checkout, and passes the artifact to the `npm` environment for publication. Stable releases use the same procedure with a version such as `0.1.0`; the script selects `latest` automatically. Never pass a custom dist-tag to bypass the release policy.
|
|
83
|
+
|
|
84
|
+
## Verify publication and recover
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npm view @drawmotive/textgraph dist-tags --json
|
|
88
|
+
npm view @drawmotive/textgraph@0.1.0-alpha.1 dist.integrity
|
|
89
|
+
npm install @drawmotive/textgraph@0.1.0-alpha.1
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
If a workflow fails before publishing, fix the configuration and rerun the same tag. For a manual dispatch, select the release tag as the workflow ref and supply the same tag as input; dispatching from `main` is rejected so OIDC and provenance identify the correct commit. For example:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
gh workflow run release.yml --ref textgraph-v0.1.0-alpha.1 -f tag=textgraph-v0.1.0-alpha.1
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
If publication succeeded but a later check failed, the script accepts an identical registry artifact with the correct channel and refuses different bytes at the same version. Keep the original workflow artifact for diagnosing integrity differences.
|
|
99
|
+
|
|
100
|
+
If an alpha accidentally acquires `latest` outside this workflow, restore the previously verified stable version using `npm dist-tag add @drawmotive/textgraph@<STABLE_VERSION> latest`. If no stable version exists, remove only the accidental tag using `npm dist-tag rm @drawmotive/textgraph latest`. Confirm registry state before retrying. Do not unpublish or overwrite versions as a routine recovery step.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { writeFile } from "node:fs/promises";
|
|
2
|
+
import { initializeTextGraph } from "@drawmotive/textgraph/node";
|
|
3
|
+
|
|
4
|
+
const textgraph = await initializeTextGraph();
|
|
5
|
+
try {
|
|
6
|
+
const result = await textgraph.renderPng(process.argv[2] ?? "A -> B");
|
|
7
|
+
if (result.success) await writeFile(process.argv[3] ?? "diagram.png", result.png);
|
|
8
|
+
else { console.error(result.diagnostics); process.exitCode = 1; }
|
|
9
|
+
} finally {
|
|
10
|
+
await textgraph.dispose();
|
|
11
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { initializeTextGraph } from '../src/platform/worker.js';
|
|
2
|
+
const runtime = await initializeTextGraph();
|
|
3
|
+
self.onmessage = async event => {
|
|
4
|
+
try { self.postMessage({ id: event.data.id, result: await runtime.validate(event.data.source) }); }
|
|
5
|
+
catch (error) { self.postMessage({ id: event.data.id, error: { name: error.name, code: error.code, message: error.message } }); }
|
|
6
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"runtimeOptions": {
|
|
3
|
+
"tfm": "net10.0",
|
|
4
|
+
"includedFrameworks": [
|
|
5
|
+
{
|
|
6
|
+
"name": "Microsoft.NETCore.App",
|
|
7
|
+
"version": "10.0.8"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"wasmHostProperties": {
|
|
11
|
+
"perHostConfig": [
|
|
12
|
+
{
|
|
13
|
+
"name": "browser",
|
|
14
|
+
"host": "browser"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"runtimeArgs": [],
|
|
18
|
+
"mainAssembly": "DrawMotive.TextGraph.Bridge.dll"
|
|
19
|
+
},
|
|
20
|
+
"configProperties": {
|
|
21
|
+
"Microsoft.Extensions.DependencyInjection.VerifyOpenGenericServiceTrimmability": true,
|
|
22
|
+
"System.ComponentModel.DefaultValueAttribute.IsSupported": false,
|
|
23
|
+
"System.ComponentModel.Design.IDesignerHost.IsSupported": false,
|
|
24
|
+
"System.ComponentModel.TypeConverter.EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization": false,
|
|
25
|
+
"System.ComponentModel.TypeDescriptor.IsComObjectDescriptorSupported": false,
|
|
26
|
+
"System.Data.DataSet.XmlSerializationIsSupported": false,
|
|
27
|
+
"System.Diagnostics.Debugger.IsSupported": false,
|
|
28
|
+
"System.Diagnostics.Metrics.Meter.IsSupported": false,
|
|
29
|
+
"System.Diagnostics.Tracing.EventSource.IsSupported": false,
|
|
30
|
+
"System.Globalization.Invariant": true,
|
|
31
|
+
"System.TimeZoneInfo.Invariant": false,
|
|
32
|
+
"System.Globalization.PredefinedCulturesOnly": true,
|
|
33
|
+
"System.Linq.Enumerable.IsSizeOptimized": true,
|
|
34
|
+
"System.Net.Http.EnableActivityPropagation": false,
|
|
35
|
+
"System.Net.Http.WasmEnableStreamingResponse": true,
|
|
36
|
+
"System.Net.SocketsHttpHandler.Http3Support": false,
|
|
37
|
+
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
|
|
38
|
+
"System.Resources.ResourceManager.AllowCustomResourceTypes": false,
|
|
39
|
+
"System.Resources.UseSystemResourceKeys": true,
|
|
40
|
+
"System.Runtime.CompilerServices.RuntimeFeature.IsDynamicCodeSupported": true,
|
|
41
|
+
"System.Runtime.InteropServices.BuiltInComInterop.IsSupported": false,
|
|
42
|
+
"System.Runtime.InteropServices.EnableConsumingManagedCodeFromNativeHosting": false,
|
|
43
|
+
"System.Runtime.InteropServices.EnableCppCLIHostActivation": false,
|
|
44
|
+
"System.Runtime.InteropServices.Marshalling.EnableGeneratedComInterfaceComImportInterop": false,
|
|
45
|
+
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false,
|
|
46
|
+
"System.StartupHookProvider.IsSupported": false,
|
|
47
|
+
"System.Text.Encoding.EnableUnsafeUTF7Encoding": false,
|
|
48
|
+
"System.Text.Json.JsonSerializer.IsReflectionEnabledByDefault": false,
|
|
49
|
+
"System.Threading.Thread.EnableAutoreleasePool": false
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2005 The Fuzzy Bubbles Project Authors (https://github.com/googlefonts/fuzzy-bubbles)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2022 The Noto Project Authors (https://github.com/notofonts/latin-greek-cyrillic)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|