├── .gitignore ├── AUTHORS.txt ├── CONTRIBUTORS.txt ├── OFL.txt ├── README.md ├── docs ├── README.md ├── css │ ├── TitilliumWeb-Roman-VF.ttf │ └── style.css ├── drawbot │ └── basic-specimen.py ├── index.html ├── javascript │ └── var.js └── specimens │ └── basic-specimen.gif ├── fonts ├── TitilliumWeb-Italic-VF.ttf ├── TitilliumWeb-Roman-VF.ttf └── static-fonts │ ├── TitilliumWeb-Black.ttf │ ├── TitilliumWeb-Bold.ttf │ ├── TitilliumWeb-BoldItalic.ttf │ ├── TitilliumWeb-ExtraLight.ttf │ ├── TitilliumWeb-ExtraLightItalic.ttf │ ├── TitilliumWeb-Italic.ttf │ ├── TitilliumWeb-Light.ttf │ ├── TitilliumWeb-LightItalic.ttf │ ├── TitilliumWeb-Regular.ttf │ ├── TitilliumWeb-SemiBold.ttf │ └── TitilliumWeb-SemiBoldItalic.ttf ├── requirements.txt ├── scripts ├── build-cairo.sh ├── build.sh ├── helpers │ └── remove-mvar-table.py ├── pull-request-cairo.sh ├── pull-request.sh └── virtual-environment.sh └── sources ├── Cairo-Italic-Upstream.glyphs ├── Cairo-Italic.glyphs ├── Cairo-Roman-Upstream.glyphs ├── Cairo-Roman.glyphs ├── TitilliumWeb-Italic.glyphs └── TitilliumWeb-Roman.glyphs /.gitignore: -------------------------------------------------------------------------------- 1 | # For Apple users 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /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 | # Name or Organization 7 | 8 | Accademia di Belle Arti di Urbino 9 | Mohamed Gaber 10 | -------------------------------------------------------------------------------- /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 | # Name 11 | 12 | Mohamed Gaber 13 | Khaled Hosny 14 | Dave Crossland 15 | Marc Foley 16 | Eli Heuer 17 | -------------------------------------------------------------------------------- /OFL.txt: -------------------------------------------------------------------------------- 1 | Copyright 2009 The Titillium Web Project Authors (https://github.com/eliheuer/titillium-web-vf) 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 | http://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 | # Titillium Web Variable Fonts 2 | This repo contains the [fonts](fonts), [source files](sources), and [specimens](docs) 3 | for a remastered Titillium Web font family available on 4 | [Google Fonts](https://fonts.google.com/specimen/Titillium+Web). 5 | It started as a fork of [Cario](https://github.com/Gue3bara/Cairo) 6 | by [Mohamed Gaber](https://gaber.design/projects), which is a fork of 7 | [Titillium Web](http://nta.accademiadiurbino.it/titillium.html) 8 | that adds support for the Arabic Script. 9 | 10 | An [interactive web specimen](https://elih.blog/titillium-web-vf) 11 | hosted from this repository 12 | ( [docs/index.html](https://github.com/eliheuer/titillium-web-vf/blob/master/docs/index.html) ) 13 | is here: [https://elih.blog/titillium-web-vf](https://elih.blog/titillium-web-vf) 14 | 15 | ![basic specimen](https://github.com/eliheuer/titillium-web-vf/blob/master/docs/specimens/basic-specimen.gif) 16 | 17 | ## Building New Fonts from Source 18 | A Bash build script is located in the [scripts](scripts) directory. 19 | To build new font files, open a Unix(macOS, Linux, WSL, etc) terminal and activate a 20 | [Python3 virtual environment](https://docs.python.org/3/library/venv.html) 21 | with the packages from [requirements.txt](requirements.txt) installed. 22 | Then, navigate to the root of this repository, and run the following: 23 | ``` 24 | scripts/build.sh 25 | ``` 26 | If you want to make a new pull request to [Google Fonts](https://github.com/google/fonts), 27 | clone the [git repository](https://github.com/google/fonts) 28 | to `~/Google/`, and run the following: 29 | ``` 30 | scripts/build.sh && scripts/pull-request.sh 31 | ``` 32 | If you want to build similar fonts, but with the name `Cairo`, run the following: 33 | ``` 34 | scripts/build-cairo.sh && scripts/pull-request-cairo.sh 35 | ``` 36 | ## Installation Instructions 37 | Font files are in the fonts directory, please follow the install inscructions for your operating system of choice: 38 | 39 | - [Linux](https://wiki.archlinux.org/index.php/fonts#Manual_installation) 40 | - [MacOS](https://support.apple.com/en-us/HT201749) 41 | - [Windows](https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows) 42 | 43 | ## Getting Involved 44 | Would you like to contribute to the development of this font? Here is how **you** can help: 45 | 46 | - Tell us about any bugs you find, or enhancements you would like to see on the Google Fonts issue tracker: [https://github.com/googlefonts/issues](https://github.com/googlefonts/issues) 47 | 48 | - Contribute directly to the fonts. This repository contains a complete set of source files. Make changes and submit a pull request. 49 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | A basic web specimen, rendered from `index.html` in this directory, is hosted here: [https://elih.blog/titillium-web-vf](https://elih.blog/titillium-web-vf) 2 | -------------------------------------------------------------------------------- /docs/css/TitilliumWeb-Roman-VF.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliheuer/titillium-web-vf/e17573d0cb9d74abe18a98af2323943398b8056b/docs/css/TitilliumWeb-Roman-VF.ttf -------------------------------------------------------------------------------- /docs/css/style.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'TitilliumWeb-Roman'; 3 | src: url('TitilliumWeb-Roman-VF.ttf'); 4 | format("truetype"); 5 | font-weight: bold; 6 | } 7 | body { 8 | background-color: #111111; 9 | color: #ffffff; 10 | direction: rtl; 11 | } 12 | h1 {font-size: 4em;} 13 | P {font-size: 3em;} 14 | .variable { 15 | font-family: 'TitilliumWeb-Roman'; 16 | --wght: 0; 17 | font-variation-settings: 'wght' var(--wght); 18 | } 19 | -------------------------------------------------------------------------------- /docs/drawbot/basic-specimen.py: -------------------------------------------------------------------------------- 1 | # RENDER WITH: http://www.drawbot.com/ 2 | from drawBot import * 3 | import math 4 | import os 5 | 6 | # STATIC VARIABLES 7 | W,H,M = 1000,1000,20 # WIDTH, HEIGHT, MARGIN 8 | VAR_WGHT = 100 # VARIABLE FONT WEIGHT 9 | U = 32 # ONE GRID UNIT 10 | 11 | def set_font_roman(): 12 | print("Roman font set") 13 | font("fonts/TitilliumWeb-Roman-VF.ttf") 14 | for axis, data in listFontVariations().items(): 15 | print((axis, data)) 16 | 17 | def set_font_italic(): 18 | print("italic font set") 19 | font("fonts/TitilliumWeb-Italic-VF.ttf") 20 | for i in listFontVariations().items(): 21 | print(i) 22 | print(dir(font)) 23 | 24 | def grid(inc): 25 | stroke(0.2) 26 | stpX, stpY = 0, 0 27 | incX, incY = (W-(M*2))/inc, (H-(M*2))/inc 28 | for x in range(inc+1): 29 | polygon((M+stpX, M), (M+stpX, H-M)) 30 | stpX += incX 31 | for y in range(inc+1): 32 | polygon((M, M+stpY), (H-M, M+stpY)) 33 | stpY += incY 34 | 35 | # DRAW NEW PAGE 36 | newPage(W, H) 37 | fill(0) 38 | rect(0, 0, W, H) 39 | #grid(30) 40 | #draw_boxes() 41 | set_font_roman() 42 | fill(1) 43 | 44 | # HEADLINE 45 | fontSize(123) 46 | fontVariations(wght=800) 47 | stroke(None) 48 | text("Titillium Web VF", ( M+(U*1), M+(U*24) )) 49 | 50 | # ART 51 | fontSize(290) 52 | wght_var = 200 53 | stroke(0) 54 | strokeWidth(1) 55 | for i in range(4): 56 | fontVariations(wght=wght_var) 57 | text("a", (M+(U*0.6)+(U*(i*2.9)), (M+2+(U*20)))) 58 | wght_var += 200 59 | 60 | stroke(None) 61 | fontSize(115) 62 | fontVariations(wght=900) 63 | textBox("الكتاب", 64 | (M+(U*1.2), M+(U*13), M+10+(U*12), M+(U*8)), align="right") 65 | 66 | fontSize(30) 67 | stroke(None) 68 | tracking(2) 69 | for i in range(8): 70 | VAR_WGHT += 100 71 | fontVariations(wght=VAR_WGHT) 72 | print("VAR_WGHT=", VAR_WGHT) 73 | text("Variable Font Weight: %s" %VAR_WGHT, ( M+(U*16), ((M+(U*23.5))-(U*i)) )) 74 | tracking(0) 75 | 76 | fill(1) 77 | fontVariations(wght=400) 78 | text("A B C D E F G H I J K L M N O ", (M+(U*17), M+(U*12))) 79 | text("P Q R S T U V W X Y Z a b c ", (M+(U*17), M+(U*11))) 80 | text("d e f g h i j k l m n o p q r s t u", (M+(U*17), M+(U*10))) 81 | text("v w x y z 1 2 3 4 5 6 7 8 9 0", (M+(U*17), M+(U*9 ))) 82 | 83 | stroke(None) 84 | fontSize(29) 85 | fontVariations(wght=400) 86 | textBox(" ا ب ت ث ج ح خ د ذ ر ز س ش ", 87 | (M+12+(U*0), M+17+(U*6), M+10+(U*12), M+(U*6)), align="right") 88 | textBox(" ص ض ط ظ ع غ ف ق ك ل م ", 89 | (M+12+(U*0), M+20+(U*4.5), M+10+(U*12), M+(U*6)), align="right") 90 | textBox(" ه ن و ي ؤ ئ ", 91 | (M+12+(U*0), M+20+(U*3), M+10+(U*12), M+(U*6)), align="right") 92 | textBox(" ٩ ٨ ٧ ٦ ٥ ٤ ٣ ٢ ١ ", 93 | (M-155+(U*0), M+18+(U*3), M+10+(U*12), M+(U*6)), align="right") 94 | 95 | fontSize(30) 96 | font("fonts/TitilliumWeb-Italic-VF.ttf") 97 | for axis, data in listFontVariations().items(): 98 | print((axis, data)) 99 | set_font_italic() 100 | text("A B C D E F G H I J K L M N O ", (M+(U*17), M+(U*5))) 101 | text("P Q R S T U V W X Y Z a b c ", (M+(U*17), M+(U*4))) 102 | text("d e f g h i j k l m n o p q r s t u", (M+(U*17), M+(U*3))) 103 | text("v w x y z 1 2 3 4 5 6 7 8 9 0", (M+(U*17), M+(U*2))) 104 | 105 | stroke(None) 106 | fontSize(29) 107 | fontVariations(wght=400) 108 | textBox(" ا ب ت ث ج ح خ د ذ ر ز س ش ", 109 | (M+12+(U*0), M+17+((U*-1)), M+10+(U*12), M+(U*6)), align="right") 110 | textBox(" ص ض ط ظ ع غ ف ق ك ل م ", 111 | (M+12+(U*0), M+20+(U*(-2.5)), M+10+(U*12), M+(U*6)), align="right") 112 | textBox(" ه ن و ي ؤ ئ ", 113 | (M+12+(U*0), M+20+(U*(-4)), M+10+(U*12), M+(U*6)), align="right") 114 | textBox(" ٩ ٨ ٧ ٦ ٥ ٤ ٣ ٢ ١ ", 115 | (M-155+(U*0), M+18+(U*(-4)), M+10+(U*12), M+(U*6)), align="right") 116 | 117 | # Save GIF 118 | os.chdir("docs") 119 | os.chdir("specimens") 120 | saveImage("basic-specimen.gif") 121 | # saveImage("basic-specimen.pdf") 122 | os.chdir("..") 123 | os.chdir("..") 124 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Titillium Web VF: Basic Web Specimen 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 18 | 25 |
26 |
27 |

بسم ٱللَّهِ ٱلرَّحمن ٱلرَّحِیم

28 |

ٱلحَمدُ لِلَّهِ رَبِّ ٱلعَـٰلَمِینَ

29 |

ٱلرَّحمَـٰنِ ٱلرَّحِیمِ

30 |

مَـٰلِكِ یَومِ ٱلدِّینِ

31 |

إِیَّاكَ نَعۡبُدُ وَإِیَّاكَ نَسۡتَعِینُ

32 |

ٱهۡدِنَا ٱلصِّرَ ٰطَ ٱلۡمُسۡتَقِیمَ

33 |

صِرَ ٰطَ ٱلَّذِینَ أَنۡعَمۡتَ عَلَیۡهِمۡ غَیۡرِ ٱلۡمَغۡضُوبِ عَلَیۡهِمۡ وَلَا ٱلضَّاۤلِّینَ

34 |

35 |
36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /docs/javascript/var.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // init 4 | const container = document.querySelector('.controls'); 5 | let variableElement = document.querySelector('.variable'); 6 | 7 | // Set style value 8 | function setStyles (property, value) { 9 | return document.documentElement.querySelector(".variable").style.setProperty(property, value); 10 | } 11 | 12 | function updateInputElements(e) { 13 | // setting up the instances 14 | const rowContainer = e.target.parentNode; 15 | const slider = rowContainer.querySelector(".slider"); 16 | const textbox = rowContainer.querySelector(".textbox"); 17 | const styleType = slider.getAttribute("id"); 18 | const sliderValue = e.target.value; 19 | 20 | // setting values 21 | slider.value = sliderValue; 22 | textbox.value = sliderValue; 23 | 24 | // Checks and updates the input field so they don't go over their maximum. 25 | const slidermax = Number(slider.getAttribute("max")); 26 | if (textbox.value > slidermax) { 27 | textbox.value = slidermax; 28 | } 29 | 30 | // setting the style 31 | setStyles(`--${styleType}`, sliderValue); 32 | } 33 | 34 | window.addEventListener('load', function() { 35 | // Updates all inputs and their values depending on what the user has changed. 36 | container.addEventListener('input', updateInputElements); 37 | }); 38 | -------------------------------------------------------------------------------- /docs/specimens/basic-specimen.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliheuer/titillium-web-vf/e17573d0cb9d74abe18a98af2323943398b8056b/docs/specimens/basic-specimen.gif -------------------------------------------------------------------------------- /fonts/TitilliumWeb-Italic-VF.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliheuer/titillium-web-vf/e17573d0cb9d74abe18a98af2323943398b8056b/fonts/TitilliumWeb-Italic-VF.ttf -------------------------------------------------------------------------------- /fonts/TitilliumWeb-Roman-VF.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliheuer/titillium-web-vf/e17573d0cb9d74abe18a98af2323943398b8056b/fonts/TitilliumWeb-Roman-VF.ttf -------------------------------------------------------------------------------- /fonts/static-fonts/TitilliumWeb-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliheuer/titillium-web-vf/e17573d0cb9d74abe18a98af2323943398b8056b/fonts/static-fonts/TitilliumWeb-Black.ttf -------------------------------------------------------------------------------- /fonts/static-fonts/TitilliumWeb-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliheuer/titillium-web-vf/e17573d0cb9d74abe18a98af2323943398b8056b/fonts/static-fonts/TitilliumWeb-Bold.ttf -------------------------------------------------------------------------------- /fonts/static-fonts/TitilliumWeb-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliheuer/titillium-web-vf/e17573d0cb9d74abe18a98af2323943398b8056b/fonts/static-fonts/TitilliumWeb-BoldItalic.ttf -------------------------------------------------------------------------------- /fonts/static-fonts/TitilliumWeb-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliheuer/titillium-web-vf/e17573d0cb9d74abe18a98af2323943398b8056b/fonts/static-fonts/TitilliumWeb-ExtraLight.ttf -------------------------------------------------------------------------------- /fonts/static-fonts/TitilliumWeb-ExtraLightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliheuer/titillium-web-vf/e17573d0cb9d74abe18a98af2323943398b8056b/fonts/static-fonts/TitilliumWeb-ExtraLightItalic.ttf -------------------------------------------------------------------------------- /fonts/static-fonts/TitilliumWeb-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliheuer/titillium-web-vf/e17573d0cb9d74abe18a98af2323943398b8056b/fonts/static-fonts/TitilliumWeb-Italic.ttf -------------------------------------------------------------------------------- /fonts/static-fonts/TitilliumWeb-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliheuer/titillium-web-vf/e17573d0cb9d74abe18a98af2323943398b8056b/fonts/static-fonts/TitilliumWeb-Light.ttf -------------------------------------------------------------------------------- /fonts/static-fonts/TitilliumWeb-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliheuer/titillium-web-vf/e17573d0cb9d74abe18a98af2323943398b8056b/fonts/static-fonts/TitilliumWeb-LightItalic.ttf -------------------------------------------------------------------------------- /fonts/static-fonts/TitilliumWeb-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliheuer/titillium-web-vf/e17573d0cb9d74abe18a98af2323943398b8056b/fonts/static-fonts/TitilliumWeb-Regular.ttf -------------------------------------------------------------------------------- /fonts/static-fonts/TitilliumWeb-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliheuer/titillium-web-vf/e17573d0cb9d74abe18a98af2323943398b8056b/fonts/static-fonts/TitilliumWeb-SemiBold.ttf -------------------------------------------------------------------------------- /fonts/static-fonts/TitilliumWeb-SemiBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliheuer/titillium-web-vf/e17573d0cb9d74abe18a98af2323943398b8056b/fonts/static-fonts/TitilliumWeb-SemiBoldItalic.ttf -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | fontmake 2 | git+https://github.com/googlefonts/gftools 3 | fontbakery -------------------------------------------------------------------------------- /scripts/build-cairo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | glyphs_source="Cairo-Roman" 5 | #glyphs_source="Cairo-Roman Cairo-Italic" 6 | output_dir="fonts" 7 | family_name="Cairo" 8 | build_static_fonts=true 9 | 10 | echo "[INFO] Starting build script for $family_name font family" 11 | 12 | if [ -d .git ]; then 13 | echo "[TEST] Running from a Git root directory, looks good" 14 | else 15 | echo "[WARN] Font family Git root not found, please run from the root directory" 16 | echo "[WARN] Build process cancelled" 17 | exit 1 18 | fi 19 | 20 | for sources in $glyphs_source; do 21 | echo "[TEST] Queued source file: $sources.glyphs" 22 | done 23 | 24 | for sources in $glyphs_source; do 25 | echo "[INFO] Building $sources.glyphs with Fontmake..." 26 | fontmake -g sources/$sources.glyphs -o variable \ 27 | --output-path $output_dir/$sources-VF.ttf \ 28 | --verbose INFO 29 | done 30 | 31 | if [ "$build_static_fonts" = true ]; then 32 | echo "[INFO] Building static fonts" 33 | fontmake -g sources/Cairo-Roman.glyphs -i "Cairo ExtraLight" --verbose INFO 34 | fontmake -g sources/Cairo-Roman.glyphs -i "Cairo Light" --verbose INFO 35 | fontmake -g sources/Cairo-Roman.glyphs -i "Cairo Regular" --verbose INFO 36 | fontmake -g sources/Cairo-Roman.glyphs -i "Cairo SemiBold" --verbose INFO 37 | fontmake -g sources/Cairo-Roman.glyphs -i "Cairo Bold" --verbose INFO 38 | fontmake -g sources/Cairo-Roman.glyphs -i "Cairo Black" --verbose INFO 39 | fontmake -g sources/Cairo-Italic.glyphs -i "Cairo ExtraLight Italic" --verbose INFO 40 | fontmake -g sources/Cairo-Italic.glyphs -i "Cairo Light Italic" --verbose INFO 41 | fontmake -g sources/Cairo-Italic.glyphs -i "Cairo Italic" --verbose INFO 42 | fontmake -g sources/Cairo-Italic.glyphs -i "Cairo SemiBold Italic" --verbose INFO 43 | fontmake -g sources/Cairo-Italic.glyphs -i "Cairo Bold Italic" --verbose INFO 44 | fi 45 | 46 | if [ "$build_static_fonts" = true ]; then 47 | echo "[INFO] Moving static fonts" 48 | for font in instance_ttf/Cairo-*; do 49 | echo "[INFO] Moving $font ..." 50 | mv $font fonts/static-fonts/ 51 | done 52 | fi 53 | 54 | echo "[INFO] Removing build directories" 55 | rm -rf instance_ufo instance_otf instance_ttf master_ufo 56 | 57 | echo "[INFO] Fixing VF DSIG tables" 58 | for sources in $glyphs_source; do 59 | if gftools fix-dsig -f fonts/$sources-VF.ttf >/dev/null; then 60 | echo "[INFO] DSIG fixed for $sources-VF.ttf" 61 | else 62 | echo "[ERROR] GFtools is not working, please update or install: https://github.com/googlefonts/gftools" 63 | fi 64 | done 65 | 66 | if [ "$build_static_fonts" = true ]; then 67 | echo "[INFO] Fixing Static DSIG tables" 68 | for font in fonts/static-fonts/Cairo-*; do 69 | echo "[INFO] Fixing DSIG table for $font ..." 70 | gftools fix-dsig -f $font >/dev/null 71 | done 72 | fi 73 | 74 | echo "[INFO] Autohinting variable fonts with ttfautohint" 75 | for font in fonts/Cairo-*; do 76 | echo "[INFO] Hinting $font "; 77 | ttfautohint $font temp.ttf 78 | mv temp.ttf $font 79 | gftools fix-hinting $font 80 | mv $font.fix $font 81 | done 82 | 83 | if [ "$build_static_fonts" = true ]; then 84 | echo "[INFO] Autohinting static fonts with ttfautohint" 85 | for font in fonts/static-fonts/Cairo-*; do 86 | echo "[INFO] Hinting $font "; 87 | ttfautohint $font temp.ttf 88 | mv temp.ttf $font 89 | gftools fix-hinting $font 90 | mv $font.fix $font 91 | done 92 | fi 93 | 94 | echo "[INFO] Removing MVAR table" 95 | for font in fonts/Cairo-*; do 96 | echo "[INFO] Removing MVAR table for $font "; 97 | python3 scripts/helpers/remove-mvar-table.py $font 98 | done 99 | 100 | if [ "$build_static_fonts" = true ]; then 101 | for font in fonts/static-fonts/Cairo-*; do 102 | echo "[INFO] Removing MVAR table for $font "; 103 | python3 scripts/helpers/remove-mvar-table.py $font 104 | done 105 | fi 106 | 107 | echo "[INFO] Done building $family_name font family" 108 | -------------------------------------------------------------------------------- /scripts/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | glyphsSource="TitilliumWeb-Roman TitilliumWeb-Italic" 5 | outputDir="fonts" 6 | familyName="TitilliumWeb" 7 | 8 | echo "[INFO] Starting build script for $familyName font family" 9 | 10 | if [ -d .git ]; then 11 | echo "[TEST] Running from a Git root directory, looks good" 12 | else 13 | echo "[WARN] Font family Git root not found, please run from the root directory" 14 | echo "[WARN] Build process cancelled" 15 | exit 1 16 | fi 17 | 18 | for sources in $glyphsSource; do 19 | echo "[TEST] Queued source file: $sources.glyphs" 20 | done 21 | 22 | for sources in $glyphsSource; do 23 | echo "[INFO] Building $sources.glyphs with Fontmake, this might take some time..." 24 | fontmake -g sources/$sources.glyphs -o variable \ 25 | --output-path $outputDir/$sources-VF.ttf \ 26 | --verbose ERROR 27 | done 28 | 29 | echo "[INFO] Building static fonts" 30 | fontmake -g sources/TitilliumWeb-Roman.glyphs -i "Titillium Web ExtraLight" --verbose ERROR 31 | fontmake -g sources/TitilliumWeb-Roman.glyphs -i "Titillium Web Light" --verbose ERROR 32 | fontmake -g sources/TitilliumWeb-Roman.glyphs -i "Titillium Web Regular" --verbose ERROR 33 | fontmake -g sources/TitilliumWeb-Roman.glyphs -i "Titillium Web SemiBold" --verbose ERROR 34 | fontmake -g sources/TitilliumWeb-Roman.glyphs -i "Titillium Web Bold" --verbose ERROR 35 | fontmake -g sources/TitilliumWeb-Roman.glyphs -i "Titillium Web Black" --verbose ERROR 36 | fontmake -g sources/TitilliumWeb-Italic.glyphs -i "Titillium Web ExtraLight Italic" --verbose ERROR 37 | fontmake -g sources/TitilliumWeb-Italic.glyphs -i "Titillium Web Light Italic" --verbose ERROR 38 | fontmake -g sources/TitilliumWeb-Italic.glyphs -i "Titillium Web Italic" --verbose ERROR 39 | fontmake -g sources/TitilliumWeb-Italic.glyphs -i "Titillium Web SemiBold Italic" --verbose ERROR 40 | fontmake -g sources/TitilliumWeb-Italic.glyphs -i "Titillium Web Bold Italic" --verbose ERROR 41 | 42 | echo "[INFO] Moving static fonts" 43 | for font in instance_ttf/*.ttf; do 44 | echo "[INFO] Moving $font ..." 45 | mv $font fonts/static-fonts/ 46 | done 47 | 48 | echo "[INFO] Removing build directories" 49 | rm -rf instance_ufo instance_otf instance_ttf master_ufo 50 | 51 | echo "[INFO] Fixing VF DSIG tables" 52 | for sources in $glyphsSource; do 53 | if gftools fix-dsig -f fonts/$sources-VF.ttf >/dev/null; then 54 | echo "[INFO] DSIG fixed for $sources-VF.ttf" 55 | else 56 | echo "[ERROR] GFtools is not working, please update or install: https://github.com/googlefonts/gftools" 57 | fi 58 | done 59 | 60 | echo "[INFO] Fixing Static DSIG tables" 61 | for font in fonts/static-fonts/*.ttf; do 62 | echo "[INFO] Fixing DSIG table for $font ..." 63 | gftools fix-dsig -f $font >/dev/null 64 | done 65 | 66 | echo "[INFO] Autohinting with ttfautohint" 67 | for font in fonts/*.ttf; do 68 | echo "[INFO] Hinting $font "; 69 | ttfautohint $font temp.ttf 70 | mv temp.ttf $font 71 | gftools fix-hinting $font 72 | mv $font.fix $font 73 | done 74 | for font in fonts/static-fonts/*.ttf; do 75 | echo "[INFO] Hinting $font "; 76 | ttfautohint $font temp.ttf 77 | mv temp.ttf $font 78 | gftools fix-hinting $font 79 | mv $font.fix $font 80 | done 81 | 82 | echo "[INFO] Removing MVAR table" 83 | for font in fonts/*.ttf; do 84 | echo "[INFO] Removing MVAR table for $font "; 85 | python3 scripts/helpers/remove-mvar-table.py $font 86 | done 87 | for font in fonts/static-fonts/*.ttf; do 88 | echo "[INFO] Removing MVAR table for $font "; 89 | python3 scripts/helpers/remove-mvar-table.py $font 90 | done 91 | 92 | #echo "[INFO] Running fix-name-table.py" 93 | #python3 sources/scripts/helpers/fix-name-table.py fonts/vf/$familyName-VF.ttf 94 | 95 | echo "[INFO] Done building $familyName font family" 96 | -------------------------------------------------------------------------------- /scripts/helpers/remove-mvar-table.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | from fontTools import ttLib 3 | 4 | description = 'path to ttf file' 5 | parser = argparse.ArgumentParser(description=description) 6 | parser.add_argument('ttf_font', help="Font in OpenType (TTF) format") 7 | 8 | def main(): 9 | args = parser.parse_args() 10 | font = ttLib.TTFont(args.ttf_font) 11 | 12 | print("[INFO] Looking for MVAR table...") 13 | has_MVAR = "MVAR" in font 14 | print(has_MVAR) 15 | 16 | if has_MVAR: 17 | print('[INFO] Removing MVAR table') 18 | del font['MVAR'] 19 | font.save(args.ttf_font) 20 | else: 21 | print('[INFO] No MVAR, doing nothing') 22 | 23 | if __name__ == '__main__': 24 | main() 25 | -------------------------------------------------------------------------------- /scripts/pull-request-cairo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | build_static_fonts=true 5 | 6 | prDir="~/Google/fonts/ofl/cairo" 7 | familyName="Cairo" 8 | 9 | echo "[INFO] Preparing a new $familyName pull request at $prDir" 10 | 11 | echo "[INFO] Moving variable fonts" 12 | cp fonts/Cairo-Roman-VF.ttf ~/Google/fonts/ofl/cairo/Cairo[wght].ttf 13 | #cp fonts/Cairo-Italic-VF.ttf ~/Google/fonts/ofl/cairo/Cairo-Italic[wght].ttf 14 | 15 | if [ "$build_static_fonts" = true ]; then 16 | for font in fonts/static-fonts/Cairo-*; do 17 | echo "[INFO] Moving $font "; 18 | cp $font ~/Google/fonts/ofl/cairo/static/ 19 | done 20 | fi 21 | 22 | echo "[INFO] Done preparing $familyName pull request at $prDir" 23 | -------------------------------------------------------------------------------- /scripts/pull-request.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | prDir="~/Google/fonts/ofl/titilliumweb" 5 | familyName="TitilliumWeb" 6 | 7 | echo "[INFO] Preparing a new $familyName pull request at $prDir" 8 | 9 | echo "[INFO] Moving variable fonts" 10 | cp fonts/TitilliumWeb-Roman-VF.ttf ~/Google/fonts/ofl/titilliumweb/TitilliumWeb[wght].ttf 11 | cp fonts/TitilliumWeb-Italic-VF.ttf ~/Google/fonts/ofl/titilliumweb/TitilliumWeb-Italic[wght].ttf 12 | 13 | for font in fonts/static-fonts/*.ttf; do 14 | echo "[INFO] Moving $font "; 15 | cp $font ~/Google/fonts/ofl/titilliumweb/static/ 16 | done 17 | 18 | echo "[INFO] Done preparing $familyName pull request at $prDir" 19 | -------------------------------------------------------------------------------- /scripts/virtual-environment.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | echo "[INFO] Making a Python3 venv" 5 | 6 | python3 -m venv virtual-env 7 | source "./virtual-env/bin/activate" 8 | pip install --upgrade pip 9 | pip list 10 | pip install fontmake 11 | pip install gftools 12 | --------------------------------------------------------------------------------