From 3254ed810ebd820e4fcd0adcd588c3b2e6c93957 Mon Sep 17 00:00:00 2001 From: LFu Date: Fri, 11 Feb 2022 16:55:52 +0800 Subject: [PATCH 1/8] added docker icon --- src/icons/icons.yml | 9 +++++++++ src/icons/svg/docker.svg | 3 +++ 2 files changed, 12 insertions(+) create mode 100644 src/icons/svg/docker.svg diff --git a/src/icons/icons.yml b/src/icons/icons.yml index dc0dcaf95..f9ca264a1 100644 --- a/src/icons/icons.yml +++ b/src/icons/icons.yml @@ -7913,6 +7913,15 @@ icons: categories: - Brand Icons + - name: Docker + id: docker + unicode: f36c + created: 0.4 + url: docker.com + filter: + - container + categories: + - Brand Icons diff --git a/src/icons/svg/docker.svg b/src/icons/svg/docker.svg new file mode 100644 index 000000000..2fa2b7be4 --- /dev/null +++ b/src/icons/svg/docker.svg @@ -0,0 +1,3 @@ + + + From 16f9cddaea493c031c9782588a9f19b4ccb3ee94 Mon Sep 17 00:00:00 2001 From: Lyuwen Fu Date: Sat, 12 Feb 2022 00:05:30 +0800 Subject: [PATCH 2/8] fixed a syntax error in src/icons/icons.yml --- src/icons/icons.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/icons/icons.yml b/src/icons/icons.yml index f9ca264a1..af616ef6d 100644 --- a/src/icons/icons.yml +++ b/src/icons/icons.yml @@ -7815,7 +7815,7 @@ icons: categories: - Brand Icons - - name: Open Source Initiative + - name: Open Source Initiative id: osi unicode: f363 created: 1.2 From e08ea6dd8d3a4f3c3f668aec3776a12371296571 Mon Sep 17 00:00:00 2001 From: Lyuwen Fu Date: Sat, 12 Feb 2022 00:48:22 +0800 Subject: [PATCH 3/8] Create npm-publish-github-packages.yml Create CI/CD workflow with GitHub Actions --- .../workflows/npm-publish-github-packages.yml | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/npm-publish-github-packages.yml diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml new file mode 100644 index 000000000..837f28f2c --- /dev/null +++ b/.github/workflows/npm-publish-github-packages.yml @@ -0,0 +1,47 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages + +name: Node.js Package + +on: + push: + branches: [ master ] + release: + types: + - published + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + # - name: Set up Ruby 2.6 + # uses: actions/setup-ruby@v1 + # with: + # ruby-version: 2.6.x + - uses: actions/setup-node@v2 + with: + node-version: 17 + - name: Install dependencies + run: | + sudo apt-get update -y && sudo apt-get install -y --no-install-recommends \ + fontforge \ + woff-tools \ + woff2 + sudo gem install bundler:1.17.3 + sudo bundle install + - name: Build fonts and CSS + run: | + npm ci + make -C src/icons + npm run build + - name: prepare for publish + run: | + mkdir fork-awesome + cp -r css less fonts scss fork-awesome/ + tar zcvf fork-awesome.tgz fork-awesome/ + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2.3.1 + with: + path: fork-awesome.tgz From 119ea98b87673fbcd1afd115a4cab0f8e90690f4 Mon Sep 17 00:00:00 2001 From: Lyuwen Fu Date: Sat, 12 Feb 2022 01:25:51 +0800 Subject: [PATCH 4/8] update icons.yml --- src/icons/icons.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/icons/icons.yml b/src/icons/icons.yml index af616ef6d..f7919a4fd 100644 --- a/src/icons/icons.yml +++ b/src/icons/icons.yml @@ -7916,10 +7916,8 @@ icons: - name: Docker id: docker unicode: f36c - created: 0.4 + created: 1.3 url: docker.com - filter: - - container categories: - Brand Icons From a378a0e5a27d9981e6f75ce4ff92bed1fa7ee7cc Mon Sep 17 00:00:00 2001 From: Lyuwen Fu Date: Sat, 12 Feb 2022 02:07:19 +0800 Subject: [PATCH 5/8] update .fontcustom-manifest.json --- src/icons/.fontcustom-manifest.json | 68 ++++++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a/src/icons/.fontcustom-manifest.json b/src/icons/.fontcustom-manifest.json index 39380c2ab..7b19291d9 100644 --- a/src/icons/.fontcustom-manifest.json +++ b/src/icons/.fontcustom-manifest.json @@ -1,7 +1,7 @@ { "checksum": { - "previous": "74bef76ed80b2ec8eafda938cd299dabecaa37ff350efc6db09585b834fea202", - "current": "74bef76ed80b2ec8eafda938cd299dabecaa37ff350efc6db09585b834fea202" + "previous": "77be5ba395262597be8705aeb118a44ec323eab3250929fbe080c1082b8423d5", + "current": "77be5ba395262597be8705aeb118a44ec323eab3250929fbe080c1082b8423d5" }, "fonts": [ "forkawesome/forkawesome.ttf", @@ -483,6 +483,10 @@ "codepoint": 61571, "source": "svg/camera-retro.svg" }, + "canonical": { + "codepoint": 62317, + "source": "svg/canonical.svg" + }, "car": { "codepoint": 61881, "source": "svg/car.svg" @@ -731,6 +735,10 @@ "codepoint": 61734, "source": "svg/code-fork.svg" }, + "codeberg": { + "codepoint": 62318, + "source": "svg/codeberg.svg" + }, "codepen": { "codepoint": 61899, "source": "svg/codepen.svg" @@ -899,6 +907,14 @@ "codepoint": 62191, "source": "svg/discord-alt.svg" }, + "discourse": { + "codepoint": 62319, + "source": "svg/discourse.svg" + }, + "docker": { + "codepoint": 62316, + "source": "svg/docker.svg" + }, "dogmazic": { "codepoint": 62211, "source": "svg/dogmazic.svg" @@ -1043,6 +1059,14 @@ "codepoint": 61947, "source": "svg/eyedropper.svg" }, + "eyeem": { + "codepoint": 62320, + "source": "svg/eyeem.svg" + }, + "eyeem-o": { + "codepoint": 62321, + "source": "svg/eyeem-o.svg" + }, "f-droid": { "codepoint": 62250, "source": "svg/f-droid.svg" @@ -1075,6 +1099,10 @@ "codepoint": 61868, "source": "svg/fax.svg" }, + "fediverse": { + "codepoint": 62322, + "source": "svg/fediverse.svg" + }, "female": { "codepoint": 61826, "source": "svg/female.svg" @@ -1247,6 +1275,10 @@ "codepoint": 62149, "source": "svg/free-code-camp.svg" }, + "freedesktop": { + "codepoint": 62323, + "source": "svg/freedesktop.svg" + }, "freedombox": { "codepoint": 62205, "source": "svg/freedombox.svg" @@ -1503,6 +1535,10 @@ "codepoint": 61982, "source": "svg/heartbeat.svg" }, + "hedgedoc": { + "codepoint": 62324, + "source": "svg/hedgedoc.svg" + }, "heroku": { "codepoint": 62287, "source": "svg/heroku.svg" @@ -1619,6 +1655,10 @@ "codepoint": 61960, "source": "svg/ioxhost.svg" }, + "ipfs": { + "codepoint": 62325, + "source": "svg/ipfs.svg" + }, "italic": { "codepoint": 61491, "source": "svg/italic.svg" @@ -1627,6 +1667,10 @@ "codepoint": 62289, "source": "svg/java.svg" }, + "javascript": { + "codepoint": 62326, + "source": "svg/javascript.svg" + }, "jirafeau": { "codepoint": 62232, "source": "svg/jirafeau.svg" @@ -1703,6 +1747,10 @@ "codepoint": 61970, "source": "svg/leanpub.svg" }, + "lemmy": { + "codepoint": 62327, + "source": "svg/lemmy.svg" + }, "lemon-o": { "codepoint": 61588, "source": "svg/lemon-o.svg" @@ -1967,6 +2015,10 @@ "codepoint": 62021, "source": "svg/mouse-pointer.svg" }, + "mumble": { + "codepoint": 62328, + "source": "svg/mumble.svg" + }, "music": { "codepoint": 61441, "source": "svg/music.svg" @@ -2039,6 +2091,10 @@ "codepoint": 62263, "source": "svg/orcid.svg" }, + "osi": { + "codepoint": 62329, + "source": "svg/osi.svg" + }, "outdent": { "codepoint": 61499, "source": "svg/outdent.svg" @@ -2211,6 +2267,10 @@ "codepoint": 62088, "source": "svg/product-hunt.svg" }, + "proftpd": { + "codepoint": 62330, + "source": "svg/proftpd.svg" + }, "puzzle-piece": { "codepoint": 61742, "source": "svg/puzzle-piece.svg" @@ -2923,6 +2983,10 @@ "codepoint": 61569, "source": "svg/twitter-square.svg" }, + "ubuntu": { + "codepoint": 62331, + "source": "svg/ubuntu.svg" + }, "umbrella": { "codepoint": 61673, "source": "svg/umbrella.svg" From 556d80b7c9cc20ce693039fc5d006b74aefc023c Mon Sep 17 00:00:00 2001 From: LFu Date: Sat, 12 Feb 2022 02:15:30 +0800 Subject: [PATCH 6/8] Update npm-publish-github-packages.yml to upload release asset --- .github/workflows/npm-publish-github-packages.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml index 837f28f2c..3a3c851a5 100644 --- a/.github/workflows/npm-publish-github-packages.yml +++ b/.github/workflows/npm-publish-github-packages.yml @@ -45,3 +45,14 @@ jobs: uses: actions/upload-artifact@v2.3.1 with: path: fork-awesome.tgz + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + if: github.event_name == 'release' + with: + upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./fork-awesome.tgz + asset_name: fork-awesome.tgz + asset_content_type: application/tar+gzip From ac3f4a518fa14926457b9f2914a5c9e5ccb4593c Mon Sep 17 00:00:00 2001 From: Lyuwen Fu Date: Sat, 12 Feb 2022 10:13:01 +0800 Subject: [PATCH 7/8] update .fontcustom-manifest.json --- src/icons/.fontcustom-manifest.json | 32 ++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/icons/.fontcustom-manifest.json b/src/icons/.fontcustom-manifest.json index 7b19291d9..07423dc3e 100644 --- a/src/icons/.fontcustom-manifest.json +++ b/src/icons/.fontcustom-manifest.json @@ -484,7 +484,7 @@ "source": "svg/camera-retro.svg" }, "canonical": { - "codepoint": 62317, + "codepoint": 62314, "source": "svg/canonical.svg" }, "car": { @@ -736,7 +736,7 @@ "source": "svg/code-fork.svg" }, "codeberg": { - "codepoint": 62318, + "codepoint": 62310, "source": "svg/codeberg.svg" }, "codepen": { @@ -908,7 +908,7 @@ "source": "svg/discord-alt.svg" }, "discourse": { - "codepoint": 62319, + "codepoint": 62311, "source": "svg/discourse.svg" }, "docker": { @@ -1060,11 +1060,11 @@ "source": "svg/eyedropper.svg" }, "eyeem": { - "codepoint": 62320, + "codepoint": 62308, "source": "svg/eyeem.svg" }, "eyeem-o": { - "codepoint": 62321, + "codepoint": 62309, "source": "svg/eyeem-o.svg" }, "f-droid": { @@ -1100,7 +1100,7 @@ "source": "svg/fax.svg" }, "fediverse": { - "codepoint": 62322, + "codepoint": 62305, "source": "svg/fediverse.svg" }, "female": { @@ -1276,7 +1276,7 @@ "source": "svg/free-code-camp.svg" }, "freedesktop": { - "codepoint": 62323, + "codepoint": 62313, "source": "svg/freedesktop.svg" }, "freedombox": { @@ -1536,7 +1536,7 @@ "source": "svg/heartbeat.svg" }, "hedgedoc": { - "codepoint": 62324, + "codepoint": 62304, "source": "svg/hedgedoc.svg" }, "heroku": { @@ -1656,7 +1656,7 @@ "source": "svg/ioxhost.svg" }, "ipfs": { - "codepoint": 62325, + "codepoint": 62322, "source": "svg/ipfs.svg" }, "italic": { @@ -1668,7 +1668,7 @@ "source": "svg/java.svg" }, "javascript": { - "codepoint": 62326, + "codepoint": 62320, "source": "svg/javascript.svg" }, "jirafeau": { @@ -1748,7 +1748,7 @@ "source": "svg/leanpub.svg" }, "lemmy": { - "codepoint": 62327, + "codepoint": 62321, "source": "svg/lemmy.svg" }, "lemon-o": { @@ -2016,7 +2016,7 @@ "source": "svg/mouse-pointer.svg" }, "mumble": { - "codepoint": 62328, + "codepoint": 62312, "source": "svg/mumble.svg" }, "music": { @@ -2092,7 +2092,7 @@ "source": "svg/orcid.svg" }, "osi": { - "codepoint": 62329, + "codepoint": 62307, "source": "svg/osi.svg" }, "outdent": { @@ -2268,7 +2268,7 @@ "source": "svg/product-hunt.svg" }, "proftpd": { - "codepoint": 62330, + "codepoint": 62306, "source": "svg/proftpd.svg" }, "puzzle-piece": { @@ -2984,7 +2984,7 @@ "source": "svg/twitter-square.svg" }, "ubuntu": { - "codepoint": 62331, + "codepoint": 62315, "source": "svg/ubuntu.svg" }, "umbrella": { @@ -3294,4 +3294,4 @@ "forkawesome/forkawesome.css", "forkawesome/forkawesome-preview.html" ] -} \ No newline at end of file +} From ec94724b1e4ebd37bd1134ad8d4b9e09b1e8f276 Mon Sep 17 00:00:00 2001 From: Lyuwen Fu Date: Sun, 13 Feb 2022 12:12:37 +0800 Subject: [PATCH 8/8] added a script to generate .fontcustom-manifest.json from icons.yml automatically --- src/icons/.fontcustom-manifest.json | 16 +++---- src/icons/fontcustom-manifest-template.json | 49 ++++++++++++++++++++ src/icons/prepare_fontcustom-manifest.py | 21 +++++++++ src/icons/svg/{unslpash.svg => unsplash.svg} | 0 4 files changed, 78 insertions(+), 8 deletions(-) create mode 100644 src/icons/fontcustom-manifest-template.json create mode 100644 src/icons/prepare_fontcustom-manifest.py rename src/icons/svg/{unslpash.svg => unsplash.svg} (100%) diff --git a/src/icons/.fontcustom-manifest.json b/src/icons/.fontcustom-manifest.json index 07423dc3e..532c8e64c 100644 --- a/src/icons/.fontcustom-manifest.json +++ b/src/icons/.fontcustom-manifest.json @@ -1,7 +1,7 @@ { "checksum": { - "previous": "77be5ba395262597be8705aeb118a44ec323eab3250929fbe080c1082b8423d5", - "current": "77be5ba395262597be8705aeb118a44ec323eab3250929fbe080c1082b8423d5" + "previous": "0a5cfbcc5436ea854eb765f3a613bd2bfa7e06ec419c31ef81c337987d577e9f", + "current": "0a5cfbcc5436ea854eb765f3a613bd2bfa7e06ec419c31ef81c337987d577e9f" }, "fonts": [ "forkawesome/forkawesome.ttf", @@ -296,11 +296,11 @@ "source": "svg/behance-square.svg" }, "bell": { - "codepoint": 61683, + "codepoint": 61602, "source": "svg/bell.svg" }, "bell-o": { - "codepoint": 61602, + "codepoint": 61683, "source": "svg/bell-o.svg" }, "bell-ringing": { @@ -308,7 +308,7 @@ "source": "svg/bell-ringing.svg" }, "bell-ringing-o": { - "codepoint": 62304, + "codepoint": 62256, "source": "svg/bell-ringing-o.svg" }, "bell-slash": { @@ -3019,9 +3019,9 @@ "codepoint": 61758, "source": "svg/unlock-alt.svg" }, - "unslpash": { + "unsplash": { "codepoint": 62245, - "source": "svg/unslpash.svg" + "source": "svg/unsplash.svg" }, "upload": { "codepoint": 61587, @@ -3294,4 +3294,4 @@ "forkawesome/forkawesome.css", "forkawesome/forkawesome-preview.html" ] -} +} \ No newline at end of file diff --git a/src/icons/fontcustom-manifest-template.json b/src/icons/fontcustom-manifest-template.json new file mode 100644 index 000000000..822973e22 --- /dev/null +++ b/src/icons/fontcustom-manifest-template.json @@ -0,0 +1,49 @@ +{ + "checksum": { + "previous": "", + "current": "" + }, + "fonts": [ + "forkawesome/forkawesome.ttf", + "forkawesome/forkawesome.svg", + "forkawesome/forkawesome.woff", + "forkawesome/forkawesome.eot", + "forkawesome/forkawesome.woff2" + ], + "glyphs": { + }, + "options": { + "autowidth": true, + "config": "fontcustom.yml", + "copyright": "The Fork Awesome font is licensed under the SIL OFL 1.1 (http://scripts.sil.org/OFL). Fork Awesome is a fork based of off Font Awesome 4.7.0 by Dave Gandy. More info on licenses at https://forkawesome.github.io", + "css3": false, + "css_selector": ".fa-{{glyph}}", + "debug": false, + "font_ascent": 1536, + "font_descent": 256, + "font_design_size": 16, + "font_em": 1792, + "font_name": "forkawesome", + "force": false, + "input": { + "templates": "svg", + "vectors": "svg" + }, + "no_hash": true, + "output": { + "css": "forkawesome", + "fonts": "forkawesome", + "preview": "forkawesome" + }, + "preprocessor_path": "", + "quiet": false, + "templates": [ + "css", + "preview" + ] + }, + "templates": [ + "forkawesome/forkawesome.css", + "forkawesome/forkawesome-preview.html" + ] +} diff --git a/src/icons/prepare_fontcustom-manifest.py b/src/icons/prepare_fontcustom-manifest.py new file mode 100644 index 000000000..82eda9dfa --- /dev/null +++ b/src/icons/prepare_fontcustom-manifest.py @@ -0,0 +1,21 @@ +import json +import yaml +import operator + +def main(): + manifest = json.load(open("fontcustom-manifest-template.json", "r")) + icons = yaml.safe_load(open("icons.yml", "r")) + + for icon in sorted(icons["icons"], key=operator.itemgetter("id")): + manifest["glyphs"][icon["id"]] ={ + "codepoint": int(icon["unicode"], base=16), + "source": "svg/{}.svg".format(icon["id"]) + } + + + json.dump(manifest, open(".fontcustom-manifest.json","w"), indent=2) + + +if __name__ == "__main__": + main() + diff --git a/src/icons/svg/unslpash.svg b/src/icons/svg/unsplash.svg similarity index 100% rename from src/icons/svg/unslpash.svg rename to src/icons/svg/unsplash.svg