6257 Commits

Author SHA1 Message Date
Ben Kiel
acf8e83d33 Bump version: 2.1.2.dev0 → 2.2.0.dev0 2018-07-03 10:35:27 -05:00
Tal Leming
60b54c14af
Merge pull request #153 from unified-font-object/validation_optional
Validation optional
2018-07-03 11:27:00 -04:00
Ben Kiel
55f131d42a
Merge pull request #152 from unified-font-object/master
Syncing with master
2018-06-30 13:38:16 -05:00
Ben Kiel
fe88d1d83d
Merge branch 'validation_optional' into master 2018-06-30 13:37:51 -05:00
Miguel Sousa
8d7774a3e8 [pscharstrings] Optimize the charstring's bytecode
by encoding as integers all float values that have no decimal portion.

This optimization is expected to reduce the file size of CFF2 fonts that have intermediate masters.

Related to https://github.com/adobe-type-tools/afdko/issues/444

Many thanks to @cjchapman for the help on the fixed point math
2018-06-29 09:54:00 -07:00
Cosimo Lupo
ad597a49b4
Merge pull request #1285 from bgermann/master
Add missing import
2018-06-28 13:21:34 +01:00
bgermann
d438f15118
Add missing import 2018-06-28 14:07:14 +02:00
Ben Kiel
17c8d2c31e
Merge pull request #151 from unified-font-object/pyup-scheduled-update-2018-06-25
Scheduled weekly dependency update for week 25
2018-06-26 09:28:36 -05:00
pyup-bot
bf282c8c6d Update fonttools from 3.27.0 to 3.28.0 2018-06-25 18:59:06 +01:00
Cosimo Lupo
a2622d7222
Merge pull request #1278 from silnrsi/bugfix2
Allow any languages under DFLT script
2018-06-20 11:30:06 +01:00
Martin Hosken
29d67a90c5 Update tests to not require removed assertion 2018-06-20 09:57:07 +01:00
Martin Hosken
1ae0bf87a0 Allow any languages under DFLT script 2018-06-20 09:42:46 +01:00
Cosimo Lupo
f251c8d665
Bump version: 3.28.0 → 3.28.1.dev0 2018-06-19 17:30:35 +01:00
Cosimo Lupo
37ed01cb4f
Release 3.28.0 2018-06-19 17:30:34 +01:00
Cosimo Lupo
15b2bd4dd9
Update changelog 2018-06-19 17:30:13 +01:00
Cosimo Lupo
4c0dbd1515
Merge pull request #1276 from anthrotype/mutator-wght-wdth-slnt
WIP [mutator] set usWeightClass, usWidthClass and italicAngle
2018-06-19 17:23:56 +01:00
Cosimo Lupo
d9d30c819a
loggingTools: move here the LastResortLogger from py23
and add a small test
2018-06-19 16:54:50 +01:00
Cosimo Lupo
e6a5db543d
py23: don't automatically set logging.lastResort handler on py27
To avoid the 'No handlers could be fonud' message, from now on, one should always
configure logging in one's scripts or applications.

logging.basicConfig, or fontTools.configLogger (with some predefined defaults
useful for fonttools scripts) can be used to quickly configure logging.
Read the python docs for more advanced logging usage.
2018-06-19 15:35:28 +01:00
Cosimo Lupo
8c597b5375
mutator: round to closest width class
this is the mapping between the half of each percentage intervals and
the associated usWidthClass:

{56.25: 1,
 68.75: 2,
 81.25: 3,
 93.75: 4,
 106.25: 5,
 118.75: 6,
 137.5: 7,
 175.0: 8}

Notice how wdth=80 (in the adjusted test case) will fall in width class
3, instead of 4, because it is < 81.25, thus closer to the nominal 75
than to 87.5.
2018-06-19 14:16:17 +01:00
Cosimo Lupo
0234b9dbd5
mutator: also clamp usWeightClass between valid 1...1000 2018-06-18 19:45:20 +01:00
Cosimo Lupo
8fcbf78d8b
Tests: adjust expected usWeightClass and usWidthClass 2018-06-18 19:41:03 +01:00
Cosimo Lupo
dbe08a62ad
mutator: set usWeightClass, usWidthClass and italicAngle
https://github.com/fonttools/fonttools/issues/1264
2018-06-18 19:40:30 +01:00
Cosimo Lupo
b2d47132bf
Update changelog
[ci skip]
2018-06-18 15:16:31 +01:00
Cosimo Lupo
e94cd9f373
Merge pull request #1275 from moyogo/feaLib-subtable
[feaLib] asFea() shouldn’t fail when `subtable` is used
2018-06-18 15:14:38 +01:00
Cosimo Lupo
82bb498647
Update changelog
[ci skip]
2018-06-18 12:33:00 +01:00
Behdad Esfahbod
a3a25e09b2 [varLib.models] Rename variables for clarity 2018-06-17 18:47:53 -04:00
Behdad Esfahbod
09ae567070 [varLibs.models] Another fix
Though, the previous work was also working; the bug couldn't be hit.
2018-06-16 14:17:44 -04:00
Behdad Esfahbod
1801248938 [varLib.models] Fix model resolution
Oops.  Was introduced when I last changed modeling.

The problem was, for checking that a previous master m is outside the current
influence box of the current master, I was doing "not (lower < m[loc] < upper)".
This is wrong, where lower,peak,upper is the support of previous master.
This fails if lower == peak == m[loc], or m[loc] == peak == upper.

Fixes https://github.com/fonttools/fonttools/issues/1269#issuecomment-397655016
2018-06-16 14:07:18 -04:00
Behdad Esfahbod
be9a304dc4 [varLib.models] Allow solving for a .designspace doc from cmdline
Like varLib.plot does.
2018-06-16 13:53:56 -04:00
Cosimo Lupo
867a6b0c28
Merge pull request #1274 from anthrotype/otRound
add otRound func to round floats to integer towards +Infinity
2018-06-15 11:26:30 +01:00
Denis Moyogo Jacquerye
632192804f Add PairPosSubtable test 2018-06-15 11:10:49 +01:00
Denis Moyogo Jacquerye
b3edba70e9 [feaLib] implement SubtableStatement.asFea() 2018-06-15 10:53:38 +01:00
Tal Leming
1d6dddc8f5 Unneeded import. 2018-06-14 13:34:19 -04:00
Tal Leming
c008e20854 Use lxml for reading. 2018-06-14 13:28:20 -04:00
Cosimo Lupo
0337fc92fc
Tests: adjust to use new otRound function 2018-06-14 17:49:37 +01:00
Cosimo Lupo
d570fc038a
use otRound when rounding visual coordinates or deltas
So we now round towards +Infinity in:

- floatToFixed (which fully examplify that quotes from OT spec)
- psCharStrings: when packing floats as fixed 16.16
- t2CharStringPen: when rounding coordinates and advance widths
- subset: when rounding advance widths to compute average
- TupleVariation: rounding gvar deltas
- _g_l_y_f: when rounding coordinates: both in GlyphComponent.{x,y}
  and for GlyphCoordinates.toInt()
- _h_m_t_x: for rounding horiz/vert metrics
- varLib: rounding horiz metrics and deltas
2018-06-14 17:40:11 +01:00
Cosimo Lupo
585b87023f
fixedTools: add otRound to round floats to nearest int towards +Infinity
https://github.com/fonttools/fonttools/issues/1248
2018-06-14 17:15:47 +01:00
Tal Leming
5ec6b5ef65 Use len(element). 2018-06-14 11:55:54 -04:00
Tal Leming
dab4800f12 Add indentation to the self-closing prevention. 2018-06-14 10:59:51 -04:00
Cosimo Lupo
e75d6a8ca1
[varLib.models] add assertion debug message
Fixes #1268
2018-06-14 15:34:27 +01:00
Cosimo Lupo
03c57a0f5f
Merge pull request #1240 from fonttools/add-feature-variations
[varLib] Add Feature Variations
2018-06-14 15:25:30 +01:00
Cosimo Lupo
6e9a24b45b
featureVars: mark module as experimental/subject-to-change 2018-06-14 15:25:09 +01:00
Ben Kiel
e9df5bec13 fix writing lib with lxml 2018-06-14 09:22:24 -05:00
Tal Leming
5f39650425 Write the note the old way. 2018-06-14 08:43:30 -04:00
Tal Leming
4c52a516f4 Height before width. 2018-06-14 08:39:53 -04:00
Tal Leming
3cfb942441 Trick lxml into not writing self-closing tags for outline and contour elements. 2018-06-14 08:36:52 -04:00
Ben Kiel
3ae4f10092 Make attrs OrderedDicts
Get encoding right for py2 and py3
2018-06-14 00:31:29 -05:00
Tal Leming
213b90a4ba Found some attrib type errors. 2018-06-13 21:34:41 -04:00
Ben Kiel
c8608c2fd7 Need to pass an OrderedDict to get correct order. 2018-06-13 16:42:33 -05:00
Ben Kiel
c54c54b2ce Remove slice from splitlines that isn't needed for lxml 2018-06-13 16:22:40 -05:00