├── .github └── workflows │ └── build.yaml ├── .gitignore ├── .init.stamp ├── AUTHORS.txt ├── CONTRIBUTORS.txt ├── Makefile ├── OFL.txt ├── README.md ├── documentation ├── DESCRIPTION.en_us.html ├── P_DESCRIPTION.en_us.html ├── header.png └── image1.py ├── fonts └── ttf │ ├── BIZUDGothic-Bold.ttf │ ├── BIZUDGothic-Regular.ttf │ ├── BIZUDPGothic-Bold.ttf │ └── BIZUDPGothic-Regular.ttf ├── requirements.txt ├── scripts ├── first-run.py └── index.html ├── sources ├── build.py ├── extensions │ ├── BIZ-UDGothic-BoldExt.glyphs │ ├── BIZ-UDGothicExt.glyphs │ ├── BIZ-UDPGothic-BoldExt.glyphs │ ├── BIZ-UDPGothicExt.glyphs │ └── otf │ │ ├── BIZ-UDGothic-Bold.otf │ │ ├── BIZ-UDGothic.otf │ │ ├── BIZ-UDPGothic-Bold.otf │ │ ├── BIZ-UDPGothic.otf │ │ └── README.md └── ttf │ ├── BIZ-UDGothic-Bold.ttf │ ├── BIZ-UDGothic.ttf │ ├── BIZ-UDPGothic-Bold.ttf │ ├── BIZ-UDPGothic.ttf │ └── README.md └── workflows └── build.yaml /.github/workflows/build.yaml: -------------------------------------------------------------------------------- 1 | name: Build font and specimen 2 | 3 | on: [push, release] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - name: Set up Python 3.8 11 | uses: actions/setup-python@v2 12 | with: 13 | python-version: 3.8 14 | - name: Install sys tools/deps 15 | run: | 16 | sudo apt-get update 17 | sudo apt-get install ttfautohint 18 | sudo snap install yq 19 | - uses: actions/cache@v2 20 | with: 21 | path: ./venv/ 22 | key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements*.txt') }} 23 | restore-keys: | 24 | ${{ runner.os }}-venv- 25 | - name: Do first-run script if necessary 26 | run: make .init.stamp 27 | if: github.repository != 'googlefonts/Unified-Font-Repository' 28 | - uses: stefanzweifel/git-auto-commit-action@v4 29 | name: First-run setup 30 | if: github.repository != 'googlefonts/Unified-Font-Repository' 31 | with: 32 | file_pattern: .init.stamp README.md requirements.txt 33 | - name: gen zip file name 34 | id: zip-name 35 | shell: bash 36 | # Set the archive name to repo name + "-assets" e.g "MavenPro-assets" 37 | run: echo "ZIP_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')-fonts" >> $GITHUB_ENV 38 | # If a new release is cut, use the release tag to auto-bump the source files 39 | - name: Build font 40 | run: make build 41 | - name: Check with fontbakery 42 | run: make test 43 | continue-on-error: true 44 | - name: proof 45 | run: make proof 46 | - name: setup site 47 | run: cp scripts/index.html out/index.html 48 | - name: Deploy 49 | uses: peaceiris/actions-gh-pages@v3 50 | if: ${{ github.ref == 'refs/heads/main' }} 51 | with: 52 | github_token: ${{ secrets.GITHUB_TOKEN }} 53 | publish_dir: ./out 54 | - name: Archive artifacts 55 | uses: actions/upload-artifact@v2 56 | with: 57 | name: ${{ env.ZIP_NAME }} 58 | path: | 59 | fonts 60 | out 61 | outputs: 62 | zip_name: ${{ env.ZIP_NAME }} 63 | release: 64 | # only run if the commit is tagged... 65 | if: github.event_name == 'release' 66 | # ... and it builds successfully 67 | needs: 68 | - build 69 | runs-on: ubuntu-latest 70 | env: 71 | ZIP_NAME: ${{ needs.build.outputs.zip_name }} 72 | steps: 73 | - uses: actions/checkout@v2 74 | - name: Download artefact files 75 | uses: actions/download-artifact@v2 76 | with: 77 | name: ${{ env.ZIP_NAME }} 78 | path: ${{ env.ZIP_NAME }} 79 | - name: Zip files 80 | run: zip -r ${{ env.ZIP_NAME }}.zip ${{ env.ZIP_NAME }} 81 | - name: Upload binaries to release 82 | uses: svenstaro/upload-release-action@v2 83 | with: 84 | repo_token: ${{ secrets.GITHUB_TOKEN }} 85 | file: ${{ env.ZIP_NAME }}.zip 86 | asset_name: ${{ env.ZIP_NAME }}.zip 87 | tag: ${{ github.ref }} 88 | overwrite: true 89 | body: "Production ready fonts" 90 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | venv 3 | build.stamp 4 | proof 5 | node_modules 6 | package-lock.json 7 | package.json 8 | 9 | # OS generated files # 10 | ###################### 11 | .DS_Store 12 | .DS_Store? 13 | ._* 14 | .Spotlight-V100 15 | .Trashes 16 | ehthumbs.db 17 | Thumbs.db 18 | -------------------------------------------------------------------------------- /.init.stamp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlefonts/morisawa-biz-ud-gothic/18934af56b9c003ca58c54bffbf226848cb11032/.init.stamp -------------------------------------------------------------------------------- /AUTHORS.txt: -------------------------------------------------------------------------------- 1 | # This is the official list of project authors for copyright purposes. 2 | # This file is distinct from the CONTRIBUTORS.txt file. 3 | # See the latter for an explanation. 4 | # 5 | # Names should be added to this file as: 6 | # Morisawa Inc. 7 | # Type Network 8 | 9 | -------------------------------------------------------------------------------- /CONTRIBUTORS.txt: -------------------------------------------------------------------------------- 1 | # This is the list of people who have contributed to this project, 2 | # and includes those not listed in AUTHORS.txt because they are not 3 | # copyright authors. For example, company employees may be listed 4 | # here because their company holds the copyright and is listed there. 5 | # 6 | # When adding J Random Contributor's name to this file, either J's 7 | # name or J's organization's name should be added to AUTHORS.txt 8 | # 9 | # Names should be added to this file as: 10 | # Morisawa Inc. 11 | # Type Network -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | DRAWBOT_SCRIPTS=$(shell ls documentation/*.py) 2 | DRAWBOT_OUTPUT=$(shell ls documentation/*.py | sed 's/\.py/.png/g') 3 | 4 | help: 5 | @echo "###" 6 | @echo "# Build targets for UD Gothic" 7 | @echo "###" 8 | @echo 9 | @echo " make build: Builds the fonts and places them in the fonts/ directory" 10 | @echo " make test: Tests the fonts with fontbakery" 11 | @echo " make proof: Creates HTML proof documents in the proof/ directory" 12 | @echo " make images: Creates PNG specimen images in the documentation/ directory" 13 | @echo 14 | 15 | build: build.stamp 16 | 17 | venv: venv/touchfile 18 | 19 | build.stamp: venv .init.stamp sources/build.py 20 | . venv/bin/activate; rm -rf fonts/; python3 sources/build.py && touch build.stamp 21 | 22 | .init.stamp: venv 23 | . venv/bin/activate; python3 scripts/first-run.py 24 | 25 | venv/touchfile: requirements.txt 26 | test -d venv || python3 -m venv venv 27 | . venv/bin/activate; pip install -Ur requirements.txt 28 | touch venv/touchfile 29 | 30 | test: venv build.stamp 31 | . venv/bin/activate; mkdir -p out/ out/fontbakery; fontbakery check-googlefonts -l WARN --succinct --badges out/badges --html out/fontbakery/fontbakery-report.html --ghmarkdown out/fontbakery/fontbakery-report.md $(shell find fonts/ttf -type f) 32 | 33 | proof: venv build.stamp 34 | . venv/bin/activate; mkdir -p out/ out/proof; gftools gen-html proof $(shell find fonts/ttf -type f) -o out/proof 35 | 36 | images: venv build.stamp $(DRAWBOT_OUTPUT) 37 | git add documentation/*.png && git commit -m "Rebuild images" documentation/*.png 38 | 39 | %.png: %.py build.stamp 40 | python3 $< --output $@ 41 | 42 | clean: 43 | rm -rf venv 44 | find . -name "*.pyc" | xargs rm delete 45 | 46 | update-ufr: 47 | npx update-template https://github.com/googlefonts/Unified-Font-Repository/ 48 | 49 | update: 50 | pip install --upgrade $(dependency); pip freeze > requirements.txt 51 | -------------------------------------------------------------------------------- /OFL.txt: -------------------------------------------------------------------------------- 1 | Copyright 2022 The BIZ UDGothic Project Authors (https://github.com/googlefonts/morisawa-biz-ud-mincho) 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. 94 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Morisawa BIZ UDGothic 2 | 3 | ![UDgothic](documentation/header.png) 4 | 5 | 17 | モリサワのBIZ UDゴシックは、教育やビジネス文書作成などに活用できるよう、より多くの方にとって読みやすく使いやすいように設計されたユニバーサルデザインフォントです。読みやすさとデザインバランスに優れた、すっきりとしたUDゴシック書体で、漢字の省略できるハネやゲタを取ることで、文字をクリアに見せています。大きめな字面でも文字としてのかたちのバランスを損ねないよう、フトコロなどの空間を細かく調整しています。かなは漢字に比べてやや小ぶりに作られており、細いウエイトで長文を組むとほどよい抑揚が生まれます。 18 | 19 | BIZ UD Gothic is a universal design typeface designed to be easy to read and ideal for education and business documentation. It is a highly legible and well-balanced design sans serif. In order to make the kanji more clear and identifiable, the letterforms are simplified by omitting hane (hook) and geta (the vertical lines extending beyond horizontal strokes at the bottom of kanji). Counters and other spaces are finely adjusted so that the overall balance of the type is not impaired even with the use in relatively large size. The kana are made slightly smaller than the kanji to give a good rhythm and flow when setting long texts in the lighter weights. 20 | 21 | Download the latest version of the fonts [from the releases page](https://github.com/googlefonts/morisawa-biz-ud-gothic/releases). 22 | 23 | ## About Morisawa 24 | 25 | モリサワは、1924 年に世界に先駆けて邦文写真植字機を発明して以来、一貫してタイポグラフィの未来をみつめて研究開発を続けているフォントメーカーです。日本語および多言語フォント 1,500 書体以上が使えるフォントライセンス製品をはじめ、web フォントや組込みフォント、多言語ユニバーサル情報配信ツールなどを提供しています。 26 | 27 | Morisawa Inc. is Japan’s leading font foundry that has never wavered from its commitment to undertaking research and development in typography since its invention of the first Japanese phototypesetting machine in 1924. The company provides font licenses for over 1,500 typefaces of Japanese and multi-script, web font services, embedded fonts, and multilingual e-magazine/book solution services. 28 | 29 | 30 | ## Building 31 | 32 | Fonts are built automatically by GitHub Actions - take a look in the "Actions" tab for the latest build. 33 | 34 | If you want to build fonts manually on your own computer: 35 | 36 | * `make build` will produce font files. 37 | * `make test` will run [FontBakery](https://github.com/googlefonts/fontbakery)'s quality assurance tests. 38 | * `make proof` will generate HTML proof files. 39 | 40 | The proof files and QA tests are also available automatically via GitHub Actions - look at https://googlefonts.github.io/morisawa-biz-ud-gothic/. 41 | 42 | ## Changelog 43 | 44 | **11 March 2022** 45 | - Font released with Google Core glyph set 46 | 47 | ## License 48 | 49 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 50 | This license is available with a FAQ at 51 | https://scripts.sil.org/OFL 52 | 53 | ## Repository Layout 54 | 55 | This font repository structure is inspired by [Unified Font Repository v0.3](https://github.com/unified-font-repository/Unified-Font-Repository), modified for the Google Fonts workflow. 56 | -------------------------------------------------------------------------------- /documentation/DESCRIPTION.en_us.html: -------------------------------------------------------------------------------- 1 |

モリサワのBIZ UDゴシックは、教育やビジネス文書作成などに活用できるよう、より多くの方にとって読みやすく使いやすいように設計されたユニバーサルデザインフォントです。読みやすさとデザインバランスに優れた、すっきりとしたUDゴシック書体で、漢字の省略できるハネやゲタを取ることで、文字をクリアに見せています。大きめな字面でも文字としてのかたちのバランスを損ねないよう、フトコロなどの空間を細かく調整しています。かなは漢字に比べてやや小ぶりに作られており、細いウエイトで長文を組むとほどよい抑揚が生まれます。 2 | 3 | BIZ UD Gothic is a universal design typeface designed to be easy to read and ideal for education and business documentation. It is a highly legible and well-balanced design sans serif. In order to make the kanji more clear and identifiable, the letterforms are simplified by omitting hane (hook) and geta (the vertical lines extending beyond horizontal strokes at the bottom of kanji). Counters and other spaces are finely adjusted so that the overall balance of the type is not impaired even with the use in relatively large size. The kana are made slightly smaller than the kanji to give a good rhythm and flow when setting long texts in the lighter weights. 4 |

5 |

6 | UD Gothic includes full-width kana. UD PGothic (https://fonts.google.com/specimen/BIZUDPGothic) includes proportional-wdith kana. 7 |

8 |

9 | To contribute to the project, visit https://github.com/googlefonts/morisawa-biz-ud-gothic 10 |

11 | -------------------------------------------------------------------------------- /documentation/P_DESCRIPTION.en_us.html: -------------------------------------------------------------------------------- 1 |

モリサワのBIZ UDゴシックは、教育やビジネス文書作成などに活用できるよう、より多くの方にとって読みやすく使いやすいように設計されたユニバーサルデザインフォントです。読みやすさとデザインバランスに優れた、すっきりとしたUDゴシック書体で、漢字の省略できるハネやゲタを取ることで、文字をクリアに見せています。大きめな字面でも文字としてのかたちのバランスを損ねないよう、フトコロなどの空間を細かく調整しています。かなは漢字に比べてやや小ぶりに作られており、細いウエイトで長文を組むとほどよい抑揚が生まれます。 2 | 3 | BIZ UD Gothic is a universal design typeface designed to be easy to read and ideal for education and business documentation. It is a highly legible and well-balanced design sans serif. In order to make the kanji more clear and identifiable, the letterforms are simplified by omitting hane (hook) and geta (the vertical lines extending beyond horizontal strokes at the bottom of kanji). Counters and other spaces are finely adjusted so that the overall balance of the type is not impaired even with the use in relatively large size. The kana are made slightly smaller than the kanji to give a good rhythm and flow when setting long texts in the lighter weights. 4 |

5 |

6 | UD PGothic includes proportional-wdith kana. UD PGothic (https://fonts.google.com/specimen/BIZUDGothic) includes full-width kana. 7 |

8 |

9 | To contribute to the project, visit https://github.com/googlefonts/morisawa-biz-ud-gothic 10 |

11 | -------------------------------------------------------------------------------- /documentation/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlefonts/morisawa-biz-ud-gothic/18934af56b9c003ca58c54bffbf226848cb11032/documentation/header.png -------------------------------------------------------------------------------- /documentation/image1.py: -------------------------------------------------------------------------------- 1 | # This script is meant to be run from the root level 2 | # of your font's git repository. For example, from a Unix terminal: 3 | # $ git clone my-font 4 | # $ cd my-font 5 | # $ python3 documentation/image1.py --output documentation/image1.png 6 | 7 | # Import moduels from external python packages: https://pypi.org/ 8 | from drawbot_skia.drawbot import * 9 | from fontTools.ttLib import TTFont 10 | from fontTools.misc.fixedTools import floatToFixedToStr 11 | 12 | # Import moduels from the Python Standard Library: https://docs.python.org/3/library/ 13 | import subprocess 14 | import sys 15 | import argparse 16 | 17 | # Constants, these are the main "settings" for the image 18 | WIDTH, HEIGHT, MARGIN, FRAMES = 2048, 2048, 128, 1 19 | FONT_PATH = "fonts/ttf/Rubik-Regular.ttf" 20 | FONT_LICENSE = "OFL v1.1" 21 | AUXILIARY_FONT = "Helvetica" 22 | AUXILIARY_FONT_SIZE = 48 23 | BIG_TEXT = "Aa" 24 | BIG_TEXT_FONT_SIZE = 1024 25 | BIG_TEXT_SIDE_MARGIN = MARGIN * 3.1 26 | BIG_TEXT_BOTTOM_MARGIN = MARGIN * 5.5 27 | GRID_VIEW = False # Change this to "True" for a grid overlay 28 | 29 | # Handel the "--output" flag 30 | # For example: $ python3 documentation/image1.py --output documentation/image1.png 31 | parser = argparse.ArgumentParser() 32 | parser.add_argument("--output", metavar="PNG", help="where to write the PNG file") 33 | args = parser.parse_args() 34 | 35 | # Load the font with the parts of fonttools that are imported with the line: 36 | # from fontTools.ttLib import TTFont 37 | # Docs Link: https://fonttools.readthedocs.io/en/latest/ttLib/ttFont.html 38 | ttFont = TTFont(FONT_PATH) 39 | 40 | # Constants that are worked out dynamically 41 | MY_URL = subprocess.check_output("git remote get-url origin", shell=True).decode() 42 | MY_HASH = subprocess.check_output("git rev-parse --short HEAD", shell=True).decode() 43 | FONT_NAME = ttFont["name"].getDebugName(4) 44 | FONT_VERSION = "v%s" % floatToFixedToStr(ttFont["head"].fontRevision, 16) 45 | 46 | 47 | # Draws a grid 48 | def grid(): 49 | stroke(1, 0, 0, 0.75) 50 | strokeWidth(2) 51 | STEP_X, STEP_Y = 0, 0 52 | INCREMENT_X, INCREMENT_Y = MARGIN / 2, MARGIN / 2 53 | rect(MARGIN, MARGIN, WIDTH - (MARGIN * 2), HEIGHT - (MARGIN * 2)) 54 | for x in range(29): 55 | polygon((MARGIN + STEP_X, MARGIN), (MARGIN + STEP_X, HEIGHT - MARGIN)) 56 | STEP_X += INCREMENT_X 57 | for y in range(29): 58 | polygon((MARGIN, MARGIN + STEP_Y), (WIDTH - MARGIN, MARGIN + STEP_Y)) 59 | STEP_Y += INCREMENT_Y 60 | polygon((WIDTH / 2, 0), (WIDTH / 2, HEIGHT)) 61 | polygon((0, HEIGHT / 2), (WIDTH, HEIGHT / 2)) 62 | 63 | 64 | # Remap input range to VF axis range 65 | # This is useful for animation 66 | # (E.g. sinewave(-1,1) to wght(100,900)) 67 | def remap(value, inputMin, inputMax, outputMin, outputMax): 68 | inputSpan = inputMax - inputMin # FIND INPUT RANGE SPAN 69 | outputSpan = outputMax - outputMin # FIND OUTPUT RANGE SPAN 70 | valueScaled = float(value - inputMin) / float(inputSpan) 71 | return outputMin + (valueScaled * outputSpan) 72 | 73 | 74 | # Draw the page/frame and a grid if "GRID_VIEW" is set to "True" 75 | def draw_background(): 76 | newPage(WIDTH, HEIGHT) 77 | fill(0) 78 | rect(-2, -2, WIDTH + 2, HEIGHT + 2) 79 | if GRID_VIEW: 80 | grid() 81 | else: 82 | pass 83 | 84 | 85 | # Draw main text 86 | def draw_main_text(): 87 | fill(1) 88 | stroke(None) 89 | font(FONT_PATH) 90 | fontSize(BIG_TEXT_FONT_SIZE) 91 | # Adjust this line to center main text manually. 92 | # TODO: This should be done automatically when drawbot-skia 93 | # has support for textBox() and FormattedString 94 | #text(BIG_TEXT, ((WIDTH / 2) - MARGIN * 4.75, (HEIGHT / 2) - MARGIN * 2.5)) 95 | text(BIG_TEXT, (BIG_TEXT_SIDE_MARGIN, BIG_TEXT_BOTTOM_MARGIN)) 96 | 97 | 98 | # Divider lines 99 | def draw_divider_lines(): 100 | stroke(1) 101 | strokeWidth(4) 102 | lineCap("round") 103 | line((MARGIN, HEIGHT - MARGIN), (WIDTH - MARGIN, HEIGHT - MARGIN)) 104 | line((MARGIN, MARGIN + (MARGIN / 2)), (WIDTH - MARGIN, MARGIN + (MARGIN / 2))) 105 | stroke(None) 106 | 107 | 108 | # Draw text describing the font and it's git status & repo URL 109 | def draw_auxiliary_text(): 110 | # Setup 111 | font(AUXILIARY_FONT) 112 | fontSize(AUXILIARY_FONT_SIZE) 113 | POS_TOP_LEFT = (MARGIN, HEIGHT - MARGIN * 1.5) 114 | POS_TOP_RIGHT = (WIDTH - MARGIN, HEIGHT - MARGIN * 1.5) 115 | POS_BOTTOM_LEFT = (MARGIN, MARGIN) 116 | POS_BOTTOM_RIGHT = (WIDTH - MARGIN * 0.95, MARGIN) 117 | URL_AND_HASH = MY_URL + "at commit " + MY_HASH 118 | URL_AND_HASH = URL_AND_HASH.replace("\n", " ") 119 | # Draw Text 120 | text(FONT_NAME, POS_TOP_LEFT, align="left") 121 | text(FONT_VERSION, POS_TOP_RIGHT, align="right") 122 | text(URL_AND_HASH, POS_BOTTOM_LEFT, align="left") 123 | text(FONT_LICENSE, POS_BOTTOM_RIGHT, align="right") 124 | 125 | 126 | # Build and save the image 127 | if __name__ == "__main__": 128 | draw_background() 129 | draw_main_text() 130 | draw_divider_lines() 131 | draw_auxiliary_text() 132 | # Save output, using the "--output" flag location 133 | saveImage(args.output) 134 | # Print done in the terminal 135 | print("DrawBot: Done") 136 | -------------------------------------------------------------------------------- /fonts/ttf/BIZUDGothic-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlefonts/morisawa-biz-ud-gothic/18934af56b9c003ca58c54bffbf226848cb11032/fonts/ttf/BIZUDGothic-Bold.ttf -------------------------------------------------------------------------------- /fonts/ttf/BIZUDGothic-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlefonts/morisawa-biz-ud-gothic/18934af56b9c003ca58c54bffbf226848cb11032/fonts/ttf/BIZUDGothic-Regular.ttf -------------------------------------------------------------------------------- /fonts/ttf/BIZUDPGothic-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlefonts/morisawa-biz-ud-gothic/18934af56b9c003ca58c54bffbf226848cb11032/fonts/ttf/BIZUDPGothic-Bold.ttf -------------------------------------------------------------------------------- /fonts/ttf/BIZUDPGothic-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlefonts/morisawa-biz-ud-gothic/18934af56b9c003ca58c54bffbf226848cb11032/fonts/ttf/BIZUDPGothic-Regular.ttf -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | absl-py==1.0.0 2 | appdirs==1.4.4 3 | attrs==21.4.0 4 | babelfont==2.0.2 5 | beautifulsoup4==4.10.0 6 | beziers==0.4.0 7 | booleanOperations==0.9.0 8 | Brotli==1.0.9 9 | browserstack-local==1.2.2 10 | bump2version==1.0.1 11 | bumpfontversion==0.3.0 12 | cattrs==1.10.0 13 | certifi==2021.10.8 14 | cffi==1.15.0 15 | cffsubr==0.2.9.post1 16 | charset-normalizer==2.0.12 17 | click==8.0.4 18 | cmarkgfm==0.8.0 19 | collidoscope==0.4.1 20 | colorlog==6.6.0 21 | commandlines==0.4.1 22 | commonmark==0.9.1 23 | compreffor==0.5.1.post1 24 | cu2qu==1.6.7.post1 25 | defcon==0.10.0 26 | dehinter==4.0.0 27 | Deprecated==1.2.13 28 | drawbot-skia==0.4.8 29 | font-v==2.1.0 30 | fontbakery==0.8.7 31 | fontdiffenator==0.9.12 32 | fontmake==2.4.1 33 | fontMath==0.9.1 34 | fontParts==0.10.3 35 | fontPens==0.2.4 36 | fonttools==4.30.0 37 | freetype-py==2.2.0 38 | fs==2.4.15 39 | gfdiffbrowsers==0.1.7 40 | gftools==0.9.0 41 | gitdb==4.0.9 42 | GitPython==3.1.27 43 | glyphsets==0.2.1 44 | glyphsLib==6.0.0b4 45 | glyphtools==0.8.0 46 | hyperglot==0.3.8 47 | idna==3.3 48 | Jinja2==3.0.3 49 | lxml==4.8.0 50 | MarkupSafe==2.1.0 51 | numpy==1.22.3 52 | openstep-plist==0.3.0 53 | opentype-sanitizer==8.2.1 54 | opentypespec==1.8.4 55 | Pillow==9.0.1 56 | pip-api==0.0.29 57 | protobuf==3.19.4 58 | psutil==5.9.0 59 | pybind11==2.9.1 60 | pybrowserstack-screenshots==0.1 61 | pycairo==1.21.0 62 | pyclipper==1.3.0.post2 63 | pycparser==2.21 64 | pygit2==1.9.0 65 | PyGithub==1.55 66 | Pygments==2.11.2 67 | PyJWT==2.3.0 68 | PyNaCl==1.5.0 69 | pyparsing==3.0.7 70 | python-bidi==0.4.2 71 | python-dateutil==2.8.2 72 | pytz==2021.3 73 | PyYAML==6.0 74 | requests==2.27.1 75 | rich==12.0.0 76 | rstr==3.1.0 77 | sh==1.14.2 78 | simplejson==3.17.6 79 | six==1.16.0 80 | skia-pathops==0.7.2 81 | skia-python==87.4 82 | smmap==5.0.0 83 | soupsieve==2.3.1 84 | sre-yield==1.2 85 | statmake==0.4.1 86 | strictyaml==1.6.1 87 | stringbrewer==0.0.1 88 | tabulate==0.8.9 89 | toml==0.10.2 90 | ttfautohint-py==0.5.1 91 | ufo2ft==2.25.3 92 | ufoLib2==0.13.1 93 | ufolint==1.2.0 94 | uharfbuzz==0.21.0 95 | unicodedata2==14.0.0 96 | Unidecode==1.3.4 97 | urllib3==1.26.8 98 | vharfbuzz==0.1.1 99 | vttLib==0.11.0 100 | wrapt==1.14.0 101 | -------------------------------------------------------------------------------- /scripts/first-run.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This script is run the first time any action is performed after the repository 4 | # is cloned. If you are reading this because the automatic initialization failed, 5 | # skip down to the section headed "INITIALIZATION STEPS". 6 | 7 | from sh import git 8 | import re 9 | import sys 10 | from urllib.parse import quote 11 | import subprocess 12 | 13 | BASE_OWNER = "googlefonts" 14 | BASE_REPONAME = "Unified-Font-Repository" 15 | DUMMY_URL = "https://yourname.github.io/your-font-repository-name" 16 | 17 | 18 | def repo_url(owner, name): 19 | return f"https://github.com/{owner}/{name}" 20 | 21 | 22 | def web_url(owner, name): 23 | return f"https://{owner}.github.io/{name}" 24 | 25 | 26 | def raw_url(owner, name): 27 | return f"https://raw.githubusercontent.com/{owner}/{name}" 28 | 29 | 30 | def touch(): 31 | open(".init.stamp", "w").close() 32 | 33 | 34 | def lose(msg, e=None): 35 | print(msg) 36 | print("You will need to do the initialization steps manually.") 37 | print("Read scripts/first-run.py for more instructions how to do this.") 38 | if e: 39 | print( 40 | "\nHere's an additional error message which may help diagnose the problem." 41 | ) 42 | raise e 43 | sys.exit(1) 44 | 45 | 46 | try: 47 | my_repo_url = git.remote("get-url", "origin") 48 | except Exception as e: 49 | lose("Could not use git to find my own repository URL", e) 50 | 51 | m = re.match(r"(?:https://github.com/|git@github.com:)(.*)/(.*)/?", str(my_repo_url)) 52 | if not m: 53 | lose( 54 | f"My git repository URL ({my_repo_url}) didn't look what I expected - are you hosting this on github?" 55 | ) 56 | 57 | owner, reponame = m[1], m[2] 58 | 59 | if owner == BASE_OWNER and reponame == BASE_REPONAME: 60 | print("I am being run on the upstream repository (probably due to CI)") 61 | print("All I'm going to do is create the touch file and quit.") 62 | touch() 63 | sys.exit() 64 | 65 | # INITIALIZATION STEPS 66 | 67 | # First, the README file contains URLs to pages in the `gh-pages` branch of the 68 | # repo. When initially cloned, these URLs will point to the 69 | # googlefonts/Unified-Font-Repository itself. But downstream users want links 70 | # and badges about their own font, not ours! So any URLs need to be adjusted to 71 | # refer to the end user's repository. 72 | 73 | # We will also pin the dependencies so future builds are reproducible. 74 | 75 | readme = open("README.md").read() 76 | 77 | print( 78 | "Fixing URLs:", web_url(BASE_OWNER, BASE_REPONAME), "->", web_url(owner, reponame) 79 | ) 80 | 81 | readme = readme.replace(web_url(BASE_OWNER, BASE_REPONAME), web_url(owner, reponame)) 82 | # In the badges, the URLs to raw.githubusercontent.com are URL-encoded as they 83 | # are passed to shields.io. 84 | print( 85 | "Fixing URLs:", 86 | quote(raw_url(BASE_OWNER, BASE_REPONAME), safe=""), 87 | "->", 88 | quote(raw_url(owner, reponame), safe=""), 89 | ) 90 | readme = readme.replace( 91 | quote(raw_url(BASE_OWNER, BASE_REPONAME), safe=""), 92 | quote(raw_url(owner, reponame), safe=""), 93 | ) 94 | 95 | print( 96 | "Fixing URLs:", 97 | DUMMY_URL, 98 | "->", 99 | web_url(owner, reponame), 100 | ) 101 | readme = readme.replace( 102 | f"`{DUMMY_URL}`", 103 | web_url(owner, reponame), 104 | ) 105 | 106 | with open("README.md", "w") as fh: 107 | fh.write(readme) 108 | 109 | # Pin the dependencies 110 | print("Pinning dependencies") 111 | dependencies = subprocess.check_output(["pip", "freeze"]) 112 | with open("requirements.txt", "wb") as dependency_file: 113 | dependency_file.write(dependencies) 114 | 115 | # Finally, we add a "touch file" called ".init.stamp" to the repository which 116 | # prevents this first-run process from being run again. 117 | touch() 118 | -------------------------------------------------------------------------------- /scripts/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | My Font development 7 | 8 | 9 |

My Font testing pages

10 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /sources/build.py: -------------------------------------------------------------------------------- 1 | from fontTools.ttLib import TTFont, newTable 2 | from fontTools.ttLib.tables import _c_m_a_p 3 | from fontTools import merge 4 | from pathlib import Path 5 | import glob 6 | import fontmake.__main__ 7 | import os, shutil, subprocess 8 | 9 | # Morisawa UD font merging script 10 | # For these particular fonts, we have chosen to preserve the existing TTFs as delivered directly from Morisawa, and merge the additional glyphs via a build script. 11 | # 12 | # This script converts the "extensions" Glyphs file to TTF, autohints it, and then merges it into the existing TTF file via psftmerge. There's some oddities in this process which have to be solved in post-production at the end of the process due to tables getting dropped / metadata being set differently. 13 | 14 | os.mkdir("temp") 15 | os.mkdir("fonts") 16 | os.mkdir("fonts/ttf") 17 | 18 | IMPORT = Path('sources/ttf') 19 | TEMP = Path('temp') 20 | EXPORT = Path('fonts/ttf') 21 | SRC_IMPORT = Path("sources/extensions") 22 | VERSION = "1.051" 23 | 24 | for font in IMPORT.glob("*.ttf"): 25 | 26 | # Step 1 - create ttf for extension to the font 27 | fontName = str(font).split("/")[2] 28 | sourceTTF = TTFont(font) 29 | 30 | fontmake.__main__.main([ 31 | "-g", str(SRC_IMPORT / str(fontName[:-4]+"Ext.glyphs")), 32 | "-o", "ttf", 33 | "--output-dir", 34 | str(TEMP), 35 | ]) 36 | 37 | if "Bold" in fontName: 38 | extSource = str(TEMP / str(fontName[:-4].replace("-Bold","Ext-Bold"+".ttf"))) 39 | outputTTF = str(fontName) 40 | else: 41 | extSource = str(TEMP / str(fontName[:-4]+"Ext-Regular.ttf")) 42 | outputTTF = str(fontName[:-4]+"-Regular.ttf") 43 | 44 | 45 | # For some reason, the autohinter built into fontmake is not working, so I'm doing it separately here which works 46 | subprocess.check_call( 47 | [ 48 | "ttfautohint", 49 | "--symbol", 50 | "--reference="+str(font), 51 | extSource, 52 | extSource[:-4] + "-hinted.ttf", 53 | ] 54 | ) 55 | 56 | # Here I'm stripping the .notdef chararter to avoid it showing up in the final font 57 | subprocess.check_call( 58 | [ 59 | "pyftsubset", 60 | extSource[:-4] + "-hinted.ttf", 61 | "--glyphs=*" 62 | ] 63 | ) 64 | 65 | shutil.move(extSource[:-4] + "-hinted.subset.ttf", extSource) 66 | os.remove(extSource[:-4] + "-hinted.ttf") 67 | 68 | # Step 2 - Some metadata changes to align with GF expectations 69 | # NAME table modifications 70 | sourceTTF["name"].removeNames(platformID=1) 71 | 72 | for platformID in [1033, 1041]: 73 | name = str(sourceTTF["name"].getName(1,3,1,platformID)) 74 | 75 | sourceTTF["name"].setName("Copyright 2022 The BIZ UDGothic Project Authors (https://github.com/googlefonts/morisawa-biz-ud-gothic)",0,3,1,platformID) 76 | sourceTTF["name"].setName("Version "+VERSION,5,3,1,platformID) 77 | 78 | if "Bold" in fontName: #aligning psnames with google standards. Shouldn't impact compatibility. 79 | sourceTTF["name"].setName(name.replace("BIZ ","BIZ")+"-Bold",6,3,1,platformID) 80 | else: 81 | sourceTTF["name"].setName(name.replace("BIZ ","BIZ")+"-Regular",6,3,1,platformID) 82 | 83 | if platformID == 1033: 84 | sourceTTF["name"].setName(name+" is a trademark of Morisawa Inc.",7,3,1,platformID) 85 | sourceTTF["name"].setName("This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: https://scripts.sil.org/OFL",13,3,1,platformID) 86 | sourceTTF["name"].setName("https://scripts.sil.org/OFL",14,3,1,platformID) 87 | 88 | sourceTTF["name"].removeNames(nameID=6,platformID=3, langID=1041) 89 | 90 | # OS/2 Table modifications 91 | sourceTTF["OS/2"].fsType = 0 92 | 93 | #Step 4 - Export updated source version 94 | sourceTTF.save(TEMP / outputTTF) 95 | 96 | # Step 5 - Merge source with extentions 97 | 98 | subprocess.check_call( 99 | [ 100 | "pyftmerge", 101 | str(TEMP/outputTTF), 102 | str(extSource), 103 | "--output-file="+str(EXPORT / str(outputTTF).replace("BIZ-","BIZ")), 104 | ] 105 | ) 106 | 107 | # Due to merging, some things get messed up: 108 | # The meta table is dropped 109 | # the Unicode cmap tables are dropped 110 | # fixedPitch set incorrectly 111 | # also tweaks to OS/2 and head also necessary to match original 112 | 113 | finalVersion = TTFont(str(EXPORT / str(outputTTF).replace("BIZ-","BIZ"))) 114 | finalVersion["meta"] = sourceTTF["meta"] 115 | 116 | cmap0_3_4 = _c_m_a_p.CmapSubtable.newSubtable(4) 117 | 118 | cmap0_3_4.platformID = 0 119 | cmap0_3_4.platEncID = 3 120 | cmap0_3_4.language = 0 121 | 122 | cmap0_3_4.cmap = finalVersion["cmap"].getcmap(3,1).cmap #copying from merged version 123 | 124 | finalVersion["cmap"].tables.append(cmap0_3_4) 125 | finalVersion["cmap"].tables.append(sourceTTF["cmap"].getcmap(0,5)) 126 | 127 | if "P" not in fontName: 128 | finalVersion["post"].isFixedPitch = 1 129 | #finalVersion["OS/2"].panose.bProportion = 9 130 | 131 | finalVersion["head"].fontRevision = float(VERSION) 132 | 133 | finalVersion["head"].flags = 0x000b 134 | 135 | newDSIG = newTable("DSIG") 136 | newDSIG.ulVersion = 1 137 | newDSIG.usFlag = 0 138 | newDSIG.usNumSigs = 0 139 | newDSIG.signatureRecords = [] 140 | finalVersion.tables["DSIG"] = newDSIG 141 | 142 | 143 | finalVersion.save(EXPORT / str(outputTTF).replace("BIZ-","BIZ")) 144 | 145 | shutil.rmtree("temp") 146 | shutil.rmtree("master_ufo") 147 | shutil.rmtree("instance_ufo") -------------------------------------------------------------------------------- /sources/extensions/otf/BIZ-UDGothic-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlefonts/morisawa-biz-ud-gothic/18934af56b9c003ca58c54bffbf226848cb11032/sources/extensions/otf/BIZ-UDGothic-Bold.otf -------------------------------------------------------------------------------- /sources/extensions/otf/BIZ-UDGothic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlefonts/morisawa-biz-ud-gothic/18934af56b9c003ca58c54bffbf226848cb11032/sources/extensions/otf/BIZ-UDGothic.otf -------------------------------------------------------------------------------- /sources/extensions/otf/BIZ-UDPGothic-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlefonts/morisawa-biz-ud-gothic/18934af56b9c003ca58c54bffbf226848cb11032/sources/extensions/otf/BIZ-UDPGothic-Bold.otf -------------------------------------------------------------------------------- /sources/extensions/otf/BIZ-UDPGothic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlefonts/morisawa-biz-ud-gothic/18934af56b9c003ca58c54bffbf226848cb11032/sources/extensions/otf/BIZ-UDPGothic.otf -------------------------------------------------------------------------------- /sources/extensions/otf/README.md: -------------------------------------------------------------------------------- 1 | Please note that these OTFs are present here for reference purposes only and are not finalized versions of the font, nor intended for use. 2 | 3 | Download the latest version of the fonts [from the releases page](https://github.com/googlefonts/morisawa-biz-ud-gothic/releases). -------------------------------------------------------------------------------- /sources/ttf/BIZ-UDGothic-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlefonts/morisawa-biz-ud-gothic/18934af56b9c003ca58c54bffbf226848cb11032/sources/ttf/BIZ-UDGothic-Bold.ttf -------------------------------------------------------------------------------- /sources/ttf/BIZ-UDGothic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlefonts/morisawa-biz-ud-gothic/18934af56b9c003ca58c54bffbf226848cb11032/sources/ttf/BIZ-UDGothic.ttf -------------------------------------------------------------------------------- /sources/ttf/BIZ-UDPGothic-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlefonts/morisawa-biz-ud-gothic/18934af56b9c003ca58c54bffbf226848cb11032/sources/ttf/BIZ-UDPGothic-Bold.ttf -------------------------------------------------------------------------------- /sources/ttf/BIZ-UDPGothic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlefonts/morisawa-biz-ud-gothic/18934af56b9c003ca58c54bffbf226848cb11032/sources/ttf/BIZ-UDPGothic.ttf -------------------------------------------------------------------------------- /sources/ttf/README.md: -------------------------------------------------------------------------------- 1 | Please note that these TTFs are present here for reference purposes only and are not finalized versions of the font, nor intended for use. 2 | 3 | Download the latest version of the fonts [from the releases page](https://github.com/googlefonts/morisawa-biz-ud-gothic/releases). 4 | -------------------------------------------------------------------------------- /workflows/build.yaml: -------------------------------------------------------------------------------- 1 | name: Build font and specimen 2 | 3 | on: [push, release] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - name: Set up Python 3.8 11 | uses: actions/setup-python@v2 12 | with: 13 | python-version: 3.8 14 | - name: Install sys tools/deps 15 | run: | 16 | sudo apt-get update 17 | sudo apt-get install ttfautohint 18 | sudo snap install yq 19 | - uses: actions/cache@v2 20 | with: 21 | path: ./venv/ 22 | key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements*.txt') }} 23 | restore-keys: | 24 | ${{ runner.os }}-venv- 25 | - name: Do first-run script if necessary 26 | run: make .init.stamp 27 | if: github.repository != 'googlefonts/Unified-Font-Repository' 28 | - uses: stefanzweifel/git-auto-commit-action@v4 29 | name: First-run setup 30 | if: github.repository != 'googlefonts/Unified-Font-Repository' 31 | with: 32 | file_pattern: .init.stamp README.md requirements.txt 33 | - name: gen zip file name 34 | id: zip-name 35 | shell: bash 36 | # Set the archive name to repo name + "-assets" e.g "MavenPro-assets" 37 | run: echo "ZIP_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')-fonts" >> $GITHUB_ENV 38 | # If a new release is cut, use the release tag to auto-bump the source files 39 | - name: Bump release 40 | if: github.event_name == 'release' 41 | run: | 42 | . venv/bin/activate 43 | SRCS=$(yq e ".sources[]" sources/config.yaml) 44 | TAG_NAME=${GITHUB_REF/refs\/tags\//} 45 | echo "Bumping $SRCS to $TAG_NAME" 46 | for src in $SRCS 47 | do 48 | bumpfontversion sources/$src --new-version $TAG_NAME; 49 | done 50 | - name: Build font 51 | run: make build 52 | - name: Check with fontbakery 53 | run: make test 54 | continue-on-error: true 55 | - name: proof 56 | run: make proof 57 | - name: setup site 58 | run: cp scripts/index.html out/index.html 59 | - name: Deploy 60 | uses: peaceiris/actions-gh-pages@v3 61 | if: ${{ github.ref == 'refs/heads/main' }} 62 | with: 63 | github_token: ${{ secrets.GITHUB_TOKEN }} 64 | publish_dir: ./out 65 | - name: Archive artifacts 66 | uses: actions/upload-artifact@v2 67 | with: 68 | name: ${{ env.ZIP_NAME }} 69 | path: | 70 | fonts 71 | out 72 | outputs: 73 | zip_name: ${{ env.ZIP_NAME }} 74 | release: 75 | # only run if the commit is tagged... 76 | if: github.event_name == 'release' 77 | # ... and it builds successfully 78 | needs: 79 | - build 80 | runs-on: ubuntu-latest 81 | env: 82 | ZIP_NAME: ${{ needs.build.outputs.zip_name }} 83 | steps: 84 | - uses: actions/checkout@v2 85 | - name: Download artefact files 86 | uses: actions/download-artifact@v2 87 | with: 88 | name: ${{ env.ZIP_NAME }} 89 | path: ${{ env.ZIP_NAME }} 90 | - name: Zip files 91 | run: zip -r ${{ env.ZIP_NAME }}.zip ${{ env.ZIP_NAME }} 92 | - name: Upload binaries to release 93 | uses: svenstaro/upload-release-action@v2 94 | with: 95 | repo_token: ${{ secrets.GITHUB_TOKEN }} 96 | file: ${{ env.ZIP_NAME }}.zip 97 | asset_name: ${{ env.ZIP_NAME }}.zip 98 | tag: ${{ github.ref }} 99 | overwrite: true 100 | body: "Production ready fonts" --------------------------------------------------------------------------------