font-range 0.1.2 → 0.2.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/.eslintignore +1 -0
- package/.github/workflows/npm-publish.yml +13 -4
- package/README.md +30 -6
- package/__tests__/font/NotoSansKR-Local.css +1080 -0
- package/__tests__/main.test.ts +37 -6
- package/build/src/main.d.ts +18 -0
- package/build/src/main.js +199 -0
- package/build/src/main.js.map +1 -0
- package/build/src/types.d.ts +4 -0
- package/build/src/types.js +3 -0
- package/build/src/types.js.map +1 -0
- package/package.json +16 -14
- package/requirements.txt +4 -1
- package/src/main.ts +81 -19
- package/src/types.ts +5 -0
- package/tsconfig.json +3 -0
- package/tsconfig.release.json +2 -1
package/.eslintignore
CHANGED
|
@@ -13,6 +13,8 @@ jobs:
|
|
|
13
13
|
runs-on: ubuntu-latest
|
|
14
14
|
steps:
|
|
15
15
|
- uses: actions/checkout@v2
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: '0'
|
|
16
18
|
- uses: volta-cli/action@v1
|
|
17
19
|
- name: pip cache
|
|
18
20
|
uses: actions/cache@v2
|
|
@@ -38,6 +40,13 @@ jobs:
|
|
|
38
40
|
env:
|
|
39
41
|
CI: true
|
|
40
42
|
- run: npm test
|
|
43
|
+
- name: Commit Build File
|
|
44
|
+
uses: stefanzweifel/git-auto-commit-action@v4
|
|
45
|
+
with:
|
|
46
|
+
branch: master
|
|
47
|
+
file_pattern: build/src/*.js build/src/*.js.map build/src/*.d.ts
|
|
48
|
+
commit_message: 'Fix: Automated apply build files'
|
|
49
|
+
status_options: '--untracked-files=no'
|
|
41
50
|
|
|
42
51
|
publish:
|
|
43
52
|
needs: build
|
|
@@ -60,10 +69,10 @@ jobs:
|
|
|
60
69
|
if: matrix.branch == 'github-repo'
|
|
61
70
|
uses: devmasx/merge-branch@1.4.0
|
|
62
71
|
with:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
72
|
+
type: now
|
|
73
|
+
from_branch: master
|
|
74
|
+
target_branch: github-repo
|
|
75
|
+
github_token: ${{ secrets[matrix.token] }}
|
|
67
76
|
- uses: volta-cli/action@v1
|
|
68
77
|
- uses: actions/setup-node@v1
|
|
69
78
|
with:
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
[![Node.js version][nodejs-badge]][nodejs]
|
|
3
3
|
[![APLv2][license-badge]][license]
|
|
4
4
|
|
|
5
|
-
# Font Range
|
|
5
|
+
# Font Range
|
|
6
6
|
|
|
7
7
|
|  |  |  |
|
|
8
8
|
|-------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|
|
|
@@ -21,10 +21,34 @@ Google font `CSS file`(include `unicode-range` file) url and `font path` are fin
|
|
|
21
21
|
|
|
22
22
|
```js
|
|
23
23
|
fontRange(google_font_css_url, font_path);
|
|
24
|
-
fontRange(google_font_css_url, font_path, save_path
|
|
24
|
+
fontRange(google_font_css_url, font_path, save_path); // Option1
|
|
25
|
+
fontRange(google_font_css_url, font_path, {
|
|
26
|
+
savePath: "<SAVE SUBSET PATH>",
|
|
27
|
+
format: "<FONT FORMAT>",
|
|
28
|
+
nameForamt: "<NAME FORAMT>",
|
|
29
|
+
defaultArgs: "<Default Args>",
|
|
30
|
+
etcArgs: "<ETC pyftsubset args>"
|
|
31
|
+
}); // Option2
|
|
25
32
|
```
|
|
26
|
-
- `save_path`'s default:
|
|
27
|
-
- `format`'s default: `woff2`
|
|
33
|
+
- `save_path`'s default: `<font_path>`
|
|
34
|
+
- `format`'s default: `"woff2"`
|
|
35
|
+
- `nameFormat`'s default: `"{NAME}_{INDEX}{EXT}"`
|
|
36
|
+
- `defaultArgs`'s default:
|
|
37
|
+
```
|
|
38
|
+
"--layout-features='*' \
|
|
39
|
+
--glyph-names \
|
|
40
|
+
--symbol-cmap \
|
|
41
|
+
--legacy-cmap \
|
|
42
|
+
--notdef-glyph \
|
|
43
|
+
--notdef-outline \
|
|
44
|
+
--recommended-glyphs \
|
|
45
|
+
--name-legacy \
|
|
46
|
+
--drop-tables= \
|
|
47
|
+
--name-IDs='*' \
|
|
48
|
+
--name-languages='*'
|
|
49
|
+
"
|
|
50
|
+
```
|
|
51
|
+
- `etcArgs`'s default: `""`
|
|
28
52
|
|
|
29
53
|
### Requires
|
|
30
54
|
It has dependencies on the following packages:
|
|
@@ -56,5 +80,5 @@ Licensed under the APLv2. See the [LICENSE](https://github.com/jsynowiec/node-ty
|
|
|
56
80
|
[nodejs-badge]: https://img.shields.io/badge/Node.js->=%2012.13-blue.svg
|
|
57
81
|
[nodejs]: https://nodejs.org/dist/latest-v12.x/docs/api/
|
|
58
82
|
[typescript-4-0]: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html
|
|
59
|
-
[license-badge]: https://img.shields.io/badge/license-
|
|
60
|
-
[license]: https://github.com/
|
|
83
|
+
[license-badge]: https://img.shields.io/badge/license-MIT-blue
|
|
84
|
+
[license]: https://github.com/black7375/font-range/blob/master/LICENSE
|