vexflow 5.1.0 → 5.1.2
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 +18 -6
- package/build/cjs/vexflow-bravura.js +2 -2
- package/build/cjs/vexflow-bravura.js.map +1 -1
- package/build/cjs/vexflow-core.js +2 -2
- package/build/cjs/vexflow-core.js.map +1 -1
- package/build/cjs/vexflow-debug-with-tests.js +427 -83
- package/build/cjs/vexflow-debug-with-tests.js.map +1 -1
- package/build/cjs/vexflow-debug.js +427 -83
- package/build/cjs/vexflow-debug.js.map +1 -1
- package/build/cjs/vexflow.js +2 -2
- package/build/cjs/vexflow.js.map +1 -1
- package/build/esm/src/chordkerning.js +98 -0
- package/build/esm/src/chordsymbol.js +108 -27
- package/build/esm/src/element.js +7 -2
- package/build/esm/src/font.js +3 -1
- package/build/esm/src/metrics.js +4 -3
- package/build/esm/src/textmetricscache.js +93 -0
- package/build/esm/src/version.js +3 -3
- package/build/esm/tests/node/chord-kerning-tests.mjs +173 -0
- package/build/esm/tests/node/metrics-tests.mjs +278 -0
- package/build/esm/tests/node/tool-security-tests.mjs +85 -0
- package/build/types/src/chordkerning.d.ts +42 -0
- package/build/types/src/chordsymbol.d.ts +19 -0
- package/build/types/src/element.d.ts +2 -0
- package/build/types/src/textmetricscache.d.ts +21 -0
- package/changelog/CHANGELOG.md +37 -0
- package/package.json +16 -7
- package/tests/flow.html +10 -3
package/README.md
CHANGED
|
@@ -6,14 +6,25 @@ VexFlow is an open-source library for rendering sheet music. It is written in Ty
|
|
|
6
6
|
|
|
7
7
|
The simplest way to add VexFlow to a web page is via a `<script>` tag.
|
|
8
8
|
|
|
9
|
+
Save the page as UTF-8 and put `<meta charset="utf-8">` at the start of `<head>`. Without an explicit encoding, music symbols can appear as incorrect characters. A doctype alone does not set the encoding.
|
|
10
|
+
|
|
9
11
|
See this example: [https://jsfiddle.net/ck6erLhm/](https://jsfiddle.net/ck6erLhm/)
|
|
10
12
|
|
|
11
13
|
```html
|
|
12
|
-
|
|
13
|
-
<
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
</
|
|
14
|
+
<!doctype html>
|
|
15
|
+
<html>
|
|
16
|
+
<head>
|
|
17
|
+
<meta charset="utf-8" />
|
|
18
|
+
<title>VexFlow score</title>
|
|
19
|
+
</head>
|
|
20
|
+
<body>
|
|
21
|
+
<div id="output"></div>
|
|
22
|
+
<script src="https://cdn.jsdelivr.net/npm/vexflow@5.1.1/build/cjs/vexflow.js"></script>
|
|
23
|
+
<script>
|
|
24
|
+
// YOUR CODE GOES HERE
|
|
25
|
+
</script>
|
|
26
|
+
</body>
|
|
27
|
+
</html>
|
|
17
28
|
```
|
|
18
29
|
|
|
19
30
|
The URL above includes a version number <code>vexflow@x.y.z</code>. Specifying a version prevents a future update from breaking your deployment.
|
|
@@ -24,7 +35,7 @@ If your project uses a bundler, you can install VexFlow from npm:
|
|
|
24
35
|
npm install vexflow
|
|
25
36
|
```
|
|
26
37
|
|
|
27
|
-
[See our tutorial](https://vexflow.github.io/vexflow-examples/guides/tutorial).
|
|
38
|
+
[See our tutorial](https://vexflow.github.io/vexflow-examples/guides/tutorial/).
|
|
28
39
|
|
|
29
40
|
## Factory and EasyScore
|
|
30
41
|
|
|
@@ -93,6 +104,7 @@ A good way to learn the API is to look at our examples & unit tests:
|
|
|
93
104
|
## More Resources
|
|
94
105
|
|
|
95
106
|
- [Text fonts and lyric layout](docs/text-and-lyrics.md), [jsdom rendering](docs/jsdom.md), and [score benchmarks](docs/benchmarks.md).
|
|
107
|
+
- [Chord symbol kerning](docs/chord-symbols.md).
|
|
96
108
|
- [Score layout](docs/score-layout.md) and [responsive sheets and themes](docs/sheets-and-themes.md).
|
|
97
109
|
- [Rendering tests and visual comparisons](docs/testing.md).
|
|
98
110
|
- [VexFlow Explorer](tools/explorer/README.md): run `npm run explorer` to browse and edit notation.
|