Behdad Esfahbod
9df78f303b
[otData] Support BASE table version 1.1
2019-10-31 11:45:49 -07:00
Cosimo Lupo
ebadcd96e6
set pre-initialized CountReference in VarRegionList.preWrite with fvar.axisCount
...
so we can reuse CountReference class, as suggested in https://github.com/fonttools/fonttools/pull/1752#issuecomment-547113944
The patch is no shorter though.
2019-10-29 12:52:42 +00:00
Cosimo Lupo
e8f5bbcc6a
renamed LiteralCount to StaticCount
...
makes it clearer what it is
2019-10-24 15:42:09 +01:00
Cosimo Lupo
adc5b2997e
[otBase|otTables] enforce VarStore RegionAxisCount == fvar.AxisCount
...
even when there are no Regions and thus we can't take the length of VarRegionAxis array.
This is to appease older versions of OTS which blindly enforce this rule and
reject a VF that has, e.g., an empty HVAR table with no regions if the
HVAR.VarStore.VarRegionList.RegionAxisCount != fvar.AxisCount.
Fixes https://github.com/fonttools/fonttools/issues/1670
Related:
https://github.com/fonttools/fonttools/pull/1671
https://github.com/googlefonts/fontmake/issues/565
https://github.com/khaledhosny/ots/pull/192
2019-10-24 12:54:16 +01:00
msoxzw
fcbbce5ca2
Add with statement context manager like ttFont
2019-10-21 07:03:45 +00:00
Nikolaus Waxweiler
969df8303b
Remove some Python 2 era import gaming
2019-10-11 22:36:33 +01:00
Nikolaus Waxweiler
e4f7495f32
[name] Be less cautious about getting data for NameRecord comparisons
2019-10-11 17:39:56 +01:00
Nikolaus Waxweiler
2e82438d93
[name] Handle duplicate name records with different string
types
2019-10-11 14:24:03 +01:00
Cosimo Lupo
7433ac786a
graphite: round 16.16F 'version' to shortest decimal float on decompile
...
we could alternatively decode these version fields as a long integer like we do elsewhere
for similar table versions, but I am not sure whether external code relies on them being
like they are now (i.e. compact decimal float).
https://github.com/fonttools/fonttools/issues/944
2019-10-08 13:40:07 +01:00
Cosimo Lupo
a7e368d00f
otConverters: use floatToFixedToStr/strToFixedToFloat in Fixed/F2Dot14 toXML/fromXML
2019-10-08 13:40:06 +01:00
Cosimo Lupo
eb5a2ceb8d
_t_r_a_k: use floatToFixedToStr and strToFixedToFloat in TrackTableEntry toXML/fromXML
2019-10-08 13:40:06 +01:00
Cosimo Lupo
c60512de0e
_g_l_y_f: use floatToFixedToStr and strToFixedToFloat in GlyphComponent toXML/fromXML
2019-10-08 13:40:06 +01:00
Cosimo Lupo
8791caf3b8
_a_v_a_r: use floatToFixedToStr and strToFixedToFloat in toXML/fromXML methods
2019-10-08 13:40:05 +01:00
Cosimo Lupo
d66c92fbe0
_f_v_a_r: use floatToFixedToStr and strToFixedToFloat in Axis and NamedInstance
2019-10-08 13:40:05 +01:00
Cosimo Lupo
79d654eaf2
TupleVariation: use floatToFixedToStr and strToFixedToFloat in toXML/fromXML methods
2019-10-08 13:40:04 +01:00
Cosimo Lupo
3521094ca9
_h_e_a_d: use floatToFixedToStr and strToFixedToFloat for fontRevision
2019-10-08 13:40:03 +01:00
Martin Hosken
7129501e0d
py3 fixup Silf corner case where script is actually used
2019-09-18 09:22:55 +07:00
Cosimo Lupo
e9c7a5227a
_n_a_m_e_test: more tests for removeNames
2019-09-11 15:01:46 +02:00
Cosimo Lupo
7dd510b3b8
Merge pull request #1719 from m4rc1e/name-remove
...
[name] add removeName method to table__n_a_m_e
2019-09-11 14:53:11 +02:00
Marc Foley
4e316cae57
[name] add removeNames method to table__n_a_m_e
2019-09-11 11:56:09 +01:00
Cosimo Lupo
f2915e7480
Merge pull request #1706 from dscorbett/splitMultipleSubst
...
Fix MultipleSubst subtable overflows
2019-09-11 09:53:13 +02:00
Cosimo Lupo
272a156fc3
Merge pull request #1715 from simoncozens/hhea-aliases
...
[ttLib] Add aliases for renamed entries in hhea table
2019-09-10 16:24:13 +02:00
Cosimo Lupo
4e9fa7a44c
Merge pull request #1708 from madig/name-toStr-equal-toUnicode
...
name: Remove now unnecessary Python 2 code path
2019-09-10 16:22:54 +02:00
Cosimo Lupo
9938efbef5
Merge pull request #1712 from chrissimpkins/refactor-array-tofromstring
...
Refactor deprecated array tostring/fromstring methods to tobytes/frombytes
2019-09-10 16:22:04 +02:00
Simon Cozens
6e55f939e3
[ttLib] Add aliases for renamed entries in hhea table
...
Closes #1714
2019-09-05 12:38:45 +01:00
Chris Simpkins
791f619029
refactor array.tostring to array.tobytes
...
the array.tostring method is deprecated
2019-08-29 23:21:22 -04:00
Chris Simpkins
12814aa7b1
refactor array.fromstring to array.frombytes
...
fromstring is a deprecated array method
2019-08-29 22:58:42 -04:00
Nikolaus Waxweiler
811316cd3a
Remove now unnecessary Python 2 code path
2019-08-27 15:54:29 +01:00
David Corbett
bb51167fba
Fix MultipleSubst subtable overflows
2019-08-24 13:29:53 -04:00
Martin Hosken
52a8ff32d3
Fix Sill table output to pass OTS
2019-08-23 08:46:23 +07:00
Just van Rossum
0ea19f3bd3
[ttLib] allow the glyf table to be incomplete when dumping to XML ( #1681 )
...
[ttLib] Allow the glyf table to be incomplete (to not contain everything from the glyph order) when writing to XML. This partially addresses #684 in that it will allow the font Ambrosia.otb to be dumped with ttx (but not recompiled). Log a warning when a glyph is not present.
2019-08-15 18:46:14 +02:00
Nikolaus Waxweiler
01328213c7
Remove __future__ imports
2019-08-09 12:20:13 +01:00
Just van Rossum
5d6f08fd95
[ttLib] fix UnboundLocalError for empty loca/glyph tables ( #1680 )
...
* Rename last to pos, and next to nextPos
* make sure nextPos is initialized, to avoid UnboundLocalError on an empty glyf table, partially addressing #684
2019-08-03 13:42:37 +02:00
Cosimo Lupo
7ffd6a3d0f
instancer: minor changes following Evan's review
2019-07-31 16:31:38 +01:00
Cosimo Lupo
1726a4a1fc
Merge remote-tracking branch 'origin/master' into partial-instancer
2019-06-20 15:05:34 +01:00
Cosimo Lupo
84e9ea167a
woff2: allow to recompress woff2 while keeping flavorData
...
optionally modifying the list of transformed tables
2019-06-19 12:13:14 +01:00
Cosimo Lupo
1c369da8c9
woff2: fix typo
2019-06-19 11:47:32 +01:00
Cosimo Lupo
6ba7c3c9e2
woff2: initialize WOFF2FlavorData from existing WOFFFlavorData
...
Fixes #1650
A regression was introduced with 3.43.0 when doing pyftsubset --flavor=woff2
and the input font is WOFF 1.0, thus it has a non-None flavorData already
but doesn't define the transformTables attribute.
2019-06-19 11:44:40 +01:00
Cosimo Lupo
6f1d25497a
Merge remote-tracking branch 'origin/master' into partial-instancer
2019-06-18 18:45:47 +01:00
Cosimo Lupo
d21aa29824
instancer: fixes addressing Evan's comments
...
- changed getCoordWidth method to use all if-stmt, ordered by ret value (0, 1, 2).
- added more info to TypeError message in getCoordWidth method.
- in round/scaleDeltas, chained if statements in one line to avoid writing the loop twice.
2019-06-17 15:18:54 +01:00
Cosimo Lupo
a96d2dba73
woff2: add main() to call 'compress' and 'decompress' subcommands
...
$ fonttools ttLib.woff2 --help
2019-06-14 18:18:21 +01:00
Cosimo Lupo
65b0609be1
remove redundant table__g_l_y_f.getCoordinates method
...
just use getCoordinatesAndControls
2019-06-14 11:17:37 +01:00
Cosimo Lupo
18efee2c7b
TupleVariation: rename get{DeltaType,CoordWidth}; do not special-case scalar=0
...
we still need to branch between the case where coordinates are wrapped in (x, y) tuples or naked floats.
2019-06-14 11:03:38 +01:00
Cosimo Lupo
deaeb909a7
woff2: add support for hmtx transformation
...
no tests yet
fixup
2019-06-13 18:07:14 +01:00
Cosimo Lupo
0162446f4c
woff2: don't normalize glyf+loca if we aren't transforming them
...
Also, the TTFont.getGlyphOrder() automatically makes up a dummy
glyph order from the maxp.numGlyphs, we simply need to ensure
'maxp' is decompiled before 'glyf'.
When transforming glyf, the glyf.glyphOrder is guaranteed to
be present (as the glyf table has been already decompiled), so
we don't need to deal with it being missing or incorrect
(hence removed spurious tests).
2019-06-12 18:41:13 +01:00
Cosimo Lupo
c98b71af5c
woff2: add support for unstransformed glyf and loca tables
...
Fixes https://github.com/fonttools/fonttools/issues/1636
2019-06-11 15:12:27 +01:00
Cosimo Lupo
ff473515a2
g_l_y_f: use '==' instead of 'is' for comparing equality with int literals
2019-06-04 16:16:31 +01:00
Cosimo Lupo
e2c0acf1c2
Merge remote-tracking branch 'origin/master' into partial-instancer
2019-05-29 18:04:54 +01:00
schriftgestalt
47f8d06d9a
fix sign of fsType
2019-05-23 17:40:01 +02:00
Cosimo Lupo
27a8ba480d
Merge remote-tracking branch 'origin/master' into partial-instancer
2019-05-15 13:09:19 -04:00