3536 Commits

Author SHA1 Message Date
Cosimo Lupo
8991f2c097
Merge pull request #1300 from anthrotype/explicit-subtable-break
support explicit "subtable" breaks in kerning lookups
2018-07-25 11:58:26 +01:00
Cosimo Lupo
3734b6c036
cffLib/specializer: minor; use < instead of <= maxstack - 1 2018-07-25 11:56:32 +01:00
Kunihiko Sakamoto
41a21cce27 [cffLib.specializer] Leave 1 stack free area for subroutinizer use 2018-07-25 17:29:27 +09:00
Cosimo Lupo
9456ae9485
feaLib: support explicit 'subtable' statements in PairPos lookups
Fixes https://github.com/fonttools/fonttools/issues/1279
2018-07-24 17:13:52 +01:00
Cosimo Lupo
d3229d5777
feaLib: ensure languagesystems using 'DFLT' script tag precede all others
https://github.com/fonttools/fonttools/pull/1292#issuecomment-407427544

this is to match makeotf's behavior

https://github.com/adobe-type-tools/afdko/pull/498/files#diff-17824930b3cdfb707ae56e1f42bccec6R2305
2018-07-24 16:17:23 +01:00
Cosimo Lupo
1740d18584
Merge pull request #1292 from silnrsi/bugfix2
More depths to allowing languages in DFLT
2018-07-24 15:24:50 +01:00
Cosimo Lupo
248ae41e9d
loggingTools: fix CapturingLogHandler to work with py37
we can't set the logger.level directly because in py37 the logger has a _cache
attribute and that needs to be invalidated by calling setLevel method.

also, I noticed we weren't restoring the original 'disabled' attribute value...

And we need to also set/restore the 'propagate' attribute.
2018-07-24 12:17:59 +01:00
Cosimo Lupo
5a1ccf1640
Merge pull request #1297 from anthrotype/fix-mark-base-overflow
atttempt to fix offset overflows in MarkBasePos subtables
2018-07-23 12:58:39 +01:00
Cosimo Lupo
d7ac0ad359
subset: write default file extension based on --flavor or sfntVersion
Fixes https://github.com/fonttools/fonttools/issues/1298
2018-07-21 18:28:33 +01:00
Cosimo Lupo
6e8e431dee
otTables: try to fix MarkBasePos subtable overflows
Fixes https://github.com/googlei18n/fontmake/issues/450
2018-07-19 17:52:00 +01:00
Cosimo Lupo
2798bf6d1f
otTables: print subtable type when can't split in fixSubTableOverFlows 2018-07-19 17:50:43 +01:00
Cosimo Lupo
a526b7170c
tests: fix expected results after Unicode 11 update
fixes https://github.com/fonttools/fonttools/issues/1291
2018-07-12 11:35:16 +01:00
Cosimo Lupo
452c85ecef
Update Blocks, Scripts and ScriptExtensions for Unicode 11
I run: python3 MetaTools/buildUCD.py
2018-07-12 11:35:16 +01:00
Martin Hosken
d5a1e5257e Simplify code for language statement 2018-07-09 21:10:46 +01:00
Martin Hosken
d76f447775 More depths to allowing languages in DFLT 2018-07-09 16:41:54 +01:00
Miguel Sousa
523c31dd0b Add context manager to XMLWriter
93103c08ca (r29633076)
2018-07-08 22:12:44 -07: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
bgermann
d438f15118
Add missing import 2018-06-28 14:07:14 +02: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
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
dbe08a62ad
mutator: set usWeightClass, usWidthClass and italicAngle
https://github.com/fonttools/fonttools/issues/1264
2018-06-18 19:40:30 +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
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
Denis Moyogo Jacquerye
b3edba70e9 [feaLib] implement SubtableStatement.asFea() 2018-06-15 10:53:38 +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
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
Cosimo Lupo
c4950ecc8b
py23: add 'zip' (alias to izip in py2) to __all__ 2018-06-12 17:29:10 +01:00
Behdad Esfahbod
2e28fa4a31 [subset] Remove activeLookup tracking during GSUB closure
The memoize handles this as well...

This alone contributes a 10% speedup to the closure op.
2018-06-12 01:01:41 -04:00
Behdad Esfahbod
a856e83112 [subset] Another improvement to GSUB closure algorithm
Save number of subset-glyphs each lookup was closed at, and don't redo work
if number didn't change.  10% speedup with NotoNastaliqUrdu-Regular.
2018-06-11 23:53:22 -04:00
Behdad Esfahbod
40ca30a82b [subset] Improve GSUB closure memoize algorithm
Instead of memoizing the tuple of <lookup-idx,current-glyphs>, use a mapping of
lookup-idx->current-glyphs instead. Saves some work. Speeds up 5%ish on
NotoNastaliqUrdu-Regular.
2018-06-11 23:46:42 -04:00
Cosimo Lupo
1eddd0dcd2
Bump version: 3.27.1 → 3.27.2.dev0 2018-06-11 19:37:29 +01:00
Cosimo Lupo
05c3a6f44a
Release 3.27.1 2018-06-11 19:37:28 +01:00
Cosimo Lupo
79449bc2d4
ttGlyphPen: always skip non-existing components
It doesn't make sense to add components that reference non-existing base glyphs
(ie. glyphs not in the input glyphSet, hence missing from the generated glyf table).
Even if we let them in here, it will fail immediately as soon as we attempt to
compile this glyf table containing 'dangling' component references.
Better to warn and skip.
2018-06-11 19:25:15 +01:00
Cosimo Lupo
ae69133924
ttGlyphPen: gracefully handle missing components while decomposing 2018-06-11 18:40:11 +01:00
Cosimo Lupo
bf87025826
designspaceLib: fix formatting of DesigSpaceError exception
https://travis-ci.org/googlei18n/fontmake/jobs/390821469#L498
2018-06-11 16:35:02 +01:00
Cosimo Lupo
bf5c3a42c6
Bump version: 3.27.0 → 3.27.1.dev0 2018-06-11 14:05:04 +01:00
Cosimo Lupo
4cfb4f8389
Release 3.27.0 2018-06-11 14:05:03 +01:00
Cosimo Lupo
e35151a051
Merge remote-tracking branch 'origin/master' into add-feature-variations 2018-06-11 12:49:31 +01:00