4256 Commits

Author SHA1 Message Date
Khaled Hosny
6cb0a56020 [cffLib] Make sure glyph names are unique
Similar to what we do with “post” table names. I’d have said the font is
broken, but all applications I tried it with loaded it just fine, though
they differed in which glyph to pick from the duplicate ones.

Fixes https://github.com/fonttools/fonttools/issues/1602
2019-08-17 12:51:31 +02: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
Cosimo Lupo
38a8eb0e34
varLib.models: fix KeyError when no on-axis points while sorting masters
E.g. when trying to model/plot an unusual designspace like: fonttools varLib.plot 0,0 -1,-1 1,-1 -1,1 1,1
2019-08-12 12:59:45 +02:00
Nikolaus Waxweiler
0f3eaca219 models.py: minor lint fix 2019-08-10 22:20:24 +01:00
Nikolaus Waxweiler
68a5ceac6d varLib: Remove py23 imports 2019-08-10 15:39:02 +01:00
Cosimo Lupo
0354a4d4c6
Bump version: 3.44.1.dev0 → 4.0.0.dev0 2019-08-09 13:22:08 +01:00
Nikolaus Waxweiler
01328213c7 Remove __future__ imports 2019-08-09 12:20:13 +01:00
Nikolaus Waxweiler
ab45b3b0c1 Pare down py23 module to Python 3 symbols only, deprecate 2019-08-09 11:30:39 +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
Nikolaus Waxweiler
0b9ad5ab80 Add a default InstanceDescriptor.font attribute 2019-08-02 13:40:15 +01:00
Cosimo Lupo
bcba6abce5
Bump version: 3.44.0 → 3.44.1.dev0 2019-08-02 11:41:09 +01:00
Cosimo Lupo
04da40e226
Release 3.44.0 2019-08-02 11:41:08 +01:00
Khaled Hosny
71ea0cbe07
Merge pull request #1677 from fonttools/fdselct-format-4
[cffLib] Support FDSselect format 4
2019-08-02 01:05:27 +02:00
Miguel Sousa
43a55050f2
Merge pull request #1669 from fonttools/cff2-fixes
[cffLib specializer] Fix bug in programToCommands with CFF2 charstrings
2019-08-01 13:25:59 -07:00
Khaled Hosny
ad4bb343fc [cffLib] Support FDSselect format 4
Introduced in CFF2 table, but code does not limit it to CFF2 table. If
FDSelect format is set to 4, it will be read/written regardless of the
table version.
2019-08-01 21:28:46 +02:00
Khaled Hosny
97b61b6b1f
Merge pull request #1674 from fonttools/subset-sbix
[subset] Support sbix table
2019-08-01 10:29:18 +02:00
Bailey Parker
e9802c50bb
Fixes style 2019-08-01 01:08:25 -04:00
Bailey Parker
6f4e44f13d
Fixes #1675 - T1 eexec end finding spec compliance
The T1 spec (https://www-cdf.fnal.gov/offline/PostScript/T1_SPEC.PDF) on
page 14 says that:

> The text encrypted by eexec must be followed by 512 ASCII zeros. There may be
> white space characters (blank, tab, carriage return or line feed)
> interspersed among these zeros.

  * Add a failing test case with white space characters interspersed
    among the trailing zeros after the eexec

  * Fix eexec end finding so that it passes this new test case
2019-08-01 00:02:12 -04:00
Khaled Hosny
4db8cb237f [subset] Support sbix table
Test font is a subset of:
https://github.com/djrrb/Bungee/blob/master/fonts/Bungee_Color_Fonts/BungeeColor-Regular_sbix_MacOS.ttf
2019-08-01 01:52:38 +02:00
Cosimo Lupo
7ffd6a3d0f
instancer: minor changes following Evan's review 2019-07-31 16:31:38 +01:00
Cosimo Lupo
5455517689
Merge remote-tracking branch 'origin/master' into partial-instancer 2019-07-31 15:22:48 +01:00
Read Roberts
4ee5e6da16 [cffLib specializer] Fix bug in programToCommands with CFF2 charstrings
When checking if there was an initial width argument, old logic did not correctly sum the number of blend and non-blend arguments before the first hint or moveto operator.

Added test case. Old logic dropped the arguments for the hmoveto in the last glyph.
2019-07-30 20:25:38 -07:00
Cosimo Lupo
b59ac7f13e
Revert "Merge pull request #1671 from anthrotype/varlib-single-master-vf"
This reverts commit f3c99cfef211336a9c6921552462ee1661fbcede, reversing
changes made to 1dcb3c2bde86e9977bb384046e594e35ecd18796.
2019-07-29 10:45:25 +01:00
Cosimo Lupo
a5ed37f262
varLib: don't build empty HVAR or gvar tables
Fixes https://github.com/fonttools/fonttools/issues/1670
2019-07-26 13:21:17 +01:00
justvanrossum
faadb91c8b remove leftover comma, should fix #1666 2019-07-22 15:53:42 +02:00
Medhat Assaad
caa78e1c25
- make otf and ttf sample match as much as possible 2019-07-19 19:37:08 -05:00
Medhat Assaad
9a43ca89bc
add usWinAscent and usWinDescent values to the OS/2 table when creating a ttf 2019-07-17 05:10:13 -05:00
Medhat Assaad
2aba7f6e14
fix the glyph name for space to match the name in the AGL 2019-07-13 08:53:15 -05:00
Medhat Assaad
f51c1145df
make the ttf sample pass FontValidator
I used FontValidator to validate the ttf font. I made some changes to address the errors. Now it passes, but still trying to preview the font in windows raises the same error.
2019-07-13 08:37:47 -05:00
Medhat Assaad
56c1a32744
make the otf minimal example work on windows 10 2019-07-11 07:35:26 -05:00
Cosimo Lupo
506965db6e
Bump version: 3.43.2 → 3.43.3.dev0 2019-07-10 14:05:30 +01:00
Cosimo Lupo
251676bccf
Release 3.43.2 2019-07-10 14:05:30 +01:00
Behdad Esfahbod
84b9e9c387 [varLib.featureVars] Fix region-merging code on Py3
We should clean up all the various "convert dict to tuple" duplicated
code, but this fixes it for now.  doctest updated.

Fixes https://github.com/fonttools/fonttools/issues/1659
2019-07-09 16:14:01 -07:00
Miguel Sousa
e1f0d1ae09 varLib CFF fixes (#1653)
* varLib.cff: Apply conv_to_int() to all the values

* varLib: Don't hardcode file extension to 'ttf'

Also remove unused imports

* varLib.cff: Fix merging of sparse PrivateDict items

Fixes #1651
2019-06-24 17:10:36 -07:00
Cosimo Lupo
e6b8897f18
instancer: reuse varLib.set_default_weight_width_slant function 2019-06-20 15:09:17 +01:00
Cosimo Lupo
1726a4a1fc
Merge remote-tracking branch 'origin/master' into partial-instancer 2019-06-20 15:05:34 +01:00
Cosimo Lupo
1122a2612b
varLib: add set_default_weight_width_slant
When building a variable font, varLib.build must make sure that
the OS/2.usWeightClass is equal to the wght axis default location,
that the OS/2.usWidthClass is set to the equivalent value (1-9) of
the wdth axis default location, and finally that post.italicAngle
is set to the same default value as slnt axis.

Sometimes the base master doesn't have these values correctly
set leading to discrepancies between OS/2 and post, on the one
hand, and the fvar axes' default values.
2019-06-20 12:23:33 +01:00
Cosimo Lupo
76489788d6
Bump version: 3.43.1 → 3.43.2.dev0 2019-06-19 12:23:22 +01:00
Cosimo Lupo
9c9cd233d6
Release 3.43.1 2019-06-19 12:23:21 +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
f07cd0a300
Bump version: 3.43.0 → 3.43.1.dev0 2019-06-18 18:34:38 +01:00
Cosimo Lupo
fce0f25d6c
Release 3.43.0 2019-06-18 18:34:37 +01:00
Cosimo Lupo
4e4f37aa21
varLib.merger: use dict comprehension and zip iterator 2019-06-18 16:30:24 +01:00
Cosimo Lupo
d6c2ea79b6
varLib.merger: simplify if-stmt logic a bit
isPairPos and isSinglePos are mutually exclusive and isSinglePos is only defined if isPairPos is False
so it is safe to use it in 'else' or 'elif' branches (logical expressions short-circuit)
2019-06-18 16:21:33 +01:00
Cosimo Lupo
def6310f4a
varLib.merger: when flattening singlepos, copy valuerecords
to avoid modifying original master fonts' SinglePos tables

https://github.com/fonttools/fonttools/pull/1641/files#r293302141
2019-06-18 16:10:46 +01:00
Cosimo Lupo
7f82d11156
otlLib: return namedtuple from _makeDeviceTuple
makes code slightly more readable.
2019-06-18 16:00:39 +01:00
Cosimo Lupo
8c90878fcf
Merge remote-tracking branch 'origin/master' into fix-singlepos-merge 2019-06-18 15:38:10 +01:00