Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use docker image from smith #12

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 21 additions & 27 deletions .github/workflows/test-fonts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,31 @@ on:

jobs:
test:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
container:
image: ghcr.io/silnrsi/smith:latest
volumes:
- /home/runner/work/_temp/_github_home/smith:/smith
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v4
- name: Install smith toolchain
id: install-smith
run: |
sudo add-apt-repository -sy ppa:silnrsi/smith-py3
sudo add-apt-repository -sy ppa:fontforge/fontforge
sudo add-apt-repository -y ppa:jonathonf/texlive-2019
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update -qy
sudo apt-get remove *php* *mono* *dotnet* -y
sudo apt-get autoremove -y
sudo apt-get upgrade -qy
sudo apt-get install python3-pip python3-setuptools git -y
sudo pip3 install --upgrade git+https://github.com/googlefonts/fontbakery.git@master#egg=fontbakery
sudo apt-get install libjson-perl libtext-csv-perl libharfbuzz-bin -y
sudo apt-get install smith-font -y --no-install-recommends
apt-get update -qy
apt-get install -qy --no-install-recommends fontforge
pip3 install fontbakery
- name: Configure / build / test
id: build-font
run: |
./preflight
smith version
smith configure
smith build
smith test
smith ttfcheck
smith fontlint
# - name: Upload artifacts
# id: upload-artifacts
# uses: actions/upload-artifact@master
# with:
# name: artifacts
# path: results/releases
chown -R root:root /smith/ /github/home/
cp -R results/* source/* tests/* preflight run.sh wscript /smith/
cd /smith
ls -la
chmod +x ./run.sh
./run.sh --test
- name: Upload artifacts
id: upload-artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: /smith/results
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# Designed to tell git to ignore some intermediary and generated files and to keep your public git repository clean
# To tweak to your particular needs, see http://git-scm.com/docs/gitignore and http://help.github.com/articles/ignoring-files

!/**/.gitkeep

# smith
.waf-*
.smithpickle-*
Expand Down Expand Up @@ -98,8 +96,11 @@ $RECYCLE.BIN/
# Other
.sass-cache/
.jekyll-metadata
.vscode/

# Byte-compiled / optimized files
*.py[co]
*$py.class
__pycache__/

!/**/.gitkeep
26 changes: 5 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM ubuntu:18.04
# Ubuntu Bionic
FROM ghcr.io/silnrsi/smith:latest

ENV LANG=C.UTF-8

Expand All @@ -8,25 +7,10 @@ USER root
WORKDIR /usr/local/src

# Install requirements
RUN export DEBIAN_FRONTEND=noninteractive; \
export DEBCONF_NONINTERACTIVE_SEEN=true; \
echo 'tzdata tzdata/Areas select Etc' | debconf-set-selections; \
echo 'tzdata tzdata/Zones/Etc select UTC' | debconf-set-selections; \
apt-get update -qy \
&& apt-get install -qy --no-install-recommends tzdata software-properties-common \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& add-apt-repository -sy ppa:silnrsi/smith-py3 \
&& add-apt-repository -sy ppa:fontforge/fontforge \
&& add-apt-repository -y ppa:jonathonf/texlive-2019 \
&& add-apt-repository -y ppa:git-core/ppa \
&& apt-get remove *php* *mono* *dotnet* -y \
&& apt-get autoremove -y && apt-get upgrade -qy \
&& apt-get install python3-pip python3-setuptools git zip -y \
&& pip3 install --upgrade git+https://github.com/googlefonts/fontbakery.git@master#egg=fontbakery \
&& apt-get install libjson-perl libtext-csv-perl libharfbuzz-bin -y \
&& apt-get install smith-font -y --no-install-recommends
RUN apt-get update -qy
RUN apt-get install -qy --no-install-recommends fontforge
RUN pip3 install fontbakery

COPY . .
COPY ./source/* ./tests/* ./preflight ./run.sh ./wscript /smith/

CMD tail -f /dev/null
24 changes: 5 additions & 19 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
version: '3.3'
version: "3.8"
services:
smith-font:
build:
context: .
image: eduardomourar/smith-font
container_name: smith-font
command:
- /bin/bash
- -c
- |
./preflight
smith configure -vvv
smith build -vvv
# smith test
# smith ttfcheck
# smith fontlint
# cp ./*.txt results/
# cd ./results
# zip -R fiati.zip "*.txt" "*.otf" "*.ttf" "*.woff"
command: "./run.sh --test"
volumes:
# - './source:/usr/local/src/source'
# - './results/fiati-regular.ufo:/usr/local/src/source/fiati-regular.ufo'
# - './wscript:/usr/local/src/wscript'
- './results:/usr/local/src/results'
# - "./:/smith"
# - "./source/backups:/smith/source/backups"
- "./results:/smith/results"
13 changes: 13 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

smith version
./preflight
smith configure build -v
if [ "$1" = "--test" ]; then
smith test ttfcheck validate -vv
fontlint ./results/fiati-regular.otf 2>&1 | tee -a ./results/fiati-regular_otf_fontlint.log
fontlint ./results/fiati-regular.ttf 2>&1 | tee -a ./results/fiati-regular_ttf_fontlint.log
fi
if [ "$1" = "--release" ]; then
smith zip --release -vv
fi
8 changes: 6 additions & 2 deletions source/fiati-regular.ufo/fontinfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</dict>
</array>
<key>openTypeHeadCreated</key>
<string>2020/01/16 22:26:41</string>
<string>2023/10/31 08:48:35</string>
<key>openTypeHheaAscender</key>
<integer>2012</integer>
<key>openTypeHheaDescender</key>
Expand Down Expand Up @@ -52,7 +52,7 @@
<key>openTypeNameSampleText</key>
<string></string>
<key>openTypeNameUniqueID</key>
<string>Steinberg Media Technologies GmbH: Fiati Regular: 2020</string>
<string>Steinberg Media Technologies GmbH: Fiati Regular: 2023</string>
<key>openTypeNameVersion</key>
<string>Version 0.301</string>
<key>openTypeOS2CodePageRanges</key>
Expand All @@ -73,6 +73,10 @@
<integer>0</integer>
<integer>0</integer>
</array>
<key>openTypeOS2Selection</key>
<array>
<integer>7</integer>
</array>
<key>openTypeOS2StrikeoutPosition</key>
<integer>250</integer>
<key>openTypeOS2StrikeoutSize</key>
Expand Down
4 changes: 4 additions & 0 deletions source/fiati-regular.ufo/lib.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<integer>2012</integer>
<key>capHeight</key>
<integer>475</integer>
<key>com.schriftgestaltung.customParameter.GSFont.disablesAutomaticAlignment</key>
<true/>
<key>com.schriftgestaltung.customParameter.GSFont.disablesLastChange</key>
<true/>
<key>copyright</key>
<string>Copyright © 2014, Steinberg Media Technologies GmbH (http://www.steinberg.net/) Copyright © 2019, Eduardo de Moura Rodrigues ([email protected]).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: http://scripts.sil.org/OFL-----------------------------------------------------------SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007-----------------------------------------------------------PREAMBLEThe 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 mayinclude 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 &amp; CONDITIONSPermission 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.TERMINATIONThis license becomes null and void if any of the above conditions are not met.DISCLAIMERTHE 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.</string>
<key>descender</key>
Expand Down
Loading