Skip to content

Commit

Permalink
First Public Release
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Lunde committed Feb 1, 2019
0 parents commit 403fec1
Show file tree
Hide file tree
Showing 19 changed files with 2,257 additions and 0 deletions.
96 changes: 96 additions & 0 deletions LICENSE.txt
@@ -0,0 +1,96 @@
Copyright 2019 Adobe (http://www.adobe.com/), with Reserved Font Name
'Source'. Source is a trademark of Adobe in the United States and/or
other countries.

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
-----------------------------------------------------------

PREAMBLE
The 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 may
include 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 & CONDITIONS
Permission 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.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE 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.
Binary file added OTF/SourceHanSansVFProtoCN.otf
Binary file not shown.
Binary file added OTF/SourceHanSansVFProtoHK.otf
Binary file not shown.
Binary file added OTF/SourceHanSansVFProtoJP.otf
Binary file not shown.
Binary file added OTF/SourceHanSansVFProtoKR.otf
Binary file not shown.
Binary file added OTF/SourceHanSansVFProtoMO.otf
Binary file not shown.
Binary file added OTF/SourceHanSansVFProtoTW.otf
Binary file not shown.
Binary file added OTF/SourceHanSerifVFProtoCN.otf
Binary file not shown.
Binary file added OTF/SourceHanSerifVFProtoHK.otf
Binary file not shown.
Binary file added OTF/SourceHanSerifVFProtoJP.otf
Binary file not shown.
Binary file added OTF/SourceHanSerifVFProtoKR.otf
Binary file not shown.
Binary file added OTF/SourceHanSerifVFProtoMO.otf
Binary file not shown.
Binary file added OTF/SourceHanSerifVFProtoTW.otf
Binary file not shown.
126 changes: 126 additions & 0 deletions README.md
@@ -0,0 +1,126 @@
# Variable Font Collection Test

The purpose of this repository's OpenType/CFF2 Collections (aka Variable Font Collections) is to simulate the deployment format of our open source [*Source Han Sans*](https://github.com/adobe-fonts/source-han-sans/) and [*Source Han Serif*](https://github.com/adobe-fonts/source-han-serif/) Pan-CJK fonts as Variable Fonts, which are made available for testing purposes so that font consumers, meaning OSes, apps, layout engines, and libraries, can support such fonts. This also applies to the Google-branded [*Noto CJK*](https://github.com/googlei18n/noto-cjk/) versions. Note that the source OpenType/CFF2 fonts (aka Variable Fonts) are in the "OTF" directory, and are included only for reference purposes. The Variable Font Collections are expected to behave the same as the individual Variable Fonts.

## Supported Languages

Unlike *Source Han Sans* / *Noto Sans CJK* Version 2.000 that supports five default languages, these test fonts support a sixth. This sixth language is a third flavor of Traditional Chinese, for Macao SAR, whose regional conventions are close to those of Hong Kong SAR, but with enough differences to warrant separate fonts. We are also in the process of registering an OpenType language tag, ZHTM, for this purpose.

The six supported languages are as follows, and the two-letter region codes in parentheses are used in the font names, and also for the boxed digraph glyphs that are mapped from all 45K mappings in the fonts:

**Language** | **Two-Letter Region Code**
--- | ---
Japanese | JP
Korean (ROK) | KR
Simplified Chinese, PRC (China) | CN
Traditional Chinese, ROC (Taiwan) | TW
Traditional Chinese, Hong Kong SAR | HK
Traditional Chinese, Macao SAR | MO

The '[name](https://docs.microsoft.com/en-us/typography/opentype/spec/name)' tables include localized menu name strings that do not include the two-letter region codes, because the localized names imply the languages. Only the English-language menu name strings include the two-letter region codes.

## Design Axes

In terms of Variable Font features, the following two design axes are included:

* Weight — [wght](https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxistag_wght)
* Width — [wdth](https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxistag_wdth)

The weight range is from 200 (ExtraLight) to 900 (Heavy), and the width range is from 100% (default 1000-unit horizontal advance) to 75% (compressed).

## CFF2 Structure

Each '[CFF2](https://docs.microsoft.com/en-us/typography/opentype/spec/cff2)' table includes 65,535 glyphs (GIDs 0 through 65534). The table below indicates the glyphs that are assigned, which can vary by face:

**GIDs & GID Ranges** | **Sans Serif** | **Serif**
--- | --- | ---
0 | .notdef | *same*
1 | space (mapped from U+0020 and U+00A0; aka uni0020) | *same*
2 | uni3000 (mapped from U+2003 and U+3000) | *same*
3 through 10924 | Boxed "JP" digraph | Boxed "MO" digraph
10925 through 21846 | Boxed "KR" digraph | Boxed "HK" digraph
21847 through 32768 | Boxed "CN" digraph | Boxed "TW" digraph
32769 through 43690 | Boxed "TW" digraph | Boxed "CN" digraph
43691 through 54612 | Boxed "HK" digraph | Boxed "KR" digraph
54613 through 65534 | Boxed "MO" digraph | Boxed "JP" digraph

The 'CFF2' tables have been subroutinized using the latest AFDKO *tx* tool, and are approximately 330K in size. Their unsubroutinized versions are approximately 31MB (Sans Serif) and 62MB (Serif) in size. This massive reduction in size was possible because the coverage of the six functional glyphs that represent two-letter region codes has been expanded to fill 10,922 GIDs.

The 'CFF2' tables include seven FDArray elements, and the GID assignments are as follows:

**FDArray Element** | **GID Ranges**
--- | ---
0 | 0 through 2
1 | 3 through 10924
2 | 10925 through 21846
3 | 21847 through 32768
4 | 32769 through 43690
5 | 43691 through 54612
6 | 54613 through 65534

## Unicode Mappings

The Sans Serif fonts include 44,806 mappings, and the Serif ones include 44,782, meaning 20 fewer. The 20 excluded mappings are for U+2780 ➀ through U+2793 ➓, which correspond to Sans Serif–style characters. The 20 corresponding style-agnostic characters that are supported by both faces are U+2460 ① through U+2469 ⑩ and U+2776 ❶ through U+277F ❿.

The '[cmap](https://docs.microsoft.com/en-us/typography/opentype/spec/cmap)' table for each of the six languages maps the nearly 45K code points to GIDs that correspond to the boxed two-letter region digraphs. The mapping is sequential, in terms of assigning GIDs within each 10,922-glyph GID range. In other words, the 45K code points map to GIDs 3 through 10924 in the "JP" (Sans Serif) and "MO" (Serif) fonts in a sequential fashion. During the process of assigning the mappings in a sequential fashion, when GID+10924 is reached, the GID value is reset to GID+3. This process continues until all 45K code points map to a GID with the range of 10,922 GIDs. The mappings for U+0020, U+00A0, U+2003, and U+3000 are special-cased, and map to GIDs 1 or 2.

The *utf32-mappings.txt* file specifies the 44,806 code points as UTF-32 values.

## OpenType Features

The only OpenType feature that is included in the '[GSUB](https://docs.microsoft.com/en-us/typography/opentype/spec/gsub)' (*Glyph Substitution*) table is '[locl](https://docs.microsoft.com/en-us/typography/opentype/spec/features_ko#a-namelocl-idloclatag-39locl39)' (*Localized Forms*) that can be used to substitute the glyphs for the default language with those for one that is selected via language tagging in apps that support such functionality, such as Adobe Indesign and modern browsers. For example, if using the "MO" (Macao SAR) font, Adobe InDesign supports language tagging for the other five languages, meaning that it is possible to display all six digraphs together. (InDesign does not yet support language tagging for Traditional Chinese as used in Macao SAR).

## Variable Font Collections

Two of the Variable Font Collections are face-specific, meaning one for Sans Serif (aka *Source Han Sans*), and another for Serif (aka *Source Han Serif*):

* *SourceHanSansVFProto.ttc*
* *SourceHanSerifVFProto.ttc*

The following 13 'sfnt' tables are shared within each face-specific Variable Font Collection:

* BASE
* CFF2
* HVAR
* STAT
* VORG
* avar
* fvar
* hhea
* hmtx
* maxp
* post
* vhea
* vmtx

The following five 'sfnt' tables are not shared, with the number of instances indicated in parenthese:

**Table** | **Instances**
--- | ---
GSUB | 6
OS/2 | 2
cmap | 6
head | 6
name | 6

The third Variable Font Collection includes all 12 Variable Fonts, and other than doubling the number of the 'sfnt' tables that are not shared, the only difference is that there are two 'CFF2' tables:

* *SourceHanVFProto.ttc*

## How The Fonts Were Built

The 12 source Variable Fonts were built by compiling *ttx*-style XML files.

## Building the Fonts from Source

### Requirements

To build the Variable Font Collections from their Variable Font sources, you need to have installed the [Adobe Font Development Kit for OpenType](https://github.com/adobe-type-tools/afdko/) (AFDKO). The AFDKO tools are widely used for font development today, and are part of most font editor applications.

### Building the fonts

In this repository, all necessary files are included in the "OTF" directory for building the Variable Font Collections, and the *build-otc.sh* file provides the command lines that are used.

## Getting Involved

Send suggestions for changes to the Variable Font Collection Test project maintainer, [Dr. Ken Lunde](mailto:lunde@adobe.com?subject=[GitHub]%20Variable%20Font%20Collection%20Test), for consideration.
Binary file added SourceHanSansVFProto.ttc
Binary file not shown.
Binary file added SourceHanSerifVFProto.ttc
Binary file not shown.
Binary file added SourceHanVFProto.ttc
Binary file not shown.
5 changes: 5 additions & 0 deletions build-otc.sh
@@ -0,0 +1,5 @@
otf2otc -o SourceHanSansVFProto.ttc SourceHanSansVFProtoJP.otf SourceHanSansVFProtoKR.otf SourceHanSansVFProtoCN.otf SourceHanSansVFProtoTW.otf SourceHanSansVFProtoHK.otf SourceHanSansVFProtoMO.otf

otf2otc -o SourceHanSerifVFProto.ttc SourceHanSerifVFProtoJP.otf SourceHanSerifVFProtoKR.otf SourceHanSerifVFProtoCN.otf SourceHanSerifVFProtoTW.otf SourceHanSerifVFProtoHK.otf SourceHanSerifVFProtoMO.otf

otf2otc -o SourceHanVFProto.ttc SourceHanSansVFProtoJP.otf SourceHanSansVFProtoKR.otf SourceHanSansVFProtoCN.otf SourceHanSansVFProtoTW.otf SourceHanSansVFProtoHK.otf SourceHanSansVFProtoMO.otf SourceHanSerifVFProtoJP.otf SourceHanSerifVFProtoKR.otf SourceHanSerifVFProtoCN.otf SourceHanSerifVFProtoTW.otf SourceHanSerifVFProtoHK.otf SourceHanSerifVFProtoMO.otf

0 comments on commit 403fec1

Please sign in to comment.