6819 Commits

Author SHA1 Message Date
Cosimo Lupo
9208db110c
Bump version: 3.41.2 → 3.41.3.dev0 2019-05-13 13:29:19 +01:00
Cosimo Lupo
70357530ff
Release 3.41.2 2019-05-13 13:29:18 +01:00
Cosimo Lupo
650e3617d3
Update changelog [ci skip] 2019-05-13 13:29:06 +01:00
Cosimo Lupo
3270c304c8
Merge pull request #1609 from anthrotype/varlib-cff-post-2
varLib: keep CFF2 glyph names in post format2 table
2019-05-13 13:23:13 +01:00
Cosimo Lupo
8e8d628852
Update changelog [ci skip] 2019-05-13 13:16:18 +01:00
Cosimo Lupo
6b297076a4
varLib_test: update test TTX so they keep glyph names 2019-05-13 13:12:46 +01:00
Cosimo Lupo
71574fa100
varLib: keep CFF2 glyph names in post format2 table 2019-05-13 13:10:57 +01:00
Cosimo Lupo
96c81ebd8a
Merge pull request #1598 from fonttools/update-OTF-testfonts
Convert OTF font files in test data to ttx files.
2019-05-13 13:09:37 +01:00
Cosimo Lupo
9e369fa86f
remove unused method in specializer_test and debug prints 2019-05-13 13:00:24 +01:00
Cosimo Lupo
1fd331b351
Bump version: 3.41.1 → 3.41.2.dev0 2019-05-13 10:22:35 +01:00
Cosimo Lupo
e529b13f0a
Release 3.41.1 2019-05-13 10:22:34 +01:00
Cosimo Lupo
2a820a2d16
Update changelog 2019-05-13 10:20:07 +01:00
Cosimo Lupo
4872c02b32
Merge pull request #1601 from fonttools/pyup-scheduled-update-2019-05-06
Scheduled weekly dependency update for week 18
2019-05-13 10:08:16 +01:00
Cosimo Lupo
df4eb568de
Merge pull request #1606 from anthrotype/dslib-load-source-fonts
designspaceLib: add loadSourceFonts method with custom opener
2019-05-11 10:33:37 +01:00
Cosimo Lupo
175399ecbc
designspaceLib: add examples to loadSourceFonts docstring 2019-05-10 18:43:42 +01:00
Cosimo Lupo
338793d055
varLib: use DesignSpaceDocument.loadSourceFonts method to load masters
we still need to check if source have 'layerName' set before loading from path
since that attribute only makes sense for UFOs, not TTFonts.
2019-05-10 16:34:18 +01:00
Cosimo Lupo
44f74dc8bb
designspaceLib: add loadSourceFonts method with custom opener
Allows to load the SourceDescriptor.font attribute from its path, using a custom callable (e.g. defcon.Font or ttLib.TTFont, etc.).
2019-05-10 16:32:11 +01:00
Cosimo Lupo
85c3f85526
Merge pull request #1605 from editkid/fix/ttlib-bbox-rounding
Fix: ttLib _h_e_a_d FontBBox rounding
2019-05-09 13:56:32 +01:00
editkid
9f4fcfeee5 Improve README text wrap 2019-05-09 23:27:32 +12:00
editkid
7f145be901 Add name to README 2019-05-09 23:18:51 +12:00
editkid
742ed88b07 Apply intRect to FontBBox to prevent type error 2019-05-09 23:13:15 +12:00
pyup-bot
c2b34737be Update fs from 2.4.4 to 2.4.5 2019-05-06 16:33:06 +01:00
Cosimo Lupo
ffc98baa0f
Merge pull request #1600 from silnrsi/bugfix1
Minor fixlet for Sill table
2019-05-03 10:34:08 +01:00
Martin Hosken
ad60ce80a9 Minor fixlet for Sill table 2019-05-03 16:27:13 +07:00
Khaled Hosny
dadec23978
Merge pull request #1599 from khaledhosny/fealib-valuerecord-asfea
[feaLib] don’t write None in ast.ValueRecord.asFea()
2019-05-03 11:20:33 +02:00
Khaled Hosny
887ea22a34
Merge pull request #1594 from fonttools/fix-subsetter-cff2-issue
Fix bug in subsetting T2 CharStrings from CFF font, issue 1590
2019-05-03 01:34:53 +02:00
Khaled Hosny
b1999a1a0e Add test for previous commit 2019-05-03 01:14:09 +02:00
Khaled Hosny
41c7760be3 [feaLib] don’t write None in ast.ValueRecord.asFea()
The code tries to write the short format when some values as None, but
when writing the long format it would write any None value as is which
is invalid, use 0 for None values instead.
2019-05-03 00:53:09 +02:00
ReadRoberts
77f72bc62b Convert OTF font files in test data to ttx files.
This required a fix to fontTools/cffLib. When reading a CFF2 variable font (VF) from XML, the VF state in FontDict and PrivateDict does not get set. I made a temporary fix by adding a loop to set PrivateDict.vstore for all the PrivateDict objects after the XML file has been read. This should not be necessary, and in the near future I will revisit both this issue, and the related use of isCFF2 when compiling/decompiling.
2019-05-01 16:01:43 -07:00
Cosimo Lupo
465d85d3d6
Merge pull request #1597 from silnrsi/bugfix5
Fix unmasked bug from previous typo fix
2019-05-01 18:02:54 +02:00
Martin Hosken
2e7b021237 Fix unmasked bug from previous typo fix 2019-05-01 22:28:05 +07:00
ReadRoberts
dbcdde1bee Fix bug in subsetting T2 CharStrings from CFF font. The logic seeks to avoid unnecessarily executing subroutines that have already been subroutinized. It is necessary execute all subroutines when counting hints in order to determine the byte length of mask arguments, but we want to quit doing this when we know that counting hints is no longer necessary,. The previous logic stopped when a [vh]stem operator was seen, as this means there will not be need for hintmask mask arguments However, the [vh]stem operators can be used even when there is a cntrmask, so the logic stopped counting hints too early. 2019-04-30 09:43:13 -07:00
Cosimo Lupo
06e44e8503
Bump version: 3.41.0 → 3.41.1.dev0 2019-04-29 12:41:26 +02:00
Cosimo Lupo
1db1cdb4c7
Release 3.41.0 2019-04-29 12:41:25 +02:00
Cosimo Lupo
ba70056dac
Update changelog [skip ci] 2019-04-29 12:39:12 +02:00
Read Roberts
5b3db36670
Sparse cff2vf support (#1591)
* Added getter (in the form of a property decorator) for T2Charstring.vsindex. Fixes endless compile loop in some circumstances.

Fixed bug in mutator: need to remove vsindex from snapshotted charstrings, plus formatting clean up

* Fix for subsetting HVAR tables that have an AdvanceWidthMap when the --retain-gid option is used. Needed to make subset_test.py::test_retain_gids_cff2 tests pass.

* in varLib/cffLib.py, add support for sparse sources, and sources with more than one model, and hence more than one VarData element in the VarStore.

CFF2 source fonts with multiple FontDicts in the FDArray need some extra work. With sparse fonts, some of the source fonts may have a fewer FontDicts than the default font. The getfd_map function() builds a map from the FontDict indices in the default font to those in each region font. This is needed when building up the blend value lists in the master font FontDict PrivateDicts, in order to fetch PrivateDict values from the correct FontDict in each region font.

In specializer.py, add support for CFF2 CharStrings with blend operators. 1) In generalizeCommands, convert a blend op to a list of args that are blend lists for the following regular operator. A blend list as a default font value, followed by the delta tuple. 2) In specializeCommands(), convert these back to blend ops, combining as many successive blend lists as allowed by the stack limit.

Add test case for sparse CFF2 sources.
The test font has 55 glyphs. 2 glyphs use only 2 sources (weight = 0 and 100). The rest use 4 source fonts: the two end points of the weight axis, and two intermediate masters. The intermediate masters are only 1 design space unit apart, and are used to change glyph design at the point in design space. For the rest, at most 2 glyphs use the same set of source fonts. There are 12 source fonts.

Add test case for specializer programToCommands() and commandsToProgram by converting each CharString.program in the font to a command list, and back again, and comparing original and final versions.
2019-04-26 09:33:52 -07:00
Miguel Sousa
9cbfef1972
Merge pull request #1588 from fonttools/hvar-vvar-retain-gids
[subset] HVAR/VVAR with --retain-gids
2019-04-26 06:55:17 -07:00
Miguel Sousa
6edf6257e6
Merge pull request #1582 from fonttools/max_ctx_recalc
(Re)calculate OS/2.usMaxContext value
2019-04-26 06:52:32 -07:00
Miguel Sousa
45596108e2 (Re)calculate OS/2.usMaxContext value
The value is only modified in the context of fontBuilder or subset. It will NOT be modified when using ttx.

maxContextCalc.py was copied from https://github.com/googlefonts/ufo2ft/blob/master/Lib/ufo2ft/maxContextCalc.py

Fixes #1191
Fixes #466
2019-04-24 18:31:12 -07:00
Michiharu Ariza
00dddb1c32 fixed non retain-gids with no AdvWidthMap behavior
deltas in VarData[0] are directly look up by GID so compacted
if any deltas are referenced by LsbMap / RsbMap but not used for advance widths, they are moved to the end of VarData[0]

updated expected test result expect_HVVAR.ttx accordingly
2019-04-24 16:46:21 -07:00
Michiharu Ariza
6ca384fecd tweaks reflecting review 2019-04-24 09:26:17 -07:00
Michiharu Ariza
f028c75d2a issue #1587: AdvWidthMap null with Lsb/RsbMaps non-null
along with tests
2019-04-23 17:03:04 -07:00
Cosimo Lupo
eb49e464a2
Merge pull request #1586 from silnrsi/bugfix4
Fix typo in silf table
2019-04-23 18:43:15 +02:00
Michiharu Ariza
12d1b053f7 renaming 2019-04-23 09:28:03 -07:00
Martin Hosken
5a97d0ace2 Fix typo in silf table 2019-04-23 23:24:25 +07:00
Michiharu Ariza
5e1dea329b subset HVAR/VVAR with retain-gids
1. if AdvWidthMap/AdvHeightMap missing, deltas for unused (emptied) glyphs are zeroed
2. If indexMap exists and unused glyph ID <= last used glyph ID, then its major/minor number set to 0/0
3. If indexMap exists and unused glyph ID > last used glyph ID, then its major/minor number set to that of the last used glyph (removed from table)
2019-04-22 16:56:01 -07:00
Cosimo Lupo
5a7fe0556f
otTables: set CompCount in LigatureSubst.fromXML
https://github.com/fonttools/fonttools/issues/1584#issuecomment-485140779
2019-04-20 17:45:38 +01:00
Cosimo Lupo
71812bbb29
otBase: call populateDefaults() in BaseTTXConverter.fromXML
https://github.com/fonttools/fonttools/issues/1584

This will initialise to None all the missing fields for top-level OT tables like GPOS or GSUB after importing fromXML
2019-04-20 17:44:47 +01:00
Behdad Esfahbod
01363db545 [varLib] Remove unused member 2019-04-16 18:04:17 -04:00
Cosimo Lupo
b1d055b133
Merge pull request #1539 from silnrsi/bugfix3
Compress type 1 GPOS tables better
2019-04-15 09:34:37 +01:00