40 Commits

Author SHA1 Message Date
Khaled Hosny
323d0c85d1 fontBuilder: Allow varLib to use fresh CFF table
Make sure the CFF table generated by fontBuilder can be used by varLib
without having to compile and decompile the table first. This was
breaking in converting the CFF table to CFF2 due to some unset
attributes.
2020-02-22 13:51:45 +02:00
Cosimo Lupo
d9250ddcf5
fontBuilder: allow to build v1 from setupCPAL method 2020-02-17 18:35:15 +00:00
Cosimo Lupo
f8b9887f85
fontBuilder: add setupCOLR and setupCPAL methods 2020-02-17 12:11:52 +00:00
Khaled Hosny
366c08a9d6 [varLib, fontBuilder] Set Private.vstore as well
Otherwise T2OutlineExtractor.op_blend() would raise and exception unless
the font is saved and loaded again.
2020-01-31 23:39:47 +02:00
Cosimo Lupo
e821f1fb9e
fontBuilder: add FontBuilder.addFeatureVariations method
like the existing addOpenTypeFeatures
it simply forwards to featureVars.addFeatureVariations
2019-12-12 11:55:13 +00:00
Nikolaus Waxweiler
01328213c7 Remove __future__ imports 2019-08-09 12:20:13 +01: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
Miguel Sousa
9fb0cac564 fontBuilder: Don't add a stub signature to DSIG
An empty DSIG is enough to make MS applications happy and also fixes an error reported by MS Font Validator
2019-05-25 10:09:13 -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
Miguel Sousa
86cea23de3 Un-hardcode the CFF glyph's left side bearing 2019-04-01 21:25:27 -07:00
Miguel Sousa
b0710b829b [fontBuilder] Enable making CFF2 fonts with 'post' table format 2
Before this change all OTFs wound up with 'post' table format 3
2019-04-01 21:09:21 -07:00
justvanrossum
55ea94efbb swapped two sections for clarity 2019-01-09 14:59:00 +01:00
justvanrossum
391f7a76c0 added support for cmap format 14 Unicode Variation Sequences 2019-01-09 14:53:35 +01:00
Cosimo Lupo
68e918d32b
fontBuilder: add options to setupNameTable to disable Mac (or Win) names
as of https://github.com/fonttools/fonttools/pull/1359, both sets of names are added by
default. This allows users to optionally exclude Macintosh platform names (i.e. mac=False).
2019-01-07 10:46:48 +00:00
justvanrossum
2b7656550d [fontBuilder] More varLib.builder leverage 2018-12-06 18:30:09 +01:00
justvanrossum
7d64d30037 fixed typo in var name 2018-12-05 15:10:54 +01:00
justvanrossum
c3fa7de615 cosmetic change 2018-12-05 15:07:58 +01:00
justvanrossum
874c08dcd2 CFF: set FontMatrix based on unitsPerEm automatically, unless manually overridden 2018-12-05 15:07:20 +01:00
justvanrossum
9d73327f3b Some support for CFF2 2018-12-05 13:51:42 +01:00
justvanrossum
8298169dfb at least set these ascent/descent values in the example 2018-11-01 21:33:56 +01:00
justvanrossum
beaf0432a9 added many docstrings, and added setupHorizontalMetrics and setupVerticalMetrics methods to replace setupMetrics 2018-11-01 20:30:21 +01:00
justvanrossum
25f29841b7 rename setupDSIG to setupDummyDSIG and added a doc string to clarify the legacy status of this 2018-11-01 13:19:27 +01:00
justvanrossum
8d2615e9c8 document the required setup method call order 2018-11-01 12:37:37 +01:00
justvanrossum
723afd626d mark module as experimental 2018-11-01 12:32:17 +01:00
justvanrossum
3e051f582e added a note about the order of setup method calls 2018-11-01 12:21:38 +01:00
justvanrossum
7a084bd016 added assert message, fixed DSIG issue 2018-11-01 12:13:35 +01:00
justvanrossum
a81bcbf8a2 remove redundant method call 2018-11-01 12:08:20 +01:00
justvanrossum
277c7da951 added __all__ module attr 2018-11-01 10:28:05 +01:00
justvanrossum
a259d31109 added module doc string with two examples 2018-11-01 10:19:51 +01:00
justvanrossum
cabce338c7 calculate glyph bounds implicitly (unless asked not to do that) 2018-11-01 10:17:07 +01:00
justvanrossum
a442ce627d work towards making name strings localizable 2018-11-01 09:52:06 +01:00
justvanrossum
3ebde1bda5 allow localized name table entries 2018-11-01 09:44:56 +01:00
justvanrossum
53761c5e03 use more existing name table logic 2018-11-01 09:40:54 +01:00
justvanrossum
0a6cbc0be0 use existing helper func 2018-11-01 09:36:37 +01:00
justvanrossum
f1d5ed1c51 add filename and tables arguments to addOpenTypeFeatures method 2018-10-31 21:01:00 +01:00
justvanrossum
96cdf116ee initial commit, with rudimentary tests 2018-10-31 20:54:34 +01:00