summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Andersson <rasmus@notion.se>2017-08-22 20:23:13 +0300
committerRasmus Andersson <rasmus@notion.se>2017-08-22 20:28:57 +0300
commit797757bde2e305e035bcba65a93993ecd0716398 (patch)
treeeeac6c7d62e6ea953a98d7d310fd07e93dd310a2
parentf89b420bc07ce7a1e9b4aae47afbd16901c46edd (diff)
downloadinter-797757bde2e305e035bcba65a93993ecd0716398.tar.xz
adds CONTRIBUTING.md and license info for fallback glyph contours in src
-rw-r--r--CONTRIBUTING.md244
-rw-r--r--README.md142
-rw-r--r--src/LICENSE for some glyph outlines.txt211
3 files changed, 458 insertions, 139 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 000000000..b10983f28
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,244 @@
+# Contributing to the Interface font project
+
+First off, thank you for considering contributing to Interface.
+It's people like you that make the Internet such a great place.
+
+Following these guidelines helps to communicate that you respect the time of
+the people managing and developing this open source project.
+In return, they should reciprocate that respect in addressing your issue or
+suggestion.
+
+By contributing work to the Interface font project you agree to have all work
+contributed becoming the intellectual property of the Interface font project as
+described by [SIL Open Font License, Version 1.1](http://scripts.sil.org/OFL)
+
+
+## Types of contributions this project is looking for
+
+Interface is still an early product and so there is a lot of fun things to do.
+
+- More glyphs! There are many placeholder glyphs that need to be replaced with
+ ones designed in the style of Interface.
+ - Non-English glyphs are especially needed
+
+- Improvements and corrections to existing glyphs
+
+- Kerning, kerning, kerning — there are so many pairs and pairs-in-words that
+ need to be kerned, or have their kerning improved. When adding kerning, try
+ to use `@GROUPS` (groups.plist in the UFO source directories.)
+
+- A thin "master" font that can additionally be used to derive interpolated
+ weights in between "regular" and "thin." This is a very large project and
+ should probably be done in a branch over a longer period of time, rather than
+ as one huge contribution/pull request.
+
+
+### Master fonts and interpolated derivatives
+
+This project uses "master fonts", or "key fonts" which are combined using
+some clever math to generate other fonts that is a "mix" of two "masters."
+Because of this, there are some **very important rules** you must stick to:
+
+- When adding or removing a glyph, you _must_ add or remove the same glyph in
+ all master fonts.
+- When modifying a glyph's contours, the corresponding glyphs in all masters must:
+ - Have the same amount of contours (aka "shapes")
+ - Have the same amount of points in roughly the same locations
+ - Each point must have the same amount and kind of handles
+ - Each contour's winding direction must match
+
+Unless these rules are followed, generated weights will fail to build.
+If you are uncertain, simply try building a generated weight like "Medium" — the
+build system will tell you when a glyph fails to "mix" with an error message.
+
+To make life a little easier when working on glyphs, the build system will not stop
+if there's a glyph-mixing error, but instead just pick a glyph from one of the
+master weights and continue. For this reason you need to look at the output from
+the build system and watch out for "mix glyph" error messages.
+
+
+### Generated glyphs
+
+Many glyphs which are based on basic latin characters are generated by composing
+other glyphs. These are defined in `src/diacritics.txt` where each line of the
+file defines one "composition" that names a base glyph followed by the name of
+one or more additional glyphs, followed by anchor names which are used for alignment.
+
+For example `Ά` U+0386 "GREEK CAPITAL LETTER ALPHA WITH TONOS" is composed from
+`A` and `tonos`, aligned on the "tonos" anchor.
+It's defined like this in `src/diacritics.txt`:
+
+```
+A+tonos:tonos=Alphatonos
+```
+
+"Alphatonos" is a glyph name defined in `src/glyphlist.txt` which maps names to
+Unicode code points.
+
+When you see a name starting with "uni" followed by some hexadecimal digits, that
+means no symbolic name has been assigned to that glyph, but it maps to a Unicode
+code point. For instance:
+
+```
+E+grave:top=uni0400
+```
+
+Creates Composes `Ѐ` U+0400 "CYRILLIC CAPITAL LETTER IE WITH GRAVE"
+from "E" and "grave" aligned on the "top" anchor.
+
+If we were to introduce a glyph named `uni0400` into the UFO source file, that
+glyph would be used instead of the composition when a font is built. This allows
+us to define a "baseline" of glyph compositions in `src/diacritics.txt` and then
+progressively introduce specially-designed glyphs on a per font basis.
+
+When doing this, you still have to be careful about the [master interpolation rules](#master-fonts-and-interpolated-derivatives).
+
+
+### `src/fontbuild.cfg`
+
+`src/fontbuild.cfg` defines a lot of things that directs the font build system.
+
+- What glyphs to decompose (flatten; remove components)
+- What glyphs should have a lesser italic angle when generating italic fonts
+- What glyphs shouldn't be italicized at all when generating italic fonts
+- What glyphs should be _excluded_ (or "removed") from resulting font files
+ (some glyphs are only used as components and don't correspond to an actual
+ glyph in the end-result font file.)
+- Other information, like version, author, build system cache directory, etc.
+
+
+## Building
+
+Prerequisites:
+
+- Python 2.7 with pip (you get pip with `brew install python`)
+- [virtualenv](https://virtualenv.pypa.io/)
+
+```
+$ ./init.sh
+```
+
+This will generate makefile support, dependencies required by the toolchain, etc.
+At the end, the script prints instructions for how to activate `virtualenv`.
+As a convenience, you can also source init.sh to activate virtualenv.
+
+We can now run `make` to build all font files:
+
+```
+$ make
+```
+
+Or just specific styles:
+
+```
+$ make Regular BoldItalic
+```
+
+Or all fonts but only TrueType format (no web file formats):
+
+```
+$ make all_ttf
+```
+
+Or just specific styles and formats:
+
+```
+# Regular in all formats, BoldItalic in only TrueType format
+$ make Regular BoldItalic_ttf
+```
+
+You can also specify specific style + file format to `make` through `build/Interface-STYLE.FORMAT`.
+E.g.
+
+- `make build/Interface-MediumItalic.eot`
+- `make build/Interface-Bold.woff2`
+- `make build/Interface-Regular.ttf`
+- `...`
+
+All resulting font files are written to the `build` directory with `Interface-` as the filename prefix.
+
+Note: Making all files takes a considerable amount of time.
+It's a CPU and I/O intensive task to compile the fonts and so the build system has been setup to
+be able to run many jobs in parallel. Therefore it's recommended to pass the [`-j` flag to make](https://www.gnu.org/software/make/manual/html_node/Parallel.html) and
+optionally pipe the fairly verbose output to /dev/null, e.g. `make -j 8 >/dev/null`.
+
+
+### Editing
+
+This font is stored and authored in the [Unified Font Object (UFO)](http://unifiedfontobject.org/) file format and can be edited by many different software, some free. However, it's only been "tested" with [RoboFont](http://robofont.com/) which is a popular commercial font editor. There's a 30 day fully-functional free trial version of the app, so you can use it for smaller contributions without needing to buy a RoboFont license.
+
+To make life easier for you, configure RoboFont's settings like this:
+
+- Set the grid to 128 units. This means that each grid square equals one pixel at 2x scale.
+- Set "Snap points to" to a reasonably high number that's a power-of-two, like 8.
+- Set "SHIFT increment" to 16
+- Set "CMD SHIFT increment" to 128
+
+When you've made an edit, simply save your changes and run make:
+
+```
+$ make
+```
+
+*For quick turnaround, consider:*
+
+- Build and test only the "Regular" style.
+- Use `misc/notify` to get desktop notifications on builds so that you don't have to sit and wait looking at the terminal while it's building.
+
+E.g. `misc/notify make Regular`
+
+See ["Building"](#Building) for more details.
+
+
+### Preview & debug
+
+This project comes with a simple web-based application for debugging and
+previewing the font. It's a very useful tool to have when working on the font.
+
+- Comes with a large body of sample text data (which is also editable.)
+- Provides samples of the most common latin-script pairs, useful for kerning.
+- Provides samples of words ordered by commonality in latin scripts with a
+ preference for English (accessible via common-pair samples.)
+- Can show the complete repertoire of the fonts, with correct glyph order and
+ even RoboFont color labels ("marks").
+- Controls for basic font properties like family, weight, italic, size,
+ line-height, letter-spacing, etc.
+- Controls for a lot of font features like ligature sets, contextual alternates,
+ alternate numerics, etc.
+- Controls for web-browser text features like `capitalize`, `uppercase`,
+ `lowercase`, etc.
+- Ability to compare Interface side-by-side with other fonts.
+
+![Preview app screenshot](docs/res/preview-app.png)
+
+The following will start a local web server (which is only accessible from your local computer; not the internet) that serves the debug-and-preview app:
+
+```
+$ docs/serve.sh &
+```
+
+You can now visit `http://localhost:2015/lab/`.
+After you rebuild some font files, reload the web page to refresh fonts.
+
+
+## FAQ
+
+> Do I need RoboFont?
+
+No, you don't. To build font files, all you need is Python. To edit the font files, you need something that can edit UFO files (like [RoboFont](http://robofont.com/) or a text editor.)
+
+
+> `KeyError: 'Lj'` when building
+
+This probably means that you need to run `./init.sh` to setup the case-sensitive virtual file system mount that is needed by the font build system. Unfortunately the toolchain used (which is the same as for Roboto) requires not only a case-preserving file system, but also a case-sensitive one.
+
+
+> `ImportError: No module named robofab.objects.objectsRF`
+
+Python virtualenv not configured. Run `. init.sh`
+
+
+> `make: *** No rule to make target ...`
+
+Run `./init.sh` to update the generated makefile.
+
diff --git a/README.md b/README.md
index 8654874bb..6966a4df3 100644
--- a/README.md
+++ b/README.md
@@ -65,143 +65,7 @@ Translating between EM units and pixels:
There's a Figma workspace for glyphs, with configured metrics: ["Interface glyphs"](https://www.figma.com/file/RtScFU5NETY3j9E0yOmnW4gv/Interface-glyphs)
-## Contributing
+## See also
-By contributing work to the Interface font project you agree to have all work
-contributed becoming the intellectual property of the Interface font project as
-described by [SIL Open Font License, Version 1.1](http://scripts.sil.org/OFL)
-
-### Building
-
-Prerequisites:
-
-- Python 2.7 with pip (you get pip with `brew install python`)
-- [virtualenv](https://virtualenv.pypa.io/)
-
-```
-$ ./init.sh
-```
-
-This will generate makefile support, dependencies required by the toolchain, etc.
-At the end, the script prints instructions for how to activate `virtualenv`.
-As a convenience, you can also source init.sh to activate virtualenv.
-
-We can now run `make` to build all font files:
-
-```
-$ make
-```
-
-Or just specific styles:
-
-```
-$ make Regular BoldItalic
-```
-
-Or all fonts but only TrueType format (no web file formats):
-
-```
-$ make all_ttf
-```
-
-Or just specific styles and formats:
-
-```
-# Regular in all formats, BoldItalic in only TrueType format
-$ make Regular BoldItalic_ttf
-```
-
-You can also specify specific style + file format to `make` through `build/Interface-STYLE.FORMAT`.
-E.g.
-
-- `make build/Interface-MediumItalic.eot`
-- `make build/Interface-Bold.woff2`
-- `make build/Interface-Regular.ttf`
-- `...`
-
-All resulting font files are written to the `build` directory with `Interface-` as the filename prefix.
-
-Note: Making all files takes a considerable amount of time.
-It's a CPU and I/O intensive task to compile the fonts and so the build system has been setup to
-be able to run many jobs in parallel. Therefore it's recommended to pass the [`-j` flag to make](https://www.gnu.org/software/make/manual/html_node/Parallel.html) and
-optionally pipe the fairly verbose output to /dev/null, e.g. `make -j 8 >/dev/null`.
-
-
-### Editing
-
-This font is stored and authored in the [Unified Font Object (UFO)](http://unifiedfontobject.org/) file format and can be edited by many different software, some free. However, it's only been "tested" with [RoboFont](http://robofont.com/) which is a popular commercial font editor. There's a 30 day fully-functional free trial version of the app, so you can use it for smaller contributions without needing to buy a RoboFont license.
-
-To make life easier for you, configure RoboFont's settings like this:
-
-- Set the grid to 128 units. This means that each grid square equals one pixel at 2x scale.
-- Set "Snap points to" to a reasonably high number that's a power-of-two, like 8.
-- Set "SHIFT increment" to 16
-- Set "CMD SHIFT increment" to 128
-
-When you've made an edit, simply save your changes and run make:
-
-```
-$ make
-```
-
-*For quick turnaround, consider:*
-
-- Build and test only the "Regular" style.
-- Use `misc/notify` to get desktop notifications on builds so that you don't have to sit and wait looking at the terminal while it's building.
-
-E.g. `misc/notify make Regular`
-
-See ["Building"](#Building) for more details.
-
-
-### Preview & debug
-
-This project comes with a simple web-based application for debugging and
-previewing the font. It's a very useful tool to have when working on the font.
-
-- Comes with a large body of sample text data (which is also editable.)
-- Provides samples of the most common latin-script pairs, useful for kerning.
-- Provides samples of words ordered by commonality in latin scripts with a
- preference for English (accessible via common-pair samples.)
-- Can show the complete repertoire of the fonts, with correct glyph order and
- even RoboFont color labels ("marks").
-- Controls for basic font properties like family, weight, italic, size,
- line-height, letter-spacing, etc.
-- Controls for a lot of font features like ligature sets, contextual alternates,
- alternate numerics, etc.
-- Controls for web-browser text features like `captialize`, `uppercase`,
- `lowercase`, etc.
-- Ability to compare Interface side-by-side with other fonts.
-
-![Preview app screenshot](docs/res/preview-app.png)
-
-The following will start a local web server (which is only accessable from your local computer; not the internet) that serves the debug-and-preview app:
-
-```
-$ docs/serve.sh &
-```
-
-You can now visit `http://localhost:2015/lab/`.
-After you rebuild some font files, reload the web page to refresh fonts.
-
-
-## FAQ
-
-> Do I need RoboFont?
-
-No, you don't. To build font files, all you need is Python. To edit the font files, you need something that can edit UFO files (like [RoboFont](http://robofont.com/) or a text editor.)
-
-
-> `KeyError: 'Lj'` when building
-
-This probably means that you need to run `./init.sh` to setup the case-sensitive virtual file system mount that is needed by the font build system. Unfortunately the toolchain used (which is the same as for Roboto) requires not only a case-preserving file system, but also a case-sensitive one.
-
-
-> `ImportError: No module named robofab.objects.objectsRF`
-
-Python virtualenv not configured. Run `. init.sh`
-
-
-> `make: *** No rule to make target ...`
-
-Run `./init.sh` to update the generated makefile.
+- [Contributing](CONTRIBUTING.md)
+- [SIL Open Font License](LICENSE.txt)
diff --git a/src/LICENSE for some glyph outlines.txt b/src/LICENSE for some glyph outlines.txt
new file mode 100644
index 000000000..ddb93de3a
--- /dev/null
+++ b/src/LICENSE for some glyph outlines.txt
@@ -0,0 +1,211 @@
+
+Some glyph outlines comes from the Roboto project, acting as fillers for glyphs
+that have not yet been drawn.
+
+
+These glyphs therefore falls under Roboto's Apache 2 license which is as follows:
+
+
+ Roboto Copyright (c) Google Inc. https://github.com/google/roboto
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.