7369 Commits

Author SHA1 Message Date
Nikolaus Waxweiler
3c12f51c23 Update NEWS.rst 2020-02-13 15:07:59 +00:00
Nikolaus Waxweiler
4320392eb5 merger: Convert input checking asserts into proper exceptions 2020-02-13 15:02:31 +00:00
Nikolaus Waxweiler
af0567f847 featureVars: Use new exceptions 2020-02-13 15:02:31 +00:00
Nikolaus Waxweiler
5b5c964b0f cff: Use new exceptions
Aliases for the old errors will stay because the AFDKO and maybe others
use them.
2020-02-13 15:01:52 +00:00
Nikolaus Waxweiler
5a53d1d4ad models: Use new exceptions where input is checked 2020-02-13 15:01:52 +00:00
Nikolaus Waxweiler
c5c30588b5 init: Convert input checking asserts into proper exceptions
Also fix the avar output mapping check to allow values greater than OR
EQUAL to the preceeding values.
2020-02-13 15:01:07 +00:00
Nikolaus Waxweiler
8f7a796bd3 init: Convert existing raised exceptions to new appropriate ones 2020-02-13 14:58:10 +00:00
Nikolaus Waxweiler
55bfa4e076 Introduce errors submodule 2020-02-13 14:58:10 +00:00
Nikolaus Waxweiler
5cda8381f9
[feaLib] Check that glyph names referenced in the feature file are part of the glyph set (#1828)
This checks that glyph names that appear in a feature file are actually
in the glyph set provided in glyphNames. If the set is empty, no check
is done. This preempts a KeyError later during saving of a TTFont object
and makes this case much more easily catchable.

Closes #1723.
2020-02-13 14:47:29 +00:00
Cosimo Lupo
e35228603d
Merge pull request #1829 from anthrotype/empty-glyf
[glyf] compile empty table as 1 null byte to make OTS and Windows happy
2020-02-12 14:52:23 +00:00
Cosimo Lupo
cf0567d8a5
subset_test: test subsetting font to empty glyf table 2020-02-12 14:25:25 +00:00
Cosimo Lupo
92e770ea16
_g_l_y_f_test: add tests for compiling/decompiling empty glyf table 2020-02-12 14:25:25 +00:00
Cosimo Lupo
9c7ceadc0e
[glyf] compile empty table as 1 null byte to make OTS and Windows happy
Fixes #899

See https://github.com/khaledhosny/ots/issues/52#issuecomment-289369267
2020-02-12 14:25:25 +00:00
Nikolaus Waxweiler
a10dd80c32
Merge pull request #1827 from fonttools/varLib-fill-in-mapped-location
[varLib] Fill in the forward-mapped location
2020-02-12 13:09:33 +00:00
Nikolaus Waxweiler
578aa16a36 Add NEWS entry 2020-02-12 12:55:07 +00:00
Cosimo Lupo
16bff17483
head: when checking for extra padding at end of table, must compare bytes, not str 2020-02-12 12:53:09 +00:00
Nikolaus Waxweiler
eb77a3be22 [varLib] Fill in the forward-mapped location 2020-02-11 15:45:49 +00:00
Nikolaus Waxweiler
5f753c3641
Merge pull request #1820 from fonttools/fix-test_include_relative_to_cwd-on-win
[feaLib lexer tests] Compare realpath against realpath
2020-02-04 13:13:16 +00:00
Nikolaus Waxweiler
ef2742593c Compare realpath against realpath
On Windows, tests may be run in the user's temp directory, so the previous code
may compare C:\Users\nikolaus.waxweiler\ against C:\Users\NIKOLA~1.WAX\.
2020-02-04 11:08:45 +00:00
Cosimo Lupo
40c79882d7
Bump version: 4.3.0 → 4.3.1.dev0 2020-02-03 15:44:33 +00:00
Cosimo Lupo
d6061a5288
Release 4.3.0 2020-02-03 15:44:32 +00:00
Cosimo Lupo
9d454c2079
Update changelog [skip ci] 2020-02-03 15:42:10 +00:00
Cosimo Lupo
1c2fb0e3ef
Merge pull request #1809 from justvanrossum/demo-issue1808
[varLib] demonstrate and fix #1808
2020-02-03 15:39:32 +00:00
Cosimo Lupo
ae4569c1a8
Update changelog [skip ci] 2020-02-03 15:35:43 +00:00
Khaled Hosny
b9bc128f2c
Merge pull request #1816 from khaledhosny/varlib-cff2-source
[varLib] Allow using CFF2 table as source
2020-02-03 17:17:02 +02:00
Cosimo Lupo
78abdf2299
Merge pull request #1818 from fonttools/eblc-index-subtable-3
EBLC: fix padding length calculation for Format 3 IndexSubTable
2020-02-03 15:15:24 +00:00
Cosimo Lupo
8e2e7d98fc
add C_B_L_C_test.py to test we compile index table format 3 correctly 2020-02-03 14:07:25 +00:00
Khaled Hosny
09174b9129 [CFF2] Make recalcBBoxes work with CFF2 table
Add checks for CFF2 table next to CFF checks as applicable.
2020-01-31 23:39:47 +02:00
Khaled Hosny
366c08a9d6 [varLib, fontBuilder] Set Private.vstore as well
Otherwise T2OutlineExtractor.op_blend() would raise and exception unless
the font is saved and loaded again.
2020-01-31 23:39:47 +02:00
Khaled Hosny
38981b6dae [varLib] Allow using CFF2 table as source
Nothing clever, if the source font has a CFF2 table use it as if it were
a CFF table (i.e. non-variable, not sure what would happen in the source
CFF2 was variable already).
2020-01-31 23:39:47 +02:00
Cosimo Lupo
c5dfbab521
EBLC: fix padding length calculation for Format 3 IndexSubTable
Fixes #1817
2020-01-31 17:30:12 +00:00
Khaled Hosny
014991d710
Merge pull request #1815 from khaledhosny/fealib-flag-fix
[feaLib] Don’t reset lookupflag in nested lookups
2020-01-30 13:06:42 +02:00
Khaled Hosny
42b51f084f
Merge pull request #1814 from khaledhosny/fealib-mult-fix
[feaLib] fix mixed single/multiple substitutions
2020-01-30 13:02:39 +02:00
Cosimo Lupo
39b02fd224
fix a coiple of SyntaxWarning on python 3.8 2020-01-30 10:47:57 +00:00
Khaled Hosny
eed252cb92 [feaLib] Don’t reset lookupflag in nested lookups
In makeotf, lookups defined inside feature blocks inherit the current
lookupflag of the feature, so don’t reset the lookupflag for such
lookups.
2020-01-29 23:46:40 +02:00
Khaled Hosny
22bfc305ee [feaLib] fix mixed single/multiple substitutions
If the single substitution involved a glyph class, we were incorrectly
using only the first glyph in the class.

Broken since ec6ff821f0e72022d7aec8794b6bb589d8f81808, apparently no one
else uses this feature!
2020-01-29 22:36:54 +02:00
Cosimo Lupo
8c1654397d
Bump version: 4.2.5 → 4.2.6.dev0 2020-01-29 17:39:48 +00:00
Cosimo Lupo
fa77aac63c
Release 4.2.5 2020-01-29 17:39:47 +00:00
Cosimo Lupo
786e99f5a9
Update changelog [skip ci] 2020-01-29 17:39:39 +00:00
justvanrossum
0bb234d218 added test 2020-01-29 12:42:27 +01:00
Cosimo Lupo
f609293dc7
Merge pull request #1811 from dscorbett/add_multiple_subst-duplicate
[feaLib] Do not fail on duplicate multiple substitutions
2020-01-29 11:26:41 +00:00
justvanrossum
950314a5a5 undo the more invasive changes, and only keep the change for #1808; maybe we'll add a test later 2020-01-29 12:24:03 +01:00
justvanrossum
92e03c72b2 removed leftovers from previous edit 2020-01-29 12:02:26 +01:00
justvanrossum
69800b0db5 no need to explicitly close: varLib.build() will do that. 2020-01-29 12:01:05 +01:00
justvanrossum
49507a9de8 undo DesignSpaceDocument context manager changes, and explicitly (but opt-out) close master_fonts within varLib.build() 2020-01-29 11:55:39 +01:00
justvanrossum
703c2272bd ensure we don't call close on objects that don't have it 2020-01-29 11:27:56 +01:00
justvanrossum
e18f63cfa3 make DesignSpaceDocument a context manager that closes source fonts, and use it in the varLib tests. 2020-01-29 11:17:57 +01:00
justvanrossum
51ff4a5d69 Move ensureDecompiled() calls to mergeObjects(). This makes more sense, but still needs the hasattr checks. 2020-01-29 11:05:01 +01:00
justvanrossum
033145adf6 this fixes #1808, but I'm not sure this is the most elegant solution 2020-01-29 10:10:55 +01:00
David Corbett
62ed43ddb9 Do not fail on duplicate multiple substitutions 2020-01-26 10:30:17 -05:00