Skip to content

Commit 5146c18

Browse files
committed
Merge branch 'release'
2 parents 368f05a + c5ea97a commit 5146c18

File tree

2,818 files changed

+21084
-130084
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,818 files changed

+21084
-130084
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## Description
2+
3+
Replace this text with a description of your changes, indicating whether
4+
it is a bug fix, enhancement, etc. and which general area(s) are affected
5+
(documentation, specific tool, group of tools, tests, etc.).
6+
7+
If the contribution closes (fixes, resolves) a specific open
8+
[issue](https://github.com/adobe-type-tools/afdko/issues), please [link
9+
the issue](https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword).
10+
11+
## Checklist:
12+
13+
- [ ] I have followed the [Contribution Guidelines](https://github.com/adobe-type-tools/afdko/blob/develop/CONTRIBUTING.md)
14+
- [ ] I have added **test code and data** to prove that my code functions correctly
15+
- [ ] I have verified that new and existing tests pass locally with my changes
16+
- [ ] I have performed a self-review of my own code
17+
- [ ] I have commented my code, particularly in hard-to-understand areas
18+
- [ ] I have made corresponding changes to the documentation

.github/workflows/asan.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Test with ASAN
2+
3+
on:
4+
repository_dispatch:
5+
types: asan-manual-trigger
6+
7+
jobs:
8+
run_asan:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v1
13+
with:
14+
submodules: true
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v1
18+
with:
19+
python-version: 3.7
20+
21+
- name: Install multilib packages
22+
run: sudo apt-get install gcc-multilib g++-multilib
23+
24+
- name: Set ASAN-related environment variables
25+
run: echo '::set-env name=XFLAGS::-Og -g -fsanitize=address -fno-omit-frame-pointer'
26+
27+
- name: Install AFDKO and dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install -r requirements.txt -r requirements-dev.txt .
31+
pip freeze --all
32+
33+
- name: Run tests
34+
run: pytest tests

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,6 @@ xcuserdata/
4444
**/visualstudio/Debug/*
4545
**/visualstudio/Release/*
4646
**/visualstudio/x64/*
47+
48+
# temp output dirs created during tests
49+
**/temp_output

CODE_OF_CONDUCT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Adobe Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ Following are some guidelines and information about contributing, mostly so you
1111

1212
## How to contribute
1313

14+
### Code of Conduct
15+
Please review our [Code of Conduct](./CODE_OF_CONDUCT.md)
16+
statement which explains standards and responsibilities for all contributors and
17+
project maintainers.
18+
1419
### Suggested areas
1520
If you'd like to contribute but are not sure where or how, here are some suggestions to get started:
1621
- Fix [active LGTM alerts](https://lgtm.com/projects/g/adobe-type-tools/afdko/alerts/?mode=list). Many of these are simple fixes and working through them is a great way to get familiar with the codebase.
@@ -24,7 +29,19 @@ First, **please check to see if [someone has already raised a similar question o
2429
You can also ask questions on the [AFDKO room in Gitter](https://gitter.im/adobe-type-tools/afdko) which is monitored by the AFDKO maintainers.
2530

2631
### Code Style
27-
Please see the [Code Style wiki page](https://github.com/adobe-type-tools/afdko/wiki/Code-Style) for guidelines. Note that automated processes will run `cpplint` on C/C++ code and `flake8` on Python code.
32+
Please see the [Code Style wiki
33+
page](https://github.com/adobe-type-tools/afdko/wiki/Code-Style) for guidelines.
34+
Note that automated processes will run `cpplint` on C/C++ code and `flake8` on
35+
Python code.
36+
37+
### Testing, test code, and test data
38+
Contributions that add new functionality or substantially change existing
39+
functionality _must_ include test code and data that demonstrates that the
40+
contributed code functions as intended. But fonts and their interactions with
41+
systems and applications can be complicated, so simple tests aren't always
42+
sufficient. We encourage you to test your code on real fonts with tools,
43+
utilities, and applications outside of the AFDKO to ensure that your
44+
contribution produces font files that function correctly in real-world scenarios.
2845

2946
### Branches and Pull Requests
3047
All contributions are handled through the GitHub Pull Request process. You may do this directly via a branch of AFDKO's `develop` branch or via a fork of AFDKO.
@@ -33,8 +50,8 @@ In either case, submitting a Pull Request triggers a number of automated actions
3350

3451
If you are contributing code, you should run the test suite locally and ensure that all tests pass. If you are contributing _a lot of code_ or introducing major changes, it is *essential* that you also add test cases to the test suite to ensure that your code is getting tested (review the contents of the [`tests`](./tests/) folder to get an idea of how to write tests). 100% coverage is not required, but you should add tests that demonstrate that new features/major changes are actually working as intended (and don't break existing tests). If you are contributing Python code, please pass it through [`flake8`](http://flake8.pycqa.org/en/latest/). If you are contributing C/C++ code, check with [`cpplint`](https://github.com/cpplint/cpplint).
3552

36-
### Automated testing
37-
There are two main triggers for running automated tests:
53+
### Automation
54+
There are two main triggers for running automated tests for AFDKO:
3855
1. When any commit to _any_ branch is pushed to the main AFDKO repository
3956
2. When a Pull Request is submitted
4057

NEWS.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,67 @@
11
Changelog
22
=========
33

4+
3.5.0 (released 2020-07-16)
5+
----------------------
6+
- [docs] fix broken links, add new links, fix typos, add templates
7+
([#1140](https://github.com/adobe-type-tools/afdko/pull/1140),
8+
[#1151](https://github.com/adobe-type-tools/afdko/pull/1151),
9+
[#1176](https://github.com/adobe-type-tools/afdko/pull/1176))
10+
- [tx] many fixes related to uninitialized variables, buffer/stack overflows,
11+
etc. Thanks to @antlarr-suse and internal contributors for chasing these down and fixing!
12+
([#1141](https://github.com/adobe-type-tools/afdko/pull/1141),
13+
[#1180](https://github.com/adobe-type-tools/afdko/pull/1180),
14+
[#1182](https://github.com/adobe-type-tools/afdko/pull/1182),
15+
[#1187](https://github.com/adobe-type-tools/afdko/pull/1187),
16+
[#1188](https://github.com/adobe-type-tools/afdko/pull/1188))
17+
- [makeotf] Drop Multiple Master in OpenType support (thanks @khaledhosny!)
18+
([#995](https://github.com/adobe-type-tools/afdko/issues/995),
19+
[#1144](https://github.com/adobe-type-tools/afdko/pull/1144))
20+
- [checkoutlinesufo] Improve overlap removal
21+
([#790](https://github.com/adobe-type-tools/afdko/issues/790),
22+
[#1146](https://github.com/adobe-type-tools/afdko/pull/1146),
23+
[#1170](https://github.com/adobe-type-tools/afdko/pull/1170))
24+
- [fontsetplot, ttfdecomponentizer] Fix proofing issues
25+
([#1125](https://github.com/adobe-type-tools/afdko/issues/1125),
26+
[#1148](https://github.com/adobe-type-tools/afdko/pull/1148))
27+
- [requirements] remove dependency on standalone cu2qu (integrated into
28+
fontTools 4.7.0)
29+
([#1150](https://github.com/adobe-type-tools/afdko/pull/1150))
30+
- [makeinstancesufo] fix `use-varlib` flag, check for extrapolation/warn when
31+
using varLib
32+
([#1152](https://github.com/adobe-type-tools/afdko/issues/1152),
33+
[#1155](https://github.com/adobe-type-tools/afdko/pull/1155))
34+
- [makeotf] update a misleading comment regarding how CodePageRange bits are set
35+
([#1156](https://github.com/adobe-type-tools/afdko/issues/1156),
36+
[#1157](https://github.com/adobe-type-tools/afdko/pull/1157))
37+
- [sfntedit, sfntdiff] fix failures with long file/pathnames
38+
([#1139](https://github.com/adobe-type-tools/afdko/issues/1139),
39+
[#1159](https://github.com/adobe-type-tools/afdko/pull/1159))
40+
- [tx] don't write FontMatrix in CFF2 FontDict
41+
([cffsubr #13](https://github.com/adobe-type-tools/cffsubr/issues/13),
42+
[#1165](https://github.com/adobe-type-tools/afdko/pull/1165))
43+
- [makeotf, makeotfexe] STAT table updates and improvements
44+
([#1164](https://github.com/adobe-type-tools/afdko/issues/1164),
45+
[#1166](https://github.com/adobe-type-tools/afdko/pull/1166),
46+
[#1174](https://github.com/adobe-type-tools/afdko/pull/1174),
47+
[#1177](https://github.com/adobe-type-tools/afdko/issues/1177),
48+
[#1178](https://github.com/adobe-type-tools/afdko/issues/1178),
49+
[#1179](https://github.com/adobe-type-tools/afdko/pull/1179))
50+
- [makeotf] Check for PostScript name in FontMenuNameDB
51+
([#1171](https://github.com/adobe-type-tools/afdko/issues/1171),
52+
[#1172](https://github.com/adobe-type-tools/afdko/pull/1172))
53+
- [autohint, stemhist] **REMOVED FROM AFDKO** (use psautohint/psstemhist)
54+
([#826](https://github.com/adobe-type-tools/afdko/issues/826),
55+
[#827](https://github.com/adobe-type-tools/afdko/issues/827),
56+
[#1175](https://github.com/adobe-type-tools/afdko/pull/1175))
57+
- [makeotfexe] fix stack buffer overflow and use-after-free issues
58+
([#1183](https://github.com/adobe-type-tools/afdko/pull/1183),
59+
[#1184](https://github.com/adobe-type-tools/afdko/pull/1184))
60+
- [mergefonts] fix stack buffer overflow issue
61+
([#1185](https://github.com/adobe-type-tools/afdko/pull/1185))
62+
- [spot] fix heap buffer overflow issue
63+
([#1186](https://github.com/adobe-type-tools/afdko/pull/1186))
64+
465
3.4.0 (released 2020-05-26)
566
---------------------------
667
- [makeotf] STAT table support (thanks @khaledhosny!)

c/makeotf/makeotf_lib/api/hotconv.h

Lines changed: 3 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This software is licensed as OpenSource, under the Apache License, Version 2.0.
1212
extern "C" {
1313
#endif
1414

15-
#define HOT_VERSION 0x010072 /* Library version (1.0.114) */
15+
#define HOT_VERSION 0x010073 /* Library version (1.0.115) */
1616
/* Major, minor, build = (HOT_VERSION >> 16) & 0xff, (HOT_VERSION >> 8) & 0xff, HOT_VERSION & 0xff) */
1717
/* Warning: this string is now part of heuristic used by CoolType to identify the
1818
first round of CoolType fonts which had the backtrack sequence of a chaining
@@ -84,23 +84,6 @@ inside the (1,0,0) nameID 5 "Version: string. */
8484
hotConvert(ctx);
8585
hotFree(ctx);
8686
87-
Additional information required by multiple master fonts is added by calls
88-
to hotAddAxisData(), hotAddStyleData(), and hotAddInstance(). Thus, a
89-
multiple master conversion follows the following call sequence.
90-
91-
ctx = hotNew(...);
92-
hotSetConvertFlags(ctx, hotConvFlags) // set flags before any hot unctions are called.
93-
FontName = hotReadFont(ctx, ...);
94-
hotAddName(ctx, ...); // repeat for each name
95-
hotAddMiscData(ctx, ...);
96-
hotAddAxisData(ctx, ...); // repeat for each axis
97-
hotAddStyleData(ctx, ...); // repeat for each style
98-
hotAddInstance(ctx, ...); // repeat for each instance
99-
hotAddKernPair(ctx, ...); // repeat for each pair
100-
hotAddKernValue(ctx, ...); // repeat for each value for each master
101-
hotConvert(ctx);
102-
hotFree(ctx);
103-
10487
CJK fonts must specify horizontal and (optional) vertical Unicode
10588
information, as well as Macintosh encoding information. This is introduced
10689
by calls to hotAddCMap(). Thus, a CJK conversion has the following call
@@ -425,7 +408,6 @@ struct hotReadFontOverrides_ /* Record for instructions to modify font
425408
enum /* Font types */
426409
{
427410
hotSingleMaster,
428-
hotMultipleMaster,
429411
hotCID
430412
};
431413
#define HOT_TYPE_MASK 0x0f /* Type returned in low 4 bits */
@@ -492,8 +474,6 @@ struct hotCommonData_ /* Miscellaneous data record */
492474
#define HOT_EURO_ADDED (1 << 8) /* Flags Euro glyph added to CFF data */
493475
char *clientVers;
494476
long nKernPairs;
495-
short nStyles;
496-
short nInstances;
497477
hotEncoding *encoding;
498478
short fsSelectionMask_on;
499479
short fsSelectionMask_off;
@@ -510,14 +490,6 @@ struct hotCommonData_ /* Miscellaneous data record */
510490
The nKernPairs field specifies the number of kerning pairs to be
511491
subsequently added with hotAddKernPair().
512492
513-
The nStyles field specifies the number of styles to be subsequently
514-
described with hotAddStyleData() and should be set to 0 for non-multiple
515-
master fonts.
516-
517-
The nInstances field specifies the number of instances to be subsequently
518-
added with hotAddInstance() and should be set to 0 for non-multiple master
519-
fonts.
520-
521493
The encoding field, along with hotMacData.encoding described below,
522494
specifies the encoding that the library should use to decode kern pairs
523495
added by hotAddKernPair(). If both fields are set to NULL, the library will
@@ -619,12 +591,10 @@ void hotAddKernPair(hotCtx g, long iPair, unsigned first, unsigned second);
619591
hotCommonData. (Unencoded character names are provided by calls to
620592
hotAddUnencChar().) */
621593

622-
void hotAddKernValue(hotCtx g, long iPair, int iMaster, short value);
594+
void hotAddKernValue(hotCtx g, long iPair, short value);
623595

624596
/* hotAddKernValue() adds a kerning value to the kerning pair specified by the
625-
iPair argument for the master specified by the iMaster argument which
626-
must have the value 0 for a single master font or in the range: 0 <= iMaster
627-
< nMasters for multiple master fonts. */
597+
iPair argument. */
628598

629599
void hotAddUnencChar(hotCtx g, int iChar, char *name);
630600

@@ -635,38 +605,6 @@ void hotAddUnencChar(hotCtx g, int iChar, char *name);
635605
glyphs of a kern pair with a name when one or both glyphs are unencoded.
636606
This name is subsequently converted into a glyph id by the library. */
637607

638-
typedef int32_t hotFixed; /* 16.16 fixed point */
639-
void hotAddAxisData(hotCtx g, int iAxis,
640-
char *type, char *longLabel, char *shortLabel,
641-
hotFixed minRange, hotFixed maxRange);
642-
643-
/* hotAddAxisData() adds information to an OTF font for the axis selected by
644-
the iAxis argument which must be in the range: 0 <= iAxis < nAxes. The type
645-
argument specifies the kind of axis as one of: "Weight", "Width",
646-
"OpticalSize", or "Serif". The "longLabel" and "shortLabel" arguments
647-
specify long and short name tags to be used in construction menu and font
648-
names, e.g. "Weight" and " wt ". */
649-
650-
void hotAddStyleData(hotCtx g, int iStyle, int iAxis, char *type,
651-
hotFixed point0, hotFixed delta0,
652-
hotFixed point1, hotFixed delta1);
653-
654-
/* hotAddStyleData() adds style information to an OTF font for the axis
655-
selected by the iAxis argument. The type argument specifies the style type
656-
as one of: "Bold", "Italic", "Condensed", and "Extended". The point
657-
arguments specify a coordinate on the axis and the "delta" arguments specify
658-
the coordinate change from that point to a new coordinate that represents
659-
the applied style. */
660-
661-
void hotAddInstance(hotCtx g, int iInstance, char *suffix);
662-
663-
/* hotAddInstance() adds instance information to an OTF font for the instance
664-
selected by the "iInstance" argument which must be in the range: 0 <=
665-
iInstance < nInstances. iInstance 0 must specify the default instance; other
666-
instances may be added in any order. The "suffix" argument specifies an name
667-
that may be concatenated with the 5-3-3 FontName to create an instance
668-
FontName, e.g. "367 RG 465 CN 11 OP". */
669-
670608
typedef char *(*hotCMapId)(void *ctx);
671609
typedef char *(*hotCMapRefill)(void *ctx, long *count);
672610
void hotAddCMap(hotCtx g, hotCMapId id, hotCMapRefill refill);

c/makeotf/makeotf_lib/build/cffread/linux/debug/Makefile

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)