• Stars
    star
    143
  • Rank 257,007 (Top 6 %)
  • Language
    Python
  • License
    SIL Open Font Lic...
  • Created about 8 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Variable font example in OpenType-CFF2 & TrueType formats

Adobe Variable Font Prototype

Variable font in OpenType-CFF2 and TrueType formats, made from UFO sources derived from Source Serif Pro, designed by Frank Grießhammer.

The font files are intended to serve as test cases for environments and workflows that aim to support OpenType variable fonts.

The fonts are functional but have some limitations — see Current limitations. We plan to update them as the tools improve.

Font characteristics

Adobe Variable Font Prototype contains two axes — weight and contrast — five design masters, and eight named instances — Extra Light, Light, Regular, Semibold, Bold, Black, Black Medium Contrast, and Black High Contrast.

The weight axis has an intermediate master (master_1), and the design space can be thought of as having the shape of a square triangle. This is achieved by using master_0 twice, and by having master_4 along the diagonal defined by master_0 and master_3. This arrangement effectively collapses half of the original rectangular-shaped design space, concealing interpolation imperfections that would be visible otherwise. See design space notes for more details.

The font also contains transitional designs for the glyphs $ (dollar) and ¢ (cent), in which the inner-counter part of the stroke is removed, when the weight axis reaches Bold or heavier.

The font supports the Adobe Latin 2 character set, GPOS kerning, and the GSUB features listed below.

pnum (proportional figures)
tnum (tabular figures [default])
onum (old-style a.k.a. text figures)
lnum (lining figures [default])
zero (slashed zero)
case (case-sensitive forms such as parentheses, hyphen)
liga (ligatures fi fl ft)

Downloading the font files

Building the fonts from source

Requirements

  • Python 3.6 or later. We recommend not using your system-installed Python if you are using macOS or a Linux system with Python 3 pre-installed. Instead, use either an installer from Python.org or use Homebrew (macOS only).

  • We also recommend the use of a Python virtual environment.

  • Install the requirements with pip:

    pip3 install -r requirements-dev.txt

Build command

With the requirements installed, you can build with the supplied build script:

macOS and Linux:

sh buildFont.sh

Windows:

cmd buildFont.sh

Build process

The buildFont.sh script first builds the OpenType-CFF2 font with the FDK tools buildMasterOTFs and buildCFF2VF. The first tool generates OpenType-CFF fonts from each of the UFO masters. And the second takes the set of OTFs built in the previous step, and combines them to produce the CFF2 variable font.

The CFF2 table is then subroutinized with FDK's tx tool, and the modified table is replaced in place using FDK's sfntedit tool.

Next, fontmake is used for building the variable TrueType font.

Finally, sfntedit is used for copying/replacing several tables between the OTF and TTF fonts.

Testing

A test suite is available to check the built fonts to ensure they were built with expected values. You can initiate the tests with:

pytest tests

The tests are designed to catch unexpected regressions that might be caused by changes in tools or other environment differences.

Current limitations

  • Support for the variable OTF-CFF2 flavor is not as broad as for the variable TTF flavor.
  • Neither of the fonts is hinted.

More Repositories

1

source-code-pro

Monospaced font family for user interface and coding environments
CSS
19,885
star
2

source-han-sans

Source Han Sans | 思源黑体 | 思源黑體 | 思源黑體 香港 | 源ノ角ゴシック | 본고딕
14,420
star
3

source-han-serif

Source Han Serif | 思源宋体 | 思源宋體 | 思源宋體 香港 | 源ノ明朝 | 본명조
Shell
8,207
star
4

source-sans

Sans serif font family for user interface environments
CSS
3,472
star
5

source-serif

Typeface for setting text in many sizes, weights, and languages. Designed to complement Source Sans.
CSS
2,169
star
6

source-han-code-jp

Source Han Code JP | 源ノ角ゴシック Code
PostScript
1,643
star
7

source-han-mono

Source Han Mono | 思源等宽 | 思源等寬 | 思源等寬 香港 | 源ノ等幅 | 본모노
1,145
star
8

source-han-super-otc

Source Han & Noto CJK Mega/Ultra OTCs
205
star
9

adobe-blank

Adobe Blank
PostScript
200
star
10

emojione-color

OpenType-SVG font of EmojiOne 2.3
150
star
11

noto-emoji-svg

OpenType-SVG version of Noto Color Emoji
HTML
106
star
12

source-emoji

HTML
72
star
13

adobe-notdef

Adobe NotDef
PostScript
65
star
14

adobe-blank-2

Adobe Blank 2
PostScript
34
star
15

variable-font-collection-test

Variable Font Collection Test
Shell
33
star
16

adobe-blank-vf

Adobe Blank VF & Friends
Shell
30
star
17

white-on-black-vf

White On Black VF versus Black On White VF
Shell
22
star
18

kenten-generic

Kenten Generic
PostScript
21
star
19

source-devanagari-sans

Source Devanagari Sans
20
star
20

source-tamil-sans

Source Tamil Sans
17
star
21

source-hebrew-sans

Source Hebrew Sans
16
star
22

tally-marks

Tally Marks OpenType-SVG Font
PostScript
15
star
23

locl-test

LOCL Test
PostScript
13
star
24

source-bengali-sans

Source Bengali Sans
12
star
25

tombo-sp

Tombo SP
PostScript
12
star
26

source-kannada-sans

Source Kannada Sans
11
star
27

atf-localized-ss-names

Python
10
star
28

source-gujarati-sans

Source Gujarati Sans
10
star
29

ivs-test

IVS Test
PostScript
10
star
30

cjk-radicals

CJK Radicals (CJK Radicals Supplement & Kangxi Radicals)
PostScript
7
star
31

css-orientation-test

CSS Orientation Test
PostScript
7
star
32

source-gurmukhi-sans

Source Gurmukhi Sans
7
star
33

width-and-vertical-width-vf

Width & Vertical Width VF
Shell
6
star
34

fdarray-test

FDArray Test
PostScript
5
star
35

width-test

Width Test
PostScript
5
star
36

source-locl-test

Source LOCL Test
Modelica
5
star
37

surce-sns-missing-types

3
star
38

cff2-hint-ordering-test

1
star