-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create Light and Italic font faces (#59)
* Add gitignore file [why] It is easier to work with the scripts and git, if all normally created intermediate files are ignored. It allows to do a 'git clean -f' for example. Signed-off-by: Fini Jastrow <[email protected]> * rename-font: Correct help text [why] The version parameter is not optional, so it should not be noted as optional. I'm not sure if it ever was optional, maybe a leftover from a different, previous approach. Signed-off-by: Fini Jastrow <[email protected]> * rename-font: Add option to specify style [why] The script is hardcoded to provide a 'Regular' font face. Now that we want to generate other faces we need to be more flexible. [how] Add a parameter that is used in the appropriate places. Sometimes the style has no additional name ("Italic" face). To allow that we need to be careful with added blancs in the name strings. Signed-off-by: Fini Jastrow <[email protected]> * Add light and bold (and italic) faces [why] The demand for correctly working bold and italic fonts can not be satisfied with our simple approach. We need a whole lot more fonts! [how] Use the static Cascadia font versions and do the patching on all relevant fonts. Use a helper script to invoke the actual patching to hide all the parameters that stay the same for all the fonts. Group the created fonts by interest (small (powerline), complete, book) and release as zip packages. Signed-off-by: Fini Jastrow <[email protected]> * remove prepare script [why] When we work with the static font files we do not need to prepare (fix for working with them in fontforge) them anymore. Signed-off-by: Fini Jastrow <[email protected]> * Fix font versioning [why] The version in the font files reflects not the version name we want to have. In fact it is just the git hash of the topmost commit and not the git tag. [how] When switching to actions/checkout@v2 we only fetch the latest commit into the git workflow (for performance reasons is this the default). But that lacks all the tags, that we use to communicate the font version. Now we resort to full depth cloning of the Delugia repository, which is tiny anyway. [note] Action had been updated from @1 to @2 with commit 22d4cae Combine workflows (#57) Signed-off-by: Fini Jastrow <[email protected]> * Change general font family naming scheme [why] We have 'normal' and 'bold' in one font family, but the 'italic' is in a separate family. Some applications can group the weights/styles of one font family in a way that allows to select 'bold' and/or 'italic' in the application easily - without choosing a different font. This seems to be broken if the italics is in a separate font family. We have these families -> styles: Deligia{} -> Regular, Bold Delugia{}Light -> "" (Regular) Delugia{}Italic -> Italic, Bold-Italic Delugia{}ItalicLight -> Italic [how] Restructure the family names -> styles as such: Deligia{} -> Regular, Bold, Italic, Bold-Italic Delugia{}Light -> "" (Regular), Bold [note] With {} being our 5 styles: PL, MonoPL, Complete, MonoComplete, Book Signed-off-by: Fini Jastrow <[email protected]> * Fill the full name into fullname fields [why] The full name fields should contain the full name (obviously) including the subfamily. Signed-off-by: Fini Jastrow <[email protected]> * Create more unique UniqueID [why] If one specific font is to be identified we need an ID that changes with new revisions. [how] Add the version to the ID. Signed-off-by: Fini Jastrow <[email protected]> * Change to release in 5 archives [why] These Families are created: - Delugia PL - Delugia Mono PL - Delugia Complete - Delugia Mono Complete - Delugia Book At the moment we put both non-mono and mono families into one archive like so: 1. Delugia PL and Delugia Mono PL 2. Delugia Complete and Delugia Mono Complete 3. Delugia Book For some users it might make more sense to bundle the non-mono and mono fonts. The majority probably needs just one family. It might be unclear for users that these are 5 independent font sets. [how] Just stuff the files into more archives: 1. Delugia PL 2. Delugia Complete 3. Delugia Book Ligarture-less variants: 4. Delugia Mono PL 5. Delugia Mono Complete Signed-off-by: Fini Jastrow <[email protected]> * Whitespace cleanup Signed-off-by: Fini Jastrow <[email protected]> * Correct license year Signed-off-by: Fini Jastrow <[email protected]> * readme: Remove old news Signed-off-by: Fini Jastrow <[email protected]> * readme: Add font sample images Signed-off-by: Fini Jastrow <[email protected]>
- Loading branch information
Showing
9 changed files
with
144 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ jobs: | |
outputs: | ||
tag_name: ${{ env.CASCADIATAG }} | ||
tag_exists: ${{ steps.check_tag.outputs.exists }} | ||
|
||
steps: | ||
- name: Fetch latest release of Cascadia Code | ||
uses: octokit/[email protected] | ||
|
@@ -40,7 +40,7 @@ jobs: | |
tag: ${{ env.CASCADIATAG }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
build-and-release: | ||
needs: check-for-new-cascadia | ||
if: ${{ github.event_name != 'schedule' || needs.check-for-new-cascadia.outputs.tag_exists != 'true' }} | ||
|
@@ -50,6 +50,8 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Download latest version of Cascadia | ||
run: | | ||
CASCADIAVERS=`curl -L 'https://github.com/microsoft/cascadia-code/releases/latest' | grep CascadiaCode | sed 's!\(.*/microsoft/cascadia-code/releases/download/\([^"]*\).*\|.*span.*\)!\2!'` | ||
|
@@ -74,75 +76,84 @@ jobs: | |
run: pip install configparser | ||
- name: Extract additional powerline glyphs | ||
run: fontforge -lang=ff -script extract-extra-glyphs | ||
- name: Prepare Cascadia Code font file | ||
run: | | ||
mkdir prepared | ||
fontforge prepare-font --input ttf/CascadiaCodePL.ttf --output prepared/CascadiaCodePL.ttf | ||
fontforge prepare-font --input ttf/CascadiaMonoPL.ttf --output prepared/CascadiaMonoPL.ttf | ||
- name: Build Powerline | ||
run: | | ||
fontforge -script font-patcher --careful --powerline --custom SomeExtraSymbols.otf \ | ||
--no-progressbars --mono prepared/CascadiaCodePL.ttf | tee process.log | ||
git describe --always --tags | xargs fontforge rename-font --input C*.ttf \ | ||
--output "Delugia Nerd Font.ttf" \ | ||
--name "Delugia Nerd Font" \ | ||
--version | ||
rm C*.ttf | ||
fontforge -script font-patcher --careful --powerline --custom SomeExtraSymbols.otf \ | ||
--no-progressbars --mono prepared/CascadiaMonoPL.ttf | tee process_mono.log | ||
git describe --always --tags | xargs fontforge rename-font --input C*.ttf \ | ||
--output "Delugia Mono Nerd Font.ttf" \ | ||
--name "Delugia Mono Nerd Font" \ | ||
--version | ||
rm C*.ttf | ||
./do_generate 01 --powerline --mono CascadiaCodePL-Regular.ttf DelugiaPL.ttf "Delugia PL" "Regular" | ||
./do_generate 02 --powerline --mono CascadiaCodePL-Bold.ttf DelugiaPL-Bold.ttf "Delugia PL" "Bold" | ||
./do_generate 03 --powerline --mono CascadiaCodePLItalic-Italic.ttf DelugiaPL-Italic.ttf "Delugia PL" "Italic" | ||
./do_generate 04 --powerline --mono CascadiaCodePLItalic-BoldItalic.ttf DelugiaPL-BoldItalic.ttf "Delugia PL" "Bold Italic" | ||
./do_generate 05 --powerline --mono CascadiaCodePL-Light.ttf DelugiaPLLight.ttf "Delugia PL Light" "" | ||
./do_generate 06 --powerline --mono CascadiaCodePLItalic-LightItalic.ttf DelugiaPLLight-Italic.ttf "Delugia PL Light" "Italic" | ||
mkdir delugia-powerline | ||
mv Delugia*ttf delugia-powerline | ||
zip delugia-powerline.zip delugia-powerline/* | ||
- name: Build MonoPowerline | ||
run: | | ||
./do_generate 11 --powerline --mono CascadiaMonoPL-Regular.ttf DelugiaMonoPL.ttf "Delugia PL Mono" "Regular" | ||
./do_generate 12 --powerline --mono CascadiaMonoPL-Bold.ttf DelugiaMonoPL-Bold.ttf "Delugia PL Mono" "Bold" | ||
./do_generate 13 --powerline --mono CascadiaMonoPLItalic-Italic.ttf DelugiaMonoPL-Italic.ttf "Delugia PL Mono" "Italic" | ||
./do_generate 14 --powerline --mono CascadiaMonoPLItalic-BoldItalic.ttf DelugiaMonoPL-BoldItalic.ttf "Delugia PL Mono" "Bold Italic" | ||
./do_generate 15 --powerline --mono CascadiaMonoPL-Light.ttf DelugiaMonoPLLight.ttf "Delugia PL Mono Light" "" | ||
./do_generate 16 --powerline --mono CascadiaCodePLItalic-LightItalic.ttf DelugiaMonoPLLight-Italic.ttf "Delugia PL Mono Light" "Italic" | ||
mkdir delugia-mono-powerline | ||
mv Delugia*ttf delugia-mono-powerline | ||
zip delugia-mono-powerline.zip delugia-mono-powerline/* | ||
- name: Build Complete | ||
run: | | ||
fontforge -script font-patcher --careful -c --custom SomeExtraSymbols.otf \ | ||
--no-progressbars --mono prepared/CascadiaCodePL.ttf | tee process_full.log | ||
git describe --always --tags | xargs fontforge rename-font --input C*.ttf \ | ||
--output "Delugia Nerd Font Complete.ttf" \ | ||
--name "Delugia Nerd Font" \ | ||
--version | ||
rm C*.ttf | ||
fontforge -script font-patcher --careful -c --custom SomeExtraSymbols.otf \ | ||
--no-progressbars --mono prepared/CascadiaMonoPL.ttf | tee process_mono_full.log | ||
git describe --always --tags | xargs fontforge rename-font --input C*.ttf \ | ||
--output "Delugia Mono Nerd Font Complete.ttf" \ | ||
--name "Delugia Mono Nerd Font" \ | ||
--version | ||
rm C*.ttf | ||
./do_generate 21 -c --mono CascadiaCodePL-Regular.ttf DelugiaComplete.ttf "Delugia" "Regular" | ||
./do_generate 22 -c --mono CascadiaCodePL-Bold.ttf DelugiaComplete-Bold.ttf "Delugia" "Bold" | ||
./do_generate 23 -c --mono CascadiaCodePLItalic-Italic.ttf DelugiaComplete-Italic.ttf "Delugia" "Italic" | ||
./do_generate 24 -c --mono CascadiaCodePLItalic-BoldItalic.ttf DelugiaComplete-BoldItalic.ttf "Delugia" "Bold Italic" | ||
./do_generate 25 -c --mono CascadiaCodePL-Light.ttf DelugiaCompleteLight.ttf "Delugia Light" "" | ||
./do_generate 26 -c --mono CascadiaCodePLItalic-LightItalic.ttf DelugiaCompleteLight-Italic.ttf "Delugia Light" "Italic" | ||
mkdir delugia-complete | ||
mv Delugia*ttf delugia-complete | ||
zip delugia-complete.zip delugia-complete/* | ||
- name: Build Mono Complete | ||
run: | | ||
./do_generate 31 -c --mono CascadiaMonoPL-Regular.ttf DelugiaMonoComplete.ttf "Delugia Mono" "Regular" | ||
./do_generate 32 -c --mono CascadiaMonoPL-Bold.ttf DelugiaMonoComplete-Bold.ttf "Delugia Mono" "Bold" | ||
./do_generate 33 -c --mono CascadiaMonoPLItalic-Italic.ttf DelugiaMonoComplete-Italic.ttf "Delugia Mono" "Italic" | ||
./do_generate 34 -c --mono CascadiaMonoPLItalic-BoldItalic.ttf DelugiaMonoComplete-BoldItalic.ttf "Delugia Mono" "Bold Italic" | ||
./do_generate 35 -c --mono CascadiaMonoPL-Light.ttf DelugiaMonoCompleteLight.ttf "Delugia Mono Light" "" | ||
./do_generate 36 -c --mono CascadiaCodePLItalic-LightItalic.ttf DelugiaMonoCompleteLight-Italic.ttf "Delugia Mono Light" "Italic" | ||
mkdir delugia-mono-complete | ||
mv Delugia*ttf delugia-mono-complete | ||
zip delugia-complete.zip delugia-mono-complete/* | ||
- name: Build Book Complete | ||
run: | | ||
fontforge -script font-patcher --careful -c --custom SomeExtraSymbols.otf \ | ||
--no-progressbars prepared/CascadiaCodePL.ttf | tee process_book.log | ||
git describe --always --tags | xargs fontforge rename-font --input C*.ttf \ | ||
--output "Delugia Nerd Font Book.ttf" \ | ||
--name "Delugia Nerd Font Book" \ | ||
--version | ||
rm C*.ttf | ||
./do_generate 41 -c -c CascadiaCodePL-Regular.ttf DelugiaBook.ttf "Delugia Book" "Regular" | ||
./do_generate 42 -c -c CascadiaCodePL-Bold.ttf DelugiaBook-Bold.ttf "Delugia Book" "Bold" | ||
./do_generate 43 -c -c CascadiaCodePLItalic-Italic.ttf DelugiaBook-Italic.ttf "Delugia Book" "Italic" | ||
./do_generate 44 -c -c CascadiaCodePLItalic-BoldItalic.ttf DelugiaBook-BoldItalic.ttf "Delugia Book" "Bold Italic" | ||
./do_generate 45 -c -c CascadiaCodePL-Light.ttf DelugiaBookLight.ttf "Delugia Book Light" "" | ||
./do_generate 46 -c -c CascadiaCodePLItalic-LightItalic.ttf DelugiaBookLight-Italic.ttf "Delugia Book Light" "Italic" | ||
mkdir delugia-book | ||
mv Delugia*ttf delugia-book | ||
zip delugia-book.zip delugia-book/* | ||
- name: Check for preexisting glyphs | ||
run: | | ||
grep 'Found existing' process*.log | ||
- uses: actions/upload-artifact@master | ||
with: | ||
name: Delugia Nerd Font Powerline | ||
path: "Delugia Nerd Font.ttf" | ||
name: Delugia Powerline | ||
path: "delugia-powerline" | ||
- uses: actions/upload-artifact@master | ||
with: | ||
name: Delugia Nerd Font Complete | ||
path: "Delugia Nerd Font Complete.ttf" | ||
name: Delugia Mono Powerline | ||
path: "delugia-mono-powerline" | ||
- uses: actions/upload-artifact@master | ||
with: | ||
name: Delugia Nerd Font Book | ||
path: "Delugia Nerd Font Book.ttf" | ||
name: Delugia Complete | ||
path: "delugia-complete" | ||
- uses: actions/upload-artifact@master | ||
with: | ||
name: Delugia Mono Nerd Font Powerline | ||
path: "Delugia Mono Nerd Font.ttf" | ||
name: Delugia Mono Complete | ||
path: "delugia-mono-complete" | ||
- uses: actions/upload-artifact@master | ||
with: | ||
name: Delugia Mono Nerd Font Complete | ||
path: "Delugia Mono Nerd Font Complete.ttf" | ||
name: Delugia Book | ||
path: "delugia-book" | ||
|
||
# Release part | ||
- name: Create tag | ||
|
@@ -161,7 +172,7 @@ jobs: | |
object: context.sha, | ||
type: "commit" | ||
}) | ||
github.git.createRef({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
|
@@ -178,10 +189,10 @@ jobs: | |
with: | ||
tag_name: ${{ startsWith(github.ref, 'refs/tags/') && steps.get_tag_name.outputs.version || needs.check-for-new-cascadia.outputs.tag_name }} | ||
files: | | ||
Delugia Nerd Font.ttf | ||
Delugia Nerd Font Complete.ttf | ||
Delugia Nerd Font Book.ttf | ||
Delugia Mono Nerd Font.ttf | ||
Delugia Mono Nerd Font Complete.ttf | ||
delugia-powerline.zip | ||
delugia-mono-powerline.zip | ||
delugia-complete.zip | ||
delugia-mono-complete.zip | ||
delugia-book.zip | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CascadiaCode*zip | ||
src/ | ||
otf/ | ||
ttf/ | ||
woff2/ | ||
font-patcher* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env sh | ||
# | ||
# Create and rename one font style according to the specs | ||
# | ||
# Example invocation: | ||
# do_generate 01 --powerline --mono CascadiaCodePL-Regular.ttf DelugiaPowerline.ttf Delugia Regular | ||
# | ||
# No parameters are checked, but they are: | ||
# 1: Number of logfile | ||
# 2: Conversion spec #1 | ||
# 3: Conversion spec #2 | ||
# 4: Input font file name | ||
# 5: Output font file name | ||
# 6: Font family name | ||
# 7: Font style name addendum | ||
|
||
set -e | ||
|
||
if [ "$#" -ne 7 ]; then | ||
exit 1 | ||
fi | ||
|
||
rm -f C*.ttf | ||
fontforge -script font-patcher --careful "${3}" --custom SomeExtraSymbols.otf --no-progressbars "ttf/static/${4}" "${2}" | tee "process${1}.log" | ||
|
||
OURVERSION=`git describe --always --tags` | ||
fontforge rename-font --input C*.ttf --output "${5}" --name "${6}" --style "${7}" --version "${OURVERSION}" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters