Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[autohint, stemhist, requirements, tests, setup] updates related to psautohint #1175

Merged
merged 8 commits into from
Jun 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 11 additions & 4 deletions docs/AFDKO-Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ The tools fall into several different functional groups.

## 2.1 Making/editing fonts

### `autohint`/`psautohint`
### `psautohint`

This program is the Adobe auto-hinter and lives in [its own project repo](https://github.com/adobe-type-tools/psautohint). It is used by several AFDKO tools and is installed automatically via AFDKO's project requirements.

This program is the Adobe auto-hinter. It can be applied to both OpenType/CFF and Type 1 fonts. Works with Type 1 and OpenType/CFF fonts only. It uses Just van Rossum's [`fontTools`](https://github.com/fonttools/fonttools) Python package for accessing and changing the font data.
It can be applied to both OpenType/CFF and Type 1 fonts. Works with Type 1 and OpenType/CFF fonts only.

### `makeotf`

Expand Down Expand Up @@ -61,9 +63,14 @@ This tool will rotate and translate glyphs in a font, including the hints. Howev

This allows you to cut and paste the entire binary block of a font table from one font to another. You do this by first using it on a source font with the `-x` option to copy a table from the source font to a separate file, and then using it with the `-a` option to add that table to a target font. It can also be used to simply delete a table, and to fix the font table checksums.

### `stemhist`/`psstemhist`
### `psstemhist`

This program provides reports which help in selecting the global hint data and alignment zones for Type 1 hinting. You should look at the reports from this tool in order to select the most common stem widths, and then use a program such as FontLab or RoboFont to set the values in the font. This should be done before hinting the font. Works with Type 1 and OpenType/CFF fonts only.
This program is actually the same tool as `psautohint` but with a different
face. It provides reports which help in selecting the global hint data and
alignment zones for Type 1 hinting. You should look at the reports from this
tool in order to select the most common stem widths, and then use a program such
as FontLab or RoboFont to set the values in the font. This should be done before
hinting the font. Works with Type 1 and OpenType/CFF fonts only.

### `ttfcomponentizer`

Expand Down
23 changes: 0 additions & 23 deletions python/afdko/autohint.py

This file was deleted.

11 changes: 6 additions & 5 deletions python/afdko/convertfonttocid.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
convertfonttocid.py. v 1.13.1 Jul 12 2019

Convert a Type 1 font to CID, given multiple hint dict defs in the
"fontinfo" file. See autohint help, with the "-hfd" option, or the makeotf
user guide for details on this format. The output file produced by
convertFontToCID() is a CID Type 1 font, no matter what the input is.
"fontinfo" file. See psautohint help, with the "--doc-fddict" option,
or the makeotf user guide for details on this format. The output file
produced by convertFontToCID() is a CID Type 1 font, no matter what
the input is.

PROCEDURE:
1. convertFontToCID()
Expand Down Expand Up @@ -507,11 +508,11 @@ def parseFontInfoFile(fontDictList, fontInfoData, glyphList, maxY, minY,
# e.g outside of the Font BBox. We do this because if there are
# glyphs which are not assigned to a user specified font dict,
# it is because it doesn't make sense to provide alignment zones
# for the glyph. Since autohint does require at least one bottom zone
# for the glyph. Since psautohint does require at least one bottom zone
# and one top zone, we add one bottom and one top zone that are
# outside the font BBox, so that hinting won't be affected by them.
# NOTE: The FDDict receives a special name "No Alignment Zones" which
# autohint recognizes.
# psautohint recognizes.
defaultFDDict = fontDictList[0]

for key in kBlueValueKeys + kOtherBlueValueKeys:
Expand Down
23 changes: 0 additions & 23 deletions python/afdko/stemhist.py

This file was deleted.

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ defcon[pens,lxml]==0.7.2
fontMath==0.6.0
fontTools[ufo,unicode,lxml,woff]==4.12.1
mutatorMath==3.0.1
psautohint==2.0.1
psautohint==2.1.0
ufonormalizer==0.4.1
ufoProcessor==1.9.0
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ def _get_scripts():

def _get_console_scripts():
script_entries = [
('autohint', 'autohint:main'),
('buildcff2vf', 'buildcff2vf:main'),
('buildmasterotfs', 'buildmasterotfs:main'),
('comparefamily', 'comparefamily:main'),
Expand All @@ -156,7 +155,6 @@ def _get_console_scripts():
('otc2otf', 'otc2otf:main'),
('otf2otc', 'otf2otc:main'),
('otf2ttf', 'otf2ttf:main'),
('stemhist', 'stemhist:main'),
('ttfcomponentizer', 'ttfcomponentizer:main'),
('ttfdecomponentizer', 'ttfdecomponentizer:main'),
('ttxn', 'ttxn:main'),
Expand Down
66 changes: 0 additions & 66 deletions tests/autohint_data/expected_output/bug629.pfa

This file was deleted.

Binary file removed tests/autohint_data/expected_output/cidfont.ps
Binary file not shown.
Loading