5164 Commits

Author SHA1 Message Date
Cosimo Lupo
553f23f1db
tox.ini: require at least tox >= 3.0 2018-07-25 19:14:25 +01:00
Behdad Esfahbod
05f95f0f58 [otBase] Try ExtensionLookup if other offset-overflow methods fail
If offset overflow happens other than between Lookup and SubTable, or
within SubTable, then we don't know how to fix it currently.  Now we
try to put that lookup in an Extension lookup anyway, since that will
isolate it and sharing with other lookups won't happen, hopefully
avoiding the overflow.

This is really a bandaid... What we want is the 99proof branch to
be finished and replace our current packing algorithm.

Fixes https://github.com/fonttools/fonttools/issues/1296
2018-07-25 11:06:44 -07:00
Behdad Esfahbod
642cb03296 Remove unused line of code 2018-07-25 11:06:44 -07:00
Cosimo Lupo
7b4a9e3b58
appveyor: fixup 2018-07-25 19:06:20 +01:00
Cosimo Lupo
b88caadb8f
run-test.sh: use tox to run the tests
still works as before, only that now it requires tox to be available in the /home/clupo/.pyenv/plugins/pyenv-virtualenv/shims:/home/clupo/.pyenv/shims:/home/clupo/.pyenv/bin:/home/clupo/.pyenv/plugins/pyenv-virtualenv/bin:/home/clupo/.local/bin:/home/clupo/bin:/home/clupo/.cargo/bin:/home/clupo/Applications/node-v6.11.4-linux-x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin, else it will fail
2018-07-25 19:03:05 +01:00
Cosimo Lupo
d79b2dd6c7
tox/appveyor: don't use TOXPYTHON env var to select basepython; write a pythonX.Y.bat wrapper instead 2018-07-25 19:03:05 +01:00
Cosimo Lupo
8991f2c097
Merge pull request #1300 from anthrotype/explicit-subtable-break
support explicit "subtable" breaks in kerning lookups
2018-07-25 11:58:26 +01:00
Cosimo Lupo
3734b6c036
cffLib/specializer: minor; use < instead of <= maxstack - 1 2018-07-25 11:56:32 +01:00
Cosimo Lupo
334440b56d
Merge pull request #1301 from irori/stacksize
[cffLib.specializer] Leave 1 stack free area for subroutinizer use
2018-07-25 10:44:19 +01:00
Kunihiko Sakamoto
35377bc93b Fix test 2018-07-25 18:22:18 +09:00
Kunihiko Sakamoto
41a21cce27 [cffLib.specializer] Leave 1 stack free area for subroutinizer use 2018-07-25 17:29:27 +09:00
Cosimo Lupo
33084b74cf
Tests: add tests for 'subtable' breaks 2018-07-24 17:14:39 +01:00
Cosimo Lupo
9456ae9485
feaLib: support explicit 'subtable' statements in PairPos lookups
Fixes https://github.com/fonttools/fonttools/issues/1279
2018-07-24 17:13:52 +01:00
Cosimo Lupo
d3229d5777
feaLib: ensure languagesystems using 'DFLT' script tag precede all others
https://github.com/fonttools/fonttools/pull/1292#issuecomment-407427544

this is to match makeotf's behavior

https://github.com/adobe-type-tools/afdko/pull/498/files#diff-17824930b3cdfb707ae56e1f42bccec6R2305
2018-07-24 16:17:23 +01:00
Cosimo Lupo
1740d18584
Merge pull request #1292 from silnrsi/bugfix2
More depths to allowing languages in DFLT
2018-07-24 15:24:50 +01:00
Cosimo Lupo
098b0ade72
appveyor: test on python3.7 64-bit; no longer test on 2.7 x64 and 3.6 x86
appveyor is slooow. It's enough we test 2.7 on 32-bit and 3.6 and 3.7 for 64-bit. I think..
2018-07-24 12:23:40 +01:00
Cosimo Lupo
6f94e2ce23
travis: remove python3.4, add python3.7 2018-07-24 12:22:15 +01:00
Cosimo Lupo
38566f3a30
subset_test: minor 2018-07-24 12:17:59 +01:00
Cosimo Lupo
248ae41e9d
loggingTools: fix CapturingLogHandler to work with py37
we can't set the logger.level directly because in py37 the logger has a _cache
attribute and that needs to be invalidated by calling setLevel method.

also, I noticed we weren't restoring the original 'disabled' attribute value...

And we need to also set/restore the 'propagate' attribute.
2018-07-24 12:17:59 +01:00
Cosimo Lupo
6105c41f34
tox.ini: add py37 env 2018-07-24 12:17:59 +01:00
Cosimo Lupo
5a1ccf1640
Merge pull request #1297 from anthrotype/fix-mark-base-overflow
atttempt to fix offset overflows in MarkBasePos subtables
2018-07-23 12:58:39 +01:00
Cosimo Lupo
d7ac0ad359
subset: write default file extension based on --flavor or sfntVersion
Fixes https://github.com/fonttools/fonttools/issues/1298
2018-07-21 18:28:33 +01:00
Cosimo Lupo
0df51c58e0
otTables_test: add unit test for splitMarkBasePos 2018-07-19 17:56:35 +01:00
Cosimo Lupo
6e8e431dee
otTables: try to fix MarkBasePos subtable overflows
Fixes https://github.com/googlei18n/fontmake/issues/450
2018-07-19 17:52:00 +01:00
Cosimo Lupo
2798bf6d1f
otTables: print subtable type when can't split in fixSubTableOverFlows 2018-07-19 17:50:43 +01:00
Cosimo Lupo
a526b7170c
tests: fix expected results after Unicode 11 update
fixes https://github.com/fonttools/fonttools/issues/1291
2018-07-12 11:35:16 +01:00
Cosimo Lupo
0ae200f310
requirements.txt: bump unicodedata2 to 11.0.0 2018-07-12 11:35:16 +01:00
Cosimo Lupo
452c85ecef
Update Blocks, Scripts and ScriptExtensions for Unicode 11
I run: python3 MetaTools/buildUCD.py
2018-07-12 11:35:16 +01:00
Martin Hosken
d5a1e5257e Simplify code for language statement 2018-07-09 21:10:46 +01:00
Martin Hosken
17de50c172 Add DFLT script languagesystem test 2018-07-09 20:11:57 +01:00
Martin Hosken
6d6b9c69d4 Fix tests 2018-07-09 17:02:48 +01:00
Martin Hosken
d76f447775 More depths to allowing languages in DFLT 2018-07-09 16:41:54 +01:00
Cosimo Lupo
87178f413a
Merge pull request #1290 from fonttools/xmlwriter-context-manager
Add context manager to XMLWriter
2018-07-09 13:26:10 +02:00
Miguel Sousa
523c31dd0b Add context manager to XMLWriter
93103c08ca (r29633076)
2018-07-08 22:12:44 -07:00
Miguel Sousa
8d7774a3e8 [pscharstrings] Optimize the charstring's bytecode
by encoding as integers all float values that have no decimal portion.

This optimization is expected to reduce the file size of CFF2 fonts that have intermediate masters.

Related to https://github.com/adobe-type-tools/afdko/issues/444

Many thanks to @cjchapman for the help on the fixed point math
2018-06-29 09:54:00 -07:00
Cosimo Lupo
ad597a49b4
Merge pull request #1285 from bgermann/master
Add missing import
2018-06-28 13:21:34 +01:00
bgermann
d438f15118
Add missing import 2018-06-28 14:07:14 +02:00
Cosimo Lupo
a2622d7222
Merge pull request #1278 from silnrsi/bugfix2
Allow any languages under DFLT script
2018-06-20 11:30:06 +01:00
Martin Hosken
29d67a90c5 Update tests to not require removed assertion 2018-06-20 09:57:07 +01:00
Martin Hosken
1ae0bf87a0 Allow any languages under DFLT script 2018-06-20 09:42:46 +01:00
Cosimo Lupo
f251c8d665
Bump version: 3.28.0 → 3.28.1.dev0 2018-06-19 17:30:35 +01:00
Cosimo Lupo
37ed01cb4f
Release 3.28.0 2018-06-19 17:30:34 +01:00
Cosimo Lupo
15b2bd4dd9
Update changelog 2018-06-19 17:30:13 +01:00
Cosimo Lupo
4c0dbd1515
Merge pull request #1276 from anthrotype/mutator-wght-wdth-slnt
WIP [mutator] set usWeightClass, usWidthClass and italicAngle
2018-06-19 17:23:56 +01:00
Cosimo Lupo
d9d30c819a
loggingTools: move here the LastResortLogger from py23
and add a small test
2018-06-19 16:54:50 +01:00
Cosimo Lupo
e6a5db543d
py23: don't automatically set logging.lastResort handler on py27
To avoid the 'No handlers could be fonud' message, from now on, one should always
configure logging in one's scripts or applications.

logging.basicConfig, or fontTools.configLogger (with some predefined defaults
useful for fonttools scripts) can be used to quickly configure logging.
Read the python docs for more advanced logging usage.
2018-06-19 15:35:28 +01:00
Cosimo Lupo
8c597b5375
mutator: round to closest width class
this is the mapping between the half of each percentage intervals and
the associated usWidthClass:

{56.25: 1,
 68.75: 2,
 81.25: 3,
 93.75: 4,
 106.25: 5,
 118.75: 6,
 137.5: 7,
 175.0: 8}

Notice how wdth=80 (in the adjusted test case) will fall in width class
3, instead of 4, because it is < 81.25, thus closer to the nominal 75
than to 87.5.
2018-06-19 14:16:17 +01:00
Cosimo Lupo
0234b9dbd5
mutator: also clamp usWeightClass between valid 1...1000 2018-06-18 19:45:20 +01:00
Cosimo Lupo
8fcbf78d8b
Tests: adjust expected usWeightClass and usWidthClass 2018-06-18 19:41:03 +01:00
Cosimo Lupo
dbe08a62ad
mutator: set usWeightClass, usWidthClass and italicAngle
https://github.com/fonttools/fonttools/issues/1264
2018-06-18 19:40:30 +01:00