Skip to content

Commit

Permalink
Started Typefacet Autokern; added references.md.
Browse files Browse the repository at this point in the history
  • Loading branch information
n8willis committed Apr 10, 2016
1 parent d16ac45 commit 252bbfb
Show file tree
Hide file tree
Showing 6 changed files with 212 additions and 34 deletions.
21 changes: 6 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,29 +49,20 @@ AutoSpace by Andres Torresi of Huerta Tipográfica is an add-on for the
Glyphs font editor. It has been demonstrated in several widely
shared online videos, but has not yet been formally released.

[Spacing Macro](http://www.impallari.com/projects/overview/spacing-macro) by Pablo
Impallari is a macro for FontLab. It is based on discussions
[http://typedrawers.com/discussion/52/spacing-macro] at the
TypeDrawers forum, and was initially inspired by Frank E. Blokland's LetterModel.
Pablo Impallari's [Spacing Macro](impallari.md) is a macro for FontLab. It was initially inspired by Frank E. Blokland's LetterModel.

[Kernagic](https://github.com/hodefoting/kernagic) by Øyvind Kolås is a
[Kernagic](kernagic.md) by Øyvind Kolås is a
standalone software tool that can automatically letterspace a UFO
font. It implements several different letterspacing approaches:
* LetterModel by Frank E. Blokland
* Snap Gap, which snaps "rhythm points" of glyphs to a desired grid
* Interactivos Average, a simple approach expressed in
https://gitorious.org/libregraphicsmag/interactivosbook .

Note that the Average method was dropped from later Kernagic releases,
as it did not produce results as satisfactory as the other methods.
It is mentioned here for the sake of completeness.
font. It implements several different letterspacing approaches

Kerning
-------

[Typefacet
Autokern](http://charlesmchen.github.io/typefacet/topics/autokern/index.html)
is a Python program using Robofab.
is a Python program by Charles M. Chen that can automatically adjust
side-bearings
of kerning pairs in a font based on a set of user-supplied general arguments.

[BubbleKern](https://github.com/Tosche/BubbleKern) is an add-on for the
Glyphs font editor.
Expand Down
7 changes: 7 additions & 0 deletions impallari.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Pablo Impallari's Spacing Macro
===============================
[Spacing Macro](http://www.impallari.com/projects/overview/spacing-macro) by Pablo
Impallari is a macro for FontLab. It is based on discussions
[http://typedrawers.com/discussion/52/spacing-macro] at the
TypeDrawers forum, and was initially inspired by Frank E. Blokland's LetterModel.

14 changes: 14 additions & 0 deletions kernagic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Kernagic
========

[Kernagic](https://github.com/hodefoting/kernagic) by Øyvind Kolås is a
standalone software tool that can automatically letterspace a UFO
font. It implements several different letterspacing approaches:
* LetterModel by Frank E. Blokland
* Snap Gap, which snaps "rhythm points" of glyphs to a desired grid
* Interactivos Average, a simple approach expressed in
https://gitorious.org/libregraphicsmag/interactivosbook .

Note that the Average method was dropped from later Kernagic releases,
as it did not produce results as satisfactory as the other methods.
It is mentioned here for the sake of completeness.
40 changes: 21 additions & 19 deletions kindersley.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,27 @@ photocell through the gradient masks is the equivalent of computing
the "first," "second," and "third" moments directly.




Kindersley's observations
-------------------------

Kindersley reported that using the quadratic gradient masks produced results
"close" to what was expected. He also made several other observations
along the way.

First, he noted that ascenders and descenders do not seem to contribute to the
location of the optical center (i.e., h and n have the same center, as
do v and y). Instead, the optical centering happens within the
x-height rectangle.

Second, he tested italic and slanted typefaces using the same method
as uprights, and determined that the gradient mask needed to be tilted
at the same angle as the italic in order to produce satisfactory
results.



Implementation talk
-------------------

Expand Down Expand Up @@ -199,25 +220,6 @@ era. More could surely be done with the computing resources available today.




Kindersley's observations
-------------------------

Kindersley reported that using the quadratic gradient masks produced results
"close" to what was expected. He also made several other observations
along the way.

First, he noted that ascenders and descenders do not seem to contribute to the
location of the optical center (i.e., h and n have the same center, as
do v and y). Instead, the optical centering happens within the
x-height rectangle.

Second, he tested italic and slanted typefaces using the same method
as uprights, and determined that the gradient mask needed to be tilted
at the same angle as the italic in order to produce satisfactory
results.


Limitations
-----------

Expand Down
53 changes: 53 additions & 0 deletions references.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Research papers and other references
====================================

"An escape from crowding", Jeremy Freeman, Denis J. Pelli. Journal of
Vision (2007) 7(2):22, 1–14.

"Crowding: a cortical constraint on object recognition", Denis
G. Pelli. Current Opinion in Neurobiology (2008), 18:445-451.

"Crowding and eccentricity determine reading rate", Denis G. Pelli,
Katharine A. Tillman, Jeremy Freeman, Michael Su, Tracey D. Berger,
Najib J. Majaj. Journal of Vision (2007) 7(2):20, 1-36.

"Crowding is unlike ordinary masking: Distinguishing feature
integration from detection", Denis G. Pelli, Melanie Palomares, Najib
J. Majaj. Journal of Vision (2004) 4, 1136-1169.

"Feature detection and letter identification", Denis G. Pelli,
Catherine W. Burns, Bart Farell, Deborah C. Moore-Page. Vision Research 46 (2006) 4646–4674.

"The golden ratio predicted: vision, cognition and locomotion as a
single design in nature", Adrian Bejan. International Journal of Design & Nature and Ecodynamics. Vol. 4, No. 2 (2009) 97–104.

"Gray-scale Hough transform for think line detection in gray-scale
images", Rong-Chin Lo, Wen-Hsiang Tsai. Pattern Recognition, Vol 28
Number 5 (1995), p 647-661.

"The lowest spatial frequency channel determines brightness
perception", A. Perna, M. C. Morrone. Vision Research 47 (2007) 1282–1291.

"Modeling the Shape of the Scene: A Holistic Representation
of the Spatial Envelope", Aude Oliva, Antonio Torralba. International Journal of Computer Vision 42(3), 145–175, 2001.

"Real-time line detection through an improved Hough transform
voting scheme", Leandro A.F. Fernandes, Manuel M. Oliveira. Pattern Recognition 41 (2008) 299 – 314.

"The role of spatial frequency channels in letter identification",
Najib J. Majaj, Denis G. Pelli, Peri Kurshan, Melanie Palomares. Vision Research 42 (2002) 1165–1184.

"Size Adaptation to Visual Texture and Print: Evidence for
Spatial-Frequency Analysis", S. M. Anstis. The American Journal of Psychology, Vol. 87, No. 1/2 (Mar. - Jun., 1974), pp. 261-267.

"Spatial-frequency and contrast properties of crowding", Susana
T.L. Chung, Dennis M. Levi, Gordon E. Legge. Vision Research 41
(2001) 1833-1850.

"Towards quantification of the effects of typographic variation on
readability", Robert A. Morris, Karl Berry, Kathryn
A. Hargreaves. 1993 SID Digest of Technical Papers, Special Session on
Text Quality. Society for Information Display 1993.

"Two Decades of Typographic Research at URW: A Retrospective", Peter
Karow. URW.
111 changes: 111 additions & 0 deletions typefacet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
TypeFacet Autokern
==================

Charles M. Chen's [Autokern](http://charlesmchen.github.io/typefacet/topics/autokern/index.html) is a command-line Python tool released as
part of Chen's *TypeFacet* software collection. It reads in UFO font
files and takes a set of user-supplied arguments, then outputs a
modified UFO file with adjusted side-bearings and, optionally, kerning
values.



Arguments
---------

### Basic operation

`--ufo-src-path` *foo.ufo* Sets the font file to be processed.

`--ufo-dst-path` *bar.ufo* Designates the name of the modified output
file to create.

`--log-path` *logs* Designates where output logs should be written.


### Common tunable settings

`--min-distance-ems` Sets a minimum allowable distance between the
contours of adjacent glyphs.

`--max-distance-ems` Sets the maximum distance allowed between any two glyphs.


`--intrusion-tolerance-ems` Sets the maximum amount to which glyphs can "intrude" into the spacing between them.

`--max-x-extrema-overlap-ems`

`--precision-ems` Sets the numeric precision to use for calculations.
Smaller values are more CPU intensive.


### Glyph selection

`--sample-texts`

`--kern-samples-only`

`--glyph-pairs-to-kern`

`--glyphs-to-kern`

`--glyphs-to-ignore`


### Additional tunable settings

`--do-not-modify-side-bearings` Tells Autokern to preserve the font's
original side bearings.

`--allow-negative-side-bearings` Tells Autokern to permit side
bearings to take on negative values.

`--kerning-threshold-ems` *N* Tells Autokern to discard any kerning
values less than N.

`--max-kerning-pairs` *N* Tells Autokern to only output the N largest
kerning values and discard the rest.

`--x-extrema-overlap-scaling`

`--tracking-ems` *N* (mentioned in the documentation as `--tracking`)
Tells Autokern to add a constant N value to all kerning values.

`--ignore-x-extrema-overlap-outside-ascender` Tells Autokern to
ignore x-extrema overlaps that occur below the baseline or above the
ascender.


### Glyph selection by category

`--glyph-categories-to-ignore`

`--max-x-extrema-overlap-ems-per-category`

`--max-distance-ems-per-category`

`--min-distance-ems-per-category`

`--intrusion-tolerance-ems-per-category`

`--tracking-ems-per-category`


### Additional logging options

`--log-basic-pairs` Tells Autokern to log the "basic" set of glyph
pairs, for use proofreading or troubleshooting.

`--write-kerning-pair-logs` Tells Autokern to log every kerning-pair combination.

`--disparity-log-count` Tells Autokern to log which kerning pairs were
changed by the greatest amount.



Usage
-----

Chen advises users to run the Autorkern tool several times, employing
a different subset of the arguments for each run. First, he suggests
running with `--min-distance-ems` and `--max-distance-ems` on a pair
of glyphs such as "Tt", "TT", or "rf".

0 comments on commit 252bbfb

Please sign in to comment.