Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron-212 committed Mar 30, 2024
0 parents commit 05079ef
Show file tree
Hide file tree
Showing 61 changed files with 15,498 additions and 0 deletions.
89 changes: 89 additions & 0 deletions .github/workflows/build_fonts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Builds fonts either when a prerelease version tag (e.g. v1.2-foo)
# is created, or when source is changed.
#
# When a version tag is created, a pre-release is automatically created.
#
# Otherwise, when source changes without a tag being created,
# the build artifacts are uploaded to github and saved for 1 day.
# They can be found at https://github.com/rsms/inter/actions/runs/RUNID
name: Build fonts

on:
push:
branches: [main]
paths:
- "src/**"
- Makefile
- requirements.txt
- version.txt
tags:
- "v*"
pull_request:
branches: [main]
paths:
- "src/**"
- Makefile
- requirements.txt
- version.txt
workflow_dispatch:

defaults:
run:
shell: bash

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install utilities
run: sudo apt-get install -y zip

- name: make init
run: make init

- name: Define version (tag)
if: startsWith(github.ref, 'refs/tags/v')
run: |
VERSION=${{ github.ref }}
VERSION=${VERSION:11} # refs/tags/v1.2.3 => 1.2.3
echo "InterNumeric_version=$VERSION" >> $GITHUB_ENV
- name: Define version (branch)
if: ${{ ! startsWith(github.ref, 'refs/tags/v') }}
run: |
GITSHA=${{ github.sha }}
VERSION=$(cat version.txt)
echo "InterNumeric_version=${VERSION}-${GITSHA:0:7}" >> $GITHUB_ENV
- name: make build
run: |
ZIP=InterNumeric-${{ env.InterNumeric_version }}.zip
echo "InterNumeric_zip=$ZIP" >> $GITHUB_ENV
make zip
mv InterNumeric.zip "$ZIP"
- name: Upload archive (unless tag)
if: ${{ ! startsWith(github.ref, 'refs/tags/v') }}
uses: actions/upload-artifact@v4
with:
name: "${{ env.InterNumeric_version }}"
path: ${{ env.InterNumeric_zip }}
retention-days: 1

- name: Create release (if tag)
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
prerelease: true
name: "${{ env.InterNumeric_version }}"
body: "This release was created automatically"
files: ${{ env.InterNumeric_zip }}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.DS_Store
fonts
venv
*.stamp
update.md
fonts-temp
src/NovaGothic(自动存储).glyphs
97 changes: 97 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
Copyright (c) <dates>, <Copyright Holder> (<URL|email>),
with Reserved Font Name <Reserved Font Name>.
Copyright (c) <dates>, <additional Copyright Holder> (<URL|email>),
with Reserved Font Name <additional Reserved Font Name>.
Copyright (c) <dates>, <additional Copyright Holder> (<URL|email>).

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://openfontlicense.org


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
43 changes: 43 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
help:
@echo "###"
@echo "# Build targets for Inter Numeric"
@echo "###"
@echo
@echo " make build: Builds the fonts and places them in the fonts/ directory"
@echo " make zip: Zip all fonts into a zip"
@echo

init: requirements.txt
pip install -Ur requirements.txt
touch init.stamp

build: build.stamp

build.stamp: init.stamp
fontmake -f src/InterNumeric.glyphspackage -o variable --output-path fonts/variable/InterNumeric[wght,rdns].otf --filter DecomposeTransformedComponentsFilter
python misc/scripts/gen_woff2.py
touch build.stamp

ufo: ufo.stamp

ufo.stamp: init.stamp
fontmake -f src/InterNumeric.glyphspackage -o ufo --output-dir fonts-temp/master-ufo

zip: build.stamp
cp -rf fonts InterNumeric
zip -r InterNumeric.zip InterNumeric
rm -rf InterNumeric

test: build.stamp
fontbakery check-universal fonts/variable/InterNumeric[wght,rdns].otf

cleanbuild:
rm -rf fonts
rm build.stamp

cleanufo:
rm -rf fonts-temp
rm ufo.stamp

update:
pip install -Ur requirements.txt
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Inter Numeric

Inter Numeric is a variable font based on Inter, providing a versatile look for number figures.

![Inter Numeric Specimen](<misc/images/specimen.png>)

## OpenType Features

- Slashed Zero
- Case-sensitive Form

## Roadmap

- Alternate form for 1, 3, 4, 6 and 9
- Tabular Forms

## Issues

Inter Numeric is still in early stage of development. Start an issue if you find any problems.
Binary file added misc/images/specimen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions misc/scripts/gen_woff2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from fontTools.ttLib.woff2 import compress

# Usage example
otf_path = 'fonts/variable/InterNumeric[wght,rdns].otf'
woff2_path = 'fonts/variable/InterNumeric[wght,rdns].woff2'

# Convert the variable font to WOFF2 format
compress(otf_path, woff2_path)
5 changes: 5 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
fontmake
gftools
fonttools
fontbakery
shaperglot
11 changes: 11 additions & 0 deletions src/InterNumeric.glyphspackage/UIState.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
displayStrings = (
"12:23
23//23
34-23
23+23",
"4",
"+",
"/zero.zero"
);
}
Loading

0 comments on commit 05079ef

Please sign in to comment.