Behdad Esfahbod
9987b7e14e
[gvar] Use array.array to decode deltas
2016-03-21 10:12:26 -07:00
Cosimo Lupo
83f074aac4
[feaLib] use shorter fea_path and fea_data kwargs in addOpenTypeFeatures
...
as discussed here: https://github.com/behdad/fonttools/pull/547/files#r56807232
2016-03-21 12:18:32 +00:00
Sascha Brawer
d268206fdd
Merge pull request #555 from anthrotype/fealib-ignore-names-1-6
...
[fealib] ignore nameIDs 1-6 in parser and issue a warning
2016-03-21 12:14:56 +01:00
justvanrossum
ad386ee477
Keep Format attribute for OT subtables. This value may be ignored by the compiler but is useful for debugging. Part of fixing #92 .
2016-03-21 12:12:05 +01:00
Cosimo Lupo
694b9d6917
[feaLib.parser_test] add test for ignored nameIDs 1-6
2016-03-21 11:02:03 +00:00
Cosimo Lupo
5efc85873b
[feaLib.parser] issue a warning and ignore 1 <= nameID <= 6 (like makeotf)
2016-03-21 11:01:33 +00:00
Just van Rossum
a11c8d610f
Merge pull request #554 from schriftgestalt/master
...
Disable optimisations when decompiling TrueType instructions
2016-03-21 07:47:52 +01:00
schriftgestalt
b09c5baa15
Disable optimisations when decompiling TrueType instructions
2016-03-20 22:26:22 +01:00
Cosimo Lupo
b2ac89cc42
[apply-feature-file.py] swap args position in addOpenTypeFeatures func call
...
this changed in commit 5e64857b975c842acadd0eba859c689a23c81b63
Fixes #553
2016-03-20 19:31:28 +00:00
Sascha Brawer
7eed24725f
Allow include statements not terminated by a semicolon
...
The lexer passes the semicolon to the parser, which will read over it.
Resolves https://github.com/behdad/fonttools/issues/552 .
2016-03-20 17:26:20 +01:00
Sascha Brawer
9ec04f0537
Merge pull request #547 from adrientetar/patch-2
...
feaLib: support string input
2016-03-20 09:09:06 -07:00
Adrien Tétar
492df7359b
feaLib: fix tests
2016-03-20 15:01:33 +01:00
Sascha Brawer
cf81e8adeb
Merge pull request #551 from khaledhosny/fealib-base
...
[feaLib] Support BASE table
2016-03-20 04:57:49 -07:00
Khaled Hosny
1ac37d7d00
[feaLib] Support BASE table
...
Just the parts documented a currently implemented by Adobe’s
implementation.
2016-03-20 13:36:02 +04:00
Cosimo Lupo
c3056bcae5
Merge pull request #550 from khaledhosny/fealib-featurename
...
[feaLib] Support stylistic set featureNames and size feature
2016-03-19 18:29:01 +00:00
Khaled Hosny
40be0e6f3a
[feaLib] Support size feature
2016-03-19 21:55:24 +04:00
Khaled Hosny
6e291cf705
[feaLib] Fix parsing float numbers
...
Numbers with integral parts >= 10 were incorrectly parsed as integers as
next_char always pointed to the second number not the decimal point.
2016-03-18 18:42:59 +04:00
Khaled Hosny
9feaab13aa
[feaLib] Support stylistic set featureNames
...
Does not handle featureNames for cvXX features, but it shouldn’t be hard
for someone to extend the code to support them if inclined to do so.
2016-03-18 14:08:00 +04:00
Khaled Hosny
53dc98be55
[feaLib] Fix parsing name records
...
Don’t override supplied encoding and language ids.
2016-03-18 14:06:33 +04:00
Adrien Tétar
0e2eeaf58b
Merge pull request #20 from anthrotype/repr-float
...
use repr() instead of str() to stringify floats
2016-03-17 19:50:55 +01:00
Cosimo Lupo
ace2a4a6bc
[glifLib] use use repr() to stringify floats for py23 compat
...
Closes #19
2016-03-17 16:06:03 +00:00
Cosimo Lupo
6dbca7fa38
[testSupport] use repr() to stringify floats for py23 compat
...
Part of fixing #19
2016-03-17 16:04:11 +00:00
Sascha Brawer
6a07beb699
Merge pull request #548 from mashabow/spec9e
...
[feaLib] Fix typo in testdata/spec9e.*
2016-03-16 17:48:27 -07:00
Masaya Nakamura
1adb1ad9e8
[feaLib] Fix typo in testdata/spec9e.*
...
Feature File Spec itself was fixed in https://github.com/adobe-type-tools/afdko/pull/110
2016-03-17 09:44:20 +09:00
Adrien Tétar
14e03b478b
Merge pull request #18 from benkiel/master
...
Updating robofab occurances in the text to ufoLib
2016-03-16 23:38:17 +01:00
Ben Kiel
cc16c7370c
Updating robofab occurances in the text to ufoLib
2016-03-16 14:24:16 -05:00
Adrien Tétar
5e64857b97
feaLib: support string input
2016-03-15 20:01:29 +01:00
Sascha Brawer
4680701b6e
Merge pull request #545 from khaledhosny/fea-lookupflag
...
Fix handling of default lookupflag
2016-03-15 09:12:44 -07:00
Sascha Brawer
41fbf35f63
Merge pull request #546 from khaledhosny/fealib-names
...
[feaLib] Support name table
2016-03-15 08:54:29 -07:00
Khaled Hosny
4e316cd337
[feaLib] Support name table
2016-03-15 17:49:02 +04:00
Behdad Esfahbod
8d9f04c576
Typo
2016-03-13 11:24:35 -07:00
Behdad Esfahbod
e2299a16b0
[otBase] Minor
...
Part of fixing https://github.com/behdad/fonttools/issues/518
2016-03-12 20:42:16 -08:00
Behdad Esfahbod
407c246433
[otBase] Minor renamings
...
Part of fixing https://github.com/behdad/fonttools/issues/537
2016-03-12 20:42:13 -08:00
Behdad Esfahbod
c02ced3393
[otBase] Minor
...
Part of fixing https://github.com/behdad/fonttools/issues/537
2016-03-12 20:42:08 -08:00
Behdad Esfahbod
6b46d8e553
[otBase] Move code around
...
Part of fixing https://github.com/behdad/fonttools/issues/537
2016-03-12 20:42:05 -08:00
Behdad Esfahbod
4b94fd55cb
Simplify overflow handling code
...
The code that is being removed is untested and does not seem to make
fixing an overflow any easier. The fixer code just needs to know
which subtable caused the overflow and does not care about the item
within. As such, no point in trying to find a "right" item.
In fact, leaving item as is, is more useful in debugging overflows
as it reflects which item's offset actually overflowed.
Part of fixing https://github.com/behdad/fonttools/issues/537
2016-03-12 20:11:34 -08:00
Behdad Esfahbod
c1080d9796
Implement splitting PairPosFormat2 in case of overflow
...
Part of fixing https://github.com/behdad/fonttools/issues/537
2016-03-12 18:17:37 -08:00
Khaled Hosny
8d1930a27a
Fix handling of default lookupflag
...
According to the spec:
> The lookupflag attribute defaults to 0 at the start of a feature
> block.
>
> The lookupflag attribute stays the same until explicitly changed, until
> a lookup reference statement is encountered that changes it, until the
> script is changed, or until the end of the feature.
This is an attempt to fix this by resetting the lookupflag at the start
and end of feature/lookup blacks. I’m not sure if resetting it in lookup
blocks is correct (my reading of the spec suggests it is not), but one
needs to test this against makeotf and see how it behaves here.
2016-03-13 00:43:10 +04:00
Behdad Esfahbod
7319cd0afc
Minor
2016-03-12 02:21:07 -08:00
Cosimo Lupo
8bf333facb
Merge pull request #544 from anthrotype/ttProgram-eq
...
test for NotImplemented in __ne__; add __eq__ and __ne__ to ttProgram.Program
2016-03-11 16:22:59 +00:00
Cosimo Lupo
d82a31dd57
return NotImplemented from __ne__ if __eq__ returns NotImplemented
...
otherwise `not NotImplemented` (always False) is returned from __ne__ when `type(self) != type(other)`, leading to illogic results like:
>>> from fontTools.ttLib.tables.DefaultTable import DefaultTable
>>> t = DefaultTable('test')
>>> t == 0
False
>>> t != 0
False
The latter of course should return True.
2016-03-11 15:10:50 +00:00
Cosimo Lupo
d4b9a2bec3
[ttGlyphPen_test] ttProgram has __eq__ now, remove unnecessary assignments
...
previously assertEqual would fail, despite the `program` attributes where both empty, as the object have different id(). The Program.__eq__ method now compares self.__dict__ == other.__dict__, hence the test pass.
2016-03-11 15:10:50 +00:00
Cosimo Lupo
35c46aa0e2
[ttProgram] add __eq__ and __ne__ methods to Program class
2016-03-11 15:10:50 +00:00
Cosimo Lupo
bc51241ca9
Merge pull request #542 from anthrotype/haveInstructions
...
[ttGlyphPen] only add empty ttProgram to simple glyphs, not to composites
2016-03-11 11:23:52 +00:00
Cosimo Lupo
9b83c377c2
[ttGlyphPen] only add empty ttProgram to simple glyphs, not to composites
...
Unlike simple glyphs (with contours) which must always have `instructionLength`, the field is optional in composite glyphs and depends on whether `WE_HAVE_INSTR` flag is set:
https://www.microsoft.com/typography/otspec/glyf.htm
In the previous code, the TTGlyphPen was adding an empty `program` attribute to any new glyph, including composite glyphs. It should only do it for simple glyphs.
For example, if you take Roboto-Regular.ttf from here:
https://github.com/google/roboto/releases/tag/v2.129
The font (unhinted) was compiled using the ttGlyphPen. It has 1434 composite glyphs. For each of them, a USHORT value for the number of instructions (0) is written, so the binary ttf is 2.868 KB greater than
what it should be.
2016-03-11 10:53:41 +00:00
Behdad Esfahbod
b01c41bcea
[Snippets] Add symfont.py, for symbolic font statistics analysis
2016-03-10 06:13:18 -08:00
Cosimo Lupo
87d13888ce
[ttGlyphPen] check last point in qCurveTo is not None
...
otherwise, if points[-1] == 0, the on-curve point won't be added.
2016-03-09 17:58:48 +00:00
Sascha Brawer
c3e2d37299
Snippet for applying a feature file to a font
...
It would be nice to also handle MTI feature files, and to process
TTX in addition to binary fonts, and and and... but it's a start.
https://github.com/behdad/fonttools/issues/527
2016-03-09 17:19:10 +01:00
Behdad Esfahbod
5794f9f6a2
Merge pull request #538 from jamesgk/master
...
[TTGlyphPen] Add component flags argument
2016-03-07 17:42:28 -08:00
James Godfrey-Kittle
fd5b6de3ba
[TTGlyphPen] Add component flags argument
2016-03-07 14:48:46 -08:00