Behdad Esfahbod
bcd5e4c216
Rip out glyf1 VarComposites
...
In favor of separate VARC table.
ttGlyphSet does NOT yet know how to draw VARC table though.
The 9 failing tests are all VarComposite-related and need
to be updated with VARC equivalents eventually when we
add VARC support to subsetter and instancer.
2024-05-22 18:45:27 -06:00
Martin Grödl
534cb53b4a
Fix regression
...
Bug introduced in a421f9045a (diff-c01f84c2ac99ae2b60f071d4a38ff88c2653d27f19e62e11bef3dc7fe7f68925R352)
2023-07-18 16:58:21 +02:00
NightFurySL2001
ef8e15a08c
Use Panose class
2023-07-07 22:09:58 +08:00
NightFurySL2001
ef95a58c3c
Convert panoseDefault to namespace object
2023-07-07 21:36:40 +08:00
Just van Rossum
014e6c5800
Propagate the 'hidden' flag to the fvar Axis instance
2023-06-26 17:18:40 +02:00
Just van Rossum
b4ce8177ec
Fix exception message
2023-06-25 15:48:16 +02:00
Just van Rossum
d59291a9c5
Update setupAvar to also support avar-2, fixing _add_avar() call site
2023-06-25 15:31:08 +02:00
Cosimo Lupo
57d5da2039
rename parameter validateGlyphFormat and reword docstring as per review
2023-05-23 14:41:16 +01:00
Cosimo Lupo
469c9ad963
add option to skip glyphDataFormat check for speed
...
If one is certain that the glyph data has compatible format and prefers not to wait for each glyph flag to checked...
2023-05-23 13:16:02 +01:00
Cosimo Lupo
a421f9045a
fontBuilder: add glyphDataFormat=0; error with accidentally cubic outlines
...
Fixes #3113
2023-05-23 12:56:08 +01:00
Khaled Hosny
3a6b17d9a2
[fontBuilder] Add debug to addOpenTypeFeatures
...
Passed to addOpenTypeFeaturesFromString().
2023-02-24 21:46:10 +02:00
Just van Rossum
8af6c16b6a
don't error when there are zero code points
2022-08-27 10:29:12 +02:00
Cosimo Lupo
fc982c643b
colorLib: add option to disable PaintColrLayers' reuse of layers from LayerList
...
When building COLR masters, layer reuse may lead to different number of layers between masters, becasue some master may reuse specific layers while others may not. Add a flag to disable this optimization; will need to be run again after the VF COLR font has been merged
2022-06-21 17:27:11 +01:00
Cosimo Lupo
bb1dbf4198
drop the 'X' from recalcAvgCharWidth method name
2022-04-21 19:02:39 +01:00
Cosimo Lupo
5455f5388d
[fontBuilder] use recalcXAvgCharWidth method
...
slightly different rounding method but it doesn't really matter
2022-04-21 18:45:38 +01:00
Cosimo Lupo
627d8e6ee6
fontBuilder: pass through varIndexMap and clipBoxes parameters in setupCOLR
2021-08-09 11:24:41 +02:00
Just van Rossum
5fc65d7168
Misc py23 cleanups ( #2243 )
...
* Replaced all from ...py23 import * with explicit name imports, or removed completely when possible.
* Replaced tounicode() with tostr()
* Changed all BytesIO ans StringIO imports to from io import ..., replaced all UnicodeIO with StringIO.
* Replaced all unichr() with chr()
* Misc minor tweaks and fixes
2021-03-29 11:45:58 +02:00
Chris Simpkins
7abf2e4c75
transition basestring
to str
...
https://github.com/fonttools/fonttools/issues/2232
2021-03-27 10:23:29 -04:00
Simon Cozens
4fb666fee9
Remove tautology
2021-02-12 12:43:58 +00:00
Simon Cozens
1c259eee5f
Let instances optionally be InstanceDescriptors
...
Because if you've got an AxisDescriptor, you've probably got one of
those as well...
2021-02-11 16:07:05 +00:00
Simon Cozens
285f861e45
Localize instance subfamily name too.
2021-02-11 16:05:02 +00:00
Simon Cozens
d470ea4870
Typo
2021-02-11 15:53:35 +00:00
Simon Cozens
04f04474fd
Reformat with black for ease of further maintenance
2021-02-11 15:49:21 +00:00
Simon Cozens
4a8617fc92
New setAvar method
2021-02-11 15:46:05 +00:00
Simon Cozens
731f6a3107
Take AxisDescriptor (or objects conforming to its interface) in addFvar
2021-02-11 15:44:54 +00:00
Simon Cozens
8a58225e6d
Typo
2021-02-11 15:27:40 +00:00
Simon Cozens
c51c61f436
Remove py23isms
2021-02-11 15:15:35 +00:00
Simon Cozens
9e03da03da
Support localised axis names
2021-02-11 14:09:41 +00:00
Simon Cozens
567aadcc72
Document setupFvar
2021-02-11 14:08:36 +00:00
Cosimo Lupo
8343468689
fontBuilder: pass through version and varStore parameter to buildCOLR
2021-02-01 11:59:24 +00:00
Cosimo Lupo
85c450b565
fontBuilder: pass glyphMap to buildCOLR to sort base records by GID
...
COLR Base glyph records must be sorted by glyph index. The buildCOLR
function has an optional glyphMap parameter that maps from glyph names
to glyph indices (as returned from TTFont.getReversedGlyphMap()).
FontBuilder knows all that so it should pass it on to colorLib.
2021-02-01 11:51:39 +00:00
Just van Rossum
d6bb38c7e6
[otlLib.builder] Add function to build STAT table from high-level description ( #1926 )
...
* added a function to build a STAT table: `fontTools.otlLib.builder.buildStatTable()`
* make `varLib._add_stat()` a client of `buildStatTable()`
2020-05-09 16:08:11 +02:00
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