Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelsousa committed Mar 8, 2019
2 parents a8bc391 + b2c7bf7 commit c8e2ae7
Show file tree
Hide file tree
Showing 314 changed files with 13,657 additions and 214 deletions.
44 changes: 8 additions & 36 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,42 +14,6 @@ matrix:
# Do not build feature branch with open Pull Requests
skip_branch_with_pr: true

# scripts that run after cloning repository
install:
- pip install flake8 cpplint

# scripts to run before build
before_build:
- flake8 setup.py
- flake8 tests\*.py
- flake8 python\afdko\buildcff2vf.py
- flake8 python\afdko\buildmasterotfs.py
- flake8 python\afdko\checkoutlinesufo.py
- flake8 python\afdko\convertfonttocid.py
- flake8 python\afdko\fdkutils.py
- flake8 python\afdko\makeinstancesufo.py
- flake8 python\afdko\makeotf.py
- flake8 python\afdko\otf2ttf.py
- flake8 python\afdko\otfpdf.py
- flake8 python\afdko\pdfmetrics.py
- flake8 python\afdko\ttfcomponentizer.py
- flake8 python\afdko\ttxn.py
- flake8 python\afdko\ufotools.py
- cpplint --recursive --quiet c\autohint
- cpplint --recursive --quiet c\detype1
- cpplint --recursive --quiet c\makeotf\makeotf_lib\source
- cpplint --recursive --quiet c\makeotf\makeotf_lib\api
- cpplint --recursive --quiet c\makeotf\makeotf_lib\resource
- cpplint --recursive --quiet c\makeotf\source
- cpplint --recursive --quiet c\mergefonts
- cpplint --recursive --quiet c\public
- cpplint --recursive --quiet c\rotatefont
- cpplint --recursive --quiet c\sfntdiff
- cpplint --recursive --quiet c\sfntedit
- cpplint --recursive --quiet c\spot
- cpplint --recursive --quiet c\tx
- cpplint --recursive --quiet c\type1

# to run your custom scripts instead of automatic MSBuild
build_script:
# our setup.py requires 'wheel', which may not be already installed
Expand Down Expand Up @@ -80,3 +44,11 @@ deploy:
prerelease: true
on:
appveyor_repo_tag: true

notifications:
- provider: Email
to:
- [email protected]
on_build_success: false
on_build_failure: true
on_build_status_changed: false
35 changes: 35 additions & 0 deletions .circleci/check_source_code.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

# activate virtual environment
source venv/bin/activate
# check source files
flake8 setup.py
flake8 tests/*.py
pushd python/afdko
flake8 buildcff2vf.py
flake8 buildmasterotfs.py
flake8 checkoutlinesufo.py
flake8 convertfonttocid.py
flake8 fdkutils.py
flake8 makeinstancesufo.py
flake8 makeotf.py
flake8 otf2ttf.py
flake8 otfpdf.py
flake8 pdfmetrics.py
flake8 ttfcomponentizer.py
flake8 ttxn.py
flake8 ufotools.py
popd
cpplint --recursive --quiet c/detype1
cpplint --recursive --quiet c/makeotf/makeotf_lib/source
cpplint --recursive --quiet c/makeotf/makeotf_lib/api
cpplint --recursive --quiet c/makeotf/makeotf_lib/resource
cpplint --recursive --quiet c/makeotf/source
cpplint --recursive --quiet c/mergefonts
cpplint --recursive --quiet c/public
cpplint --recursive --quiet c/rotatefont
cpplint --recursive --quiet c/sfntdiff
cpplint --recursive --quiet c/sfntedit
cpplint --recursive --quiet c/spot
cpplint --recursive --quiet c/tx
cpplint --recursive --quiet c/type1
41 changes: 41 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
version: 2.1

commands:
setup_venv:
description: Setup the virtual environment
steps:
- run: bash .circleci/setup_venv.sh

check_source_code:
description: Run flake8 and cpplint
steps:
- run: bash .circleci/check_source_code.sh

build_and_test:
description: Build wheel and run tests via cibuildwheel
steps:
- run:
command: |
source venv/bin/activate
cibuildwheel --output-dir wheelhouse
jobs:
linux-python3:
docker:
- image: circleci/python:3.6
environment:
CIBW_SKIP: cp27-* cp34-* cp35-* cp37-* *i686
CIBW_TEST_REQUIRES_LINUX: pytest subprocess32
CIBW_TEST_COMMAND_LINUX: cd {project} && pytest -v && pip uninstall --yes afdko
steps:
- checkout
- setup_remote_docker
- setup_venv
- check_source_code
- build_and_test

workflows:
version: 2.1
all-tests:
jobs:
- linux-python3
13 changes: 13 additions & 0 deletions .circleci/setup_venv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# create virtual environment
python -m venv venv
# activate virtual environment
source venv/bin/activate
# install and update dependencies
pip install -U -q pip setuptools wheel flake8 cpplint
pip install git+https://github.com/adobe-type-tools/cibuildwheel
# print versions
python --version
pip --version
pip list
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ before_script:
- flake8 ttxn.py
- flake8 ufotools.py
- popd
- cpplint --recursive --quiet c/autohint
- cpplint --recursive --quiet c/detype1
- cpplint --recursive --quiet c/makeotf/makeotf_lib/source
- cpplint --recursive --quiet c/makeotf/makeotf_lib/api
Expand Down Expand Up @@ -95,7 +94,5 @@ deploy:
tags: true

notifications:
slack: typekit:TRAVIS_SLACK_TOKEN
email:
on_success: change
on_failure: always
26 changes: 26 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
Changelog
=========

2.8.7 (released 2019-03-08)
---------------------------

- Fixed installation on Cygwin OS
([#748](https://github.com/adobe-type-tools/afdko/issues/748))
- [tx] Fixed blend overflow error
([#684](https://github.com/adobe-type-tools/afdko/issues/684))
- [tx] Fixed error in delta array calculation
([#758](https://github.com/adobe-type-tools/afdko/issues/758))
- [makeotfexe] Fixed detection of offset overflow to a feature parameter
([#746](https://github.com/adobe-type-tools/afdko/issues/746))
- [makeotf] Fixed duplicate warning messages coming from tx
([#751](https://github.com/adobe-type-tools/afdko/issues/751))
- [makeotf] Fixed error message when tool is ran without arguments
and default named files cannot be found
([#755](https://github.com/adobe-type-tools/afdko/issues/755))
- Updated AGD.txt
([#750](https://github.com/adobe-type-tools/afdko/issues/750))
- [makeinstancesufo] Fixed failure when `filename` attribute in
designspace's `<instance>` element has no leading folder path.
Fixed copying non-kerning groups.
([#753](https://github.com/adobe-type-tools/afdko/issues/753))
- [makeinstancesufo] Fixed anisotropic interpolation
([#756](https://github.com/adobe-type-tools/afdko/issues/756))


2.8.6 (released 2019-03-01)
---------------------------

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![Travis](https://travis-ci.org/adobe-type-tools/afdko.svg?branch=develop)](https://travis-ci.org/adobe-type-tools/afdko)
[![Appveyor](https://ci.appveyor.com/api/projects/status/qurx2si4x54b97mt/branch/develop?svg=true)](https://ci.appveyor.com/project/adobe-type-tools/afdko/branch/develop)
[![CircleCI](https://circleci.com/gh/adobe-type-tools/afdko/tree/develop.svg?style=svg)](https://circleci.com/gh/adobe-type-tools/afdko/tree/develop)
[![Codacy](https://api.codacy.com/project/badge/Grade/08ceff914833445685924ebb1f040070)](https://www.codacy.com/app/adobe-type-tools/afdko?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=adobe-type-tools/afdko&amp;utm_campaign=Badge_Grade)
[![Coverage](https://codecov.io/gh/adobe-type-tools/afdko/branch/develop/graph/badge.svg)](https://codecov.io/gh/adobe-type-tools/afdko/branch/develop)
[![PyPI](https://img.shields.io/pypi/v/afdko.svg)](https://pypi.org/project/afdko)
Expand Down
10 changes: 5 additions & 5 deletions c/makeotf/makeotf_lib/source/hotconv/otl.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ typedef struct {

/* --- FeatureList --- */
typedef struct {
Offset FeatureParams; /* Reserved=NULL */
LOffset FeatureParams; /* Reserved=NULL */
unsigned short LookupCount;
unsigned short *LookupListIndex; /* [LookupCount] */
} Feature;
Expand Down Expand Up @@ -1682,6 +1682,10 @@ static void fixFeatureParmOffsets(hotCtx g, otlTbl t, short shortfeatureParamBas
/* feature->FeatureParams is now: (offset from start of subtable block that follows the LookupList) */
/* shortfeatureParamBaseOffset is (size of featureList) + (size of LookupList). */
feature->FeatureParams = feature->FeatureParams + shortfeatureParamBaseOffset - rec->Feature;
if (feature->FeatureParams > 0xFFFF) {
hotMsg(g, hotFATAL, "feature parameter offset too large (%0lx)",
feature->FeatureParams);
}
}
}
}
Expand Down Expand Up @@ -1794,10 +1798,6 @@ void otlTableFill(hotCtx g, otlTbl t) {
/* The feature table FeatureParam offsets are currently from the start of the subtable block.*/
/* featureParamBaseOffset is the (size of the feature list + feature record array) + size of the lookup list. */
long featureParamBaseOffset = (t->tbl.LookupList - t->tbl.FeatureList) + t->lookupSize;
if (featureParamBaseOffset > 0xFFFF) {
hotMsg(g, hotFATAL, "feature parameter offset too large (%0lx)",
featureParamBaseOffset);
}
fixFeatureParmOffsets(g, t, (short)featureParamBaseOffset);
}
}
Expand Down
2 changes: 1 addition & 1 deletion c/public/lib/source/cffread/cffread.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ static void saveDeltaArray(cfrCtx h, size_t max, long *cnt, float *array, long *
numBlends = stackEntry->numBlends;

if (numBlends == 0) {
blendEntry->value = lastValue + (stackEntry->is_int) ? (float)stackEntry->u.int_val : stackEntry->u.real_val;
blendEntry->value = lastValue + (stackEntry->is_int ? (float)stackEntry->u.int_val : stackEntry->u.real_val);
lastValue = blendEntry->value;
blendEntry->numBlends = 0;
blendEntry->blendValues = NULL;
Expand Down
5 changes: 4 additions & 1 deletion c/public/lib/source/cffwrite/cffwrite_t2cstr.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,11 @@ static int checkOverflowByArg(cstrCtx h, int argcnt)
{
int blend_arg_cnt = h->glyph.info->blendInfo.numRegions;
if (blend_arg_cnt > 0)
{
blend_arg_cnt *= argcnt;
blend_arg_cnt++; /* number of args */
return (h->stack.cnt + h->flushed_cnt + argcnt + blend_arg_cnt
}
return (h->stack.cnt + h->flushed_cnt + argcnt + h->deltaStack.cnt + blend_arg_cnt
+ ((h->g->flags & CFW_SUBRIZE) ? 1 : 0)) > h->maxstack;
}

Expand Down
5 changes: 1 addition & 4 deletions c/sfntdiff/source/Dsys.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,6 @@ IntX sysReadInputDir(Byte8 *dirName, Byte8 ***fileNameList) {
memFree(path);

#else
#ifdef __linux__
#define d_namlen d_reclen
#endif
int i;
DIR *thedir;
struct dirent *entp;
Expand All @@ -242,7 +239,7 @@ IntX sysReadInputDir(Byte8 *dirName, Byte8 ***fileNameList) {
i = 0;
for (entp = readdir(thedir); entp != NULL; entp = readdir(thedir)) {
if (entp->d_name[0] == '.') continue;
(*fileNameList)[i] = (Byte8 *)memNew((entp->d_namlen + 1) * sizeof(Byte8));
(*fileNameList)[i] = (Byte8 *)memNew((strlen(entp->d_name) + 1) * sizeof(Byte8));
strcpy((*fileNameList)[i], entp->d_name);
i++;
}
Expand Down
20 changes: 10 additions & 10 deletions c/tx/source/ufo.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"UFO mode converts an abstract font to a UFO 2 font.\n",

"Note that it is NOT a full UFO writer. It writes only the information from\n",
"the Postscript font data. If the source is an OTF or TTF font, it will not copy\n",
"any of the meta data from outside the font program table. Also, if the destination\n",
"is an already existing UFO font, tx will overwrite it with the new data:\n",
"it will not merge the new font data with the old.\n",
"Note that it is NOT a full UFO writer. It writes only\n",
"the information from the Postscript font data. If the source\n",
"is an OTF or TTF font, it will NOT copy any of the meta data\n",
"from outside the font program table. Also, if the destination\n",
"is an already existing UFO font, tx will fail.\n",
"\n",
"When reading from a UFO font, tx will prefer GLIF files in the layer\n",
"'glyphs.com.adobe.type.processedGlyphs'. You can select another preferred\n",
"layer with the option '-altLayer <layer name>'. Use 'None' for the layer name\n",
"in order to have tx ignore the preferred layer and read GLIF files only from\n",
"the default layer.\n",
"When reading from a UFO font, tx will prefer GLIF files in the\n",
"layer 'com.adobe.type.processedglyphs'. You can select another\n",
"layer with the option '-altLayer <layer name>'. Use 'None' for\n",
"the layer name in order to have tx ignore the preferred layer\n",
"and read GLIF files from the foreground layer.\n",
1 change: 1 addition & 0 deletions c/tx/source/usage.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"-cef write CEF (Compact Embedded Font) font (-cef -h for help)\n"
"-afm write AFM representation of font data (-afm -h for help)\n"
"-svg write SVG font (-svg -h for help)\n",
"-ufo write UFO file (-ufo -h for help)\n",
"-path test path handling code (-path -h for help)\n"
"\n"
"[shared options]\n"
Expand Down
11 changes: 6 additions & 5 deletions python/afdko/makeotf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"""

__version__ = """\
makeotf.py v2.7.1 Feb 9 2019
makeotf.py v2.7.3 Mar 5 2019
"""

__methods__ = """
Expand Down Expand Up @@ -88,7 +88,8 @@
-ni Turn off the -i option, if it has previously
been turned on.
-ff <feature file> Specify path to feature file. Default is 'features'.
-ff <feature file> Specify path to feature file. Default is 'features.fea';
'features' is also accepted.
-fs Make stub GSUB table if there are no glyph substitution
rules in the features file.
Expand Down Expand Up @@ -1787,9 +1788,9 @@ def setMissingParams(makeOTFParams):
if os.path.exists(fileName):
srcFontPath = inputFilePath = fileName
break
if not os.path.exists(inputFilePath):
if not inputFilePath:
print("makeotf [Error] Could not find any of the default input "
"font file '%s'." % kDefaultFontPathList)
"font files %s." % kDefaultFontPathList)
# stop here already, otherwise getROS() will generate an IOError.
raise MakeOTFOptionsError

Expand Down Expand Up @@ -2028,7 +2029,7 @@ def convertFontIfNeeded(makeOTFParams):
def get_font_psname(font_path, is_ufo=False):
# Figure out PS name in order to derive default output path.
success, output = fdkutils.get_shell_command_output([
'tx', '-dump', '-0', font_path])
'tx', '-dump', '-0', font_path], std_error=True)
if not success:
raise MakeOTFShellError

Expand Down
Loading

0 comments on commit c8e2ae7

Please sign in to comment.