Skip to content

Commit

Permalink
Add Google Fonts submodule for those fonts present in it
Browse files Browse the repository at this point in the history
The following fonts are now loaded from the submodule rather than checked in:
- Cousine
- Roboto Mono
- Inconsolata
- Anonymous Pro
- IBM Plex Mono
- Oxygen Mono
- Source Code Pro
- Ubuntu Mono

This also means a bunch of new output fonts have been added for variants not
present in the original input-fonts.
  • Loading branch information
ToxicFrog committed Aug 31, 2018
1 parent 01b7c2b commit d5db9c0
Show file tree
Hide file tree
Showing 80 changed files with 25 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[submodule "fira"]
path = fira
url = https://github.com/tonsky/FiraCode
[submodule "google-fonts"]
path = input-fonts/google
url = https://github.com/google/fonts.git
shallow = true
29 changes: 19 additions & 10 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@

prefixed_fonts = [
# Apache 2.0 license
'Cousine*',
'google/apache/cousine/*.ttf',
'Droid*',
'Meslo*',
'Roboto*',
'google/apache/robotomono/*.ttf',

# MIT license
'DejaVu*',
Expand All @@ -37,7 +37,7 @@
# SIL OFL with no Reserved Font Name
'Edlo*',
'FantasqueSansMono-Normal/*',
'Inconsolata*',
'google/ofl/inconsolata/*.ttf',
]

#### Fonts that need to be renamed. ####
Expand All @@ -51,14 +51,14 @@
'FantasqueSansMono-NoLoopK/*': 'Liga Fantasque Sans Mono NoLoopK',

# SIL OFL with reserved name
'Anonymous*': 'Liganymous',
'IBMPlexMono*': 'Ligalex Mono',
'OxygenMono*': 'Liga O2 Mono',
'SourceCodePro*': 'LigaSrc Pro',
'google/ofl/anonymouspro/*.ttf': 'Liganymous',
'google/ofl/ibmplexmono/*.ttf': 'Ligalex Mono',
'google/ofl/oxygenmono/*.ttf': 'Liga O2 Mono',
'google/ofl/sourcecodepro/*.ttf': 'LigaSrc Pro',
'SourceCodeVariable*': 'LigaSrc Variable',

# UFL
'UbuntuMono*': 'Ubuntu Mono Ligaturized',
'google/ufl/ubuntumono/*.ttf': 'Ubuntu Mono Ligaturized',
}

#### Fonts we can't ligaturize. ####
Expand All @@ -74,20 +74,29 @@

#### No user serviceable parts below this line. ####

import sys
from glob import glob
from os import path
from ligaturize import ligaturize_font

for pattern in prefixed_fonts:
for input_file in glob(path.join('input-fonts', pattern)):
files = glob(path.join('input-fonts', pattern))
if not files:
print("Error: pattern 'input-fonts/%s' didn't match any files." % pattern)
sys.exit(1)
for input_file in files:
ligaturize_font(
input_file, ligature_font_file=None, output_dir='output-fonts/',
prefix=LIGATURIZED_FONT_NAME_PREFIX, output_name=None,
copy_character_glyphs=COPY_CHARACTER_GLYPHS,
scale_character_glyphs_threshold=SCALE_CHARACTER_GLYPHS_THRESHOLD)

for pattern,name in renamed_fonts.iteritems():
for input_file in glob(path.join('input-fonts', pattern)):
files = glob(path.join('input-fonts', pattern))
if not files:
print("Error: pattern 'input-fonts/%s' didn't match any files." % pattern)
sys.exit(1)
for input_file in files:
ligaturize_font(
input_file, ligature_font_file=None, output_dir='output-fonts/',
prefix=None, output_name=name,
Expand Down
2 changes: 1 addition & 1 deletion fira
Submodule fira updated 1 files
+8 −7 README.md
Binary file removed input-fonts/Anonymous_Pro.ttf
Binary file not shown.
Binary file removed input-fonts/Cousine-Bold.ttf
Binary file not shown.
Binary file removed input-fonts/Cousine-Regular.ttf
Binary file not shown.
Binary file removed input-fonts/IBMPlexMono-Bold.otf
Binary file not shown.
Binary file removed input-fonts/IBMPlexMono-BoldItalic.otf
Binary file not shown.
Binary file removed input-fonts/IBMPlexMono-ExtraLight.otf
Binary file not shown.
Binary file removed input-fonts/IBMPlexMono-ExtraLightItalic.otf
Binary file not shown.
Binary file removed input-fonts/IBMPlexMono-Italic.otf
Binary file not shown.
Binary file removed input-fonts/IBMPlexMono-Light.otf
Binary file not shown.
Binary file removed input-fonts/IBMPlexMono-LightItalic.otf
Binary file not shown.
Binary file removed input-fonts/IBMPlexMono-Medium.otf
Binary file not shown.
Binary file removed input-fonts/IBMPlexMono-MediumItalic.otf
Binary file not shown.
Binary file removed input-fonts/IBMPlexMono-Regular.otf
Binary file not shown.
Binary file removed input-fonts/IBMPlexMono-SemiBold.otf
Binary file not shown.
Binary file removed input-fonts/IBMPlexMono-SemiBoldItalic.otf
Binary file not shown.
Binary file removed input-fonts/IBMPlexMono-Text.otf
Binary file not shown.
Binary file removed input-fonts/IBMPlexMono-TextItalic.otf
Binary file not shown.
Binary file removed input-fonts/IBMPlexMono-Thin.otf
Binary file not shown.
Binary file removed input-fonts/IBMPlexMono-ThinItalic.otf
Binary file not shown.
Binary file removed input-fonts/Inconsolata-Regular.ttf
Binary file not shown.
Binary file removed input-fonts/Inconsolata-g.otf
Binary file not shown.
Binary file removed input-fonts/Inconsolata.otf
Binary file not shown.
Binary file removed input-fonts/OxygenMono-Regular.ttf
Binary file not shown.
Binary file removed input-fonts/RobotoMono-Regular.ttf
Binary file not shown.
Binary file removed input-fonts/SourceCodePro-Bold.ttf
Binary file not shown.
Binary file removed input-fonts/SourceCodePro-Regular.ttf
Binary file not shown.
Binary file removed input-fonts/UbuntuMono-Regular.ttf
Binary file not shown.
1 change: 1 addition & 0 deletions input-fonts/google
Submodule google added at 08b5f4
Binary file modified output-fonts/LigaCousine-Bold.ttf
Binary file not shown.
Binary file added output-fonts/LigaCousine-BoldItalic.ttf
Binary file not shown.
Binary file added output-fonts/LigaCousine-Italic.ttf
Binary file not shown.
Binary file added output-fonts/LigaCousine-Regular.ttf
Binary file not shown.
Binary file modified output-fonts/LigaFantasqueSansMonoNoLoopK-Bold.ttf
Binary file not shown.
Binary file modified output-fonts/LigaFantasqueSansMonoNoLoopK-BoldItalic.ttf
Binary file not shown.
Binary file modified output-fonts/LigaFantasqueSansMonoNoLoopK-Italic.ttf
Binary file not shown.
Binary file modified output-fonts/LigaFantasqueSansMonoNoLoopK-Regular.ttf
Binary file not shown.
Binary file added output-fonts/LigaInconsolata-Bold.ttf
Binary file not shown.
Binary file modified output-fonts/LigaInconsolata-Regular.ttf
Binary file not shown.
Binary file added output-fonts/LigaRobotoMono-Bold.ttf
Binary file not shown.
Binary file added output-fonts/LigaRobotoMono-BoldItalic.ttf
Binary file not shown.
Binary file added output-fonts/LigaRobotoMono-Italic.ttf
Binary file not shown.
Binary file modified output-fonts/LigaRobotoMono-Regular.ttf
Binary file not shown.
Binary file added output-fonts/LigaRobotoMonoLight-Light.ttf
Binary file not shown.
Binary file added output-fonts/LigaRobotoMonoLight-LightItalic.ttf
Binary file not shown.
Binary file added output-fonts/LigaRobotoMonoMedium-Medium.ttf
Binary file not shown.
Binary file not shown.
Binary file added output-fonts/LigaRobotoMonoThin-Thin.ttf
Binary file not shown.
Binary file added output-fonts/LigaRobotoMonoThin-ThinItalic.ttf
Binary file not shown.
Binary file added output-fonts/LigaSrcPro-Black.ttf
Binary file not shown.
Binary file modified output-fonts/LigaSrcPro-Bold.ttf
Binary file not shown.
Binary file added output-fonts/LigaSrcPro-ExtraLight.ttf
Binary file not shown.
Binary file added output-fonts/LigaSrcPro-Light.ttf
Binary file not shown.
Binary file added output-fonts/LigaSrcPro-Medium.ttf
Binary file not shown.
Binary file modified output-fonts/LigaSrcPro-Regular.ttf
Binary file not shown.
Binary file added output-fonts/LigaSrcPro-SemiBold.ttf
Binary file not shown.
Binary file modified output-fonts/LigalexMono-Bold.ttf
Binary file not shown.
Binary file modified output-fonts/LigalexMono-BoldItalic.ttf
Binary file not shown.
Binary file modified output-fonts/LigalexMono-ExtraLight.ttf
Binary file not shown.
Binary file modified output-fonts/LigalexMono-ExtraLightItalic.ttf
Binary file not shown.
Binary file modified output-fonts/LigalexMono-Italic.ttf
Binary file not shown.
Binary file modified output-fonts/LigalexMono-Light.ttf
Binary file not shown.
Binary file modified output-fonts/LigalexMono-LightItalic.ttf
Binary file not shown.
Binary file modified output-fonts/LigalexMono-Medium.ttf
Binary file not shown.
Binary file modified output-fonts/LigalexMono-MediumItalic.ttf
Binary file not shown.
Binary file modified output-fonts/LigalexMono-SemiBold.ttf
Binary file not shown.
Binary file modified output-fonts/LigalexMono-SemiBoldItalic.ttf
Binary file not shown.
Binary file modified output-fonts/LigalexMono-Thin.ttf
Binary file not shown.
Binary file modified output-fonts/LigalexMono-ThinItalic.ttf
Binary file not shown.
Binary file modified output-fonts/LigalexMono.ttf
Binary file not shown.
Binary file added output-fonts/Liganymous-Bold.ttf
Binary file not shown.
Binary file added output-fonts/Liganymous-BoldItalic.ttf
Binary file not shown.
Binary file added output-fonts/Liganymous-Italic.ttf
Binary file not shown.
Binary file added output-fonts/Liganymous-Regular.ttf
Binary file not shown.
Binary file added output-fonts/UbuntuMonoLigaturized-Bold.ttf
Binary file not shown.
Binary file not shown.
Binary file added output-fonts/UbuntuMonoLigaturized-Italic.ttf
Binary file not shown.
Binary file modified output-fonts/UbuntuMonoLigaturized-Regular.ttf
Binary file not shown.

0 comments on commit d5db9c0

Please sign in to comment.