6353 Commits

Author SHA1 Message Date
Behdad Esfahbod
b72a8da045 [varStore] Adjust encoding overhead in optimize()
Previously we were not accounting for the LOffset to VarData.
2023-05-24 13:21:33 -06:00
Behdad Esfahbod
0677c0e705 [varStore] Another bugfix in optimize() 2023-05-24 13:18:58 -06:00
Behdad Esfahbod
cb2f5aacd3 [varStore] More documentation 2023-05-24 12:19:46 -06:00
Behdad Esfahbod
cdcbf64d36 [varStore] Document the optimize algorithm 2023-05-24 12:09:43 -06:00
Behdad Esfahbod
58954179ec [varStore] Another fix to the optimize algorithm
Previously we were disregarding the best_gain. Ouch!
2023-05-24 12:02:05 -06:00
Behdad Esfahbod
6097b3293b [varStore] Improve optimize algorithm
This was always supposed to be how it works, but was missed in
the initial implementation apparently.
2023-05-24 11:07:19 -06:00
Cosimo Lupo
77a35fe16d
Merge pull request #3119 from fonttools/glyph-data-format-option
fontBuilder: add glyphDataFormat=0; error with accidentally cubic outlines
2023-05-23 14:57:37 +01: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
7089635305 [subset] Make sure GDEF is processed before GSUB and GPOS
See https://github.com/fonttools/fonttools/pull/3114#pullrequestreview-1437266522
2023-05-22 23:22:44 +03:00
خالد حسني (Khaled Hosny)
a537f97b44
Merge pull request #3114 from fonttools/subset-prune-MarkGlyphSetsDef
[subset] Prune GDEF.MarkGlyphSetsDef
2023-05-22 18:33:37 +03:00
Cosimo Lupo
c2c2cb0949
Merge pull request #3115 from fonttools/xml-reader-join-content-chunks
xmlReader: join consecutive text data that had been cut by buffered xml parser
2023-05-22 12:37:23 +01:00
Cosimo Lupo
e8f8a6c40d xmlReader: join consecutive text data that had been cut by buffered parser
Fixes https://github.com/fonttools/fonttools/issues/2614
2023-05-22 12:22:41 +01:00
Khaled Hosny
04975b9a14 [subset] Prune GDEF.MarkGlyphSetsDef
Remove empty sets and fixup Lookup.MarkFilteringSet to use the new
indices.
2023-05-22 13:28:50 +03:00
Behdad Esfahbod
4c24a3e328 [varLib/merger] Fix merging of SinglePos with pos=0
Fixes https://github.com/fonttools/fonttools/issues/3111
2023-05-19 18:37:15 +02:00
Simon Cozens
65bc6105f7
[feaLib] Allow empty aalt features (#3110)
* Demote "feature has not been defined" to a warning

* Rework test

* Not my black
2023-05-17 15:08:08 +01:00
David Corbett
8b69b9412e feaLib: Dedupe multiple substitutions with classes 2023-05-13 13:24:58 -04:00
Khaled Hosny
54e70b3cef Bump version: 4.39.4 → 4.39.5.dev0 2023-05-10 18:28:22 +03:00
Khaled Hosny
4246c69e9a Release 4.39.4 2023-05-10 18:28:21 +03:00
Khaled Hosny
88885ba9fc feaLib: handle singleton class as a single glyph in multiple subst
This how GlyphsApp handles it and how it is handled in single
substitution.
2023-05-09 17:33:36 +03:00
خالد حسني (Khaled Hosny)
b6209e0510
Merge pull request #3103 from fonttools/multiple-subst-classes
feaLib: support multiple substitution with classes
2023-05-09 16:15:33 +03:00
Khaled Hosny
f642a2aac4 feaLib: support multiple substitution with classes
This is a GlyphsApp extension, (partially) documented [here][1], but it is a
useful one as it allows concise glyph insertion using decomposition
without having to maintain the list of glyphs in two places. E.g.

```fea
@upper = [A-Z];

lookup insert {
  sub @upper by @upper connector;
} insert;

feature ccmp {
  sub @upper' lookup insert x;
} ccmp;
```

As apposed to:

```fea
@upper = [A-Z];

lookup insert {
  sub A by A connector;
  sub B by B connector;
  sub C by C connector;
  sub D by D connector;
  sub E by E connector;
  sub F by F connector;
  sub G by G connector;
  sub H by H connector;
  sub I by I connector;
  sub J by J connector;
  sub K by K connector;
  sub L by L connector;
  sub M by M connector;
  sub N by N connector;
  sub O by O connector;
  sub P by P connector;
  sub R by R connector;
  sub S by S connector;
  sub T by T connector;
  sub U by U connector;
  sub V by V connector;
  sub W by W connector;
  sub X by X connector;
  sub Y by Y connector;
  sub Z by Z connector;
} insert;

feature ccmp {
  sub @upper' lookup insert x;
} ccmp;
```

1. http://handbook.glyphsapp.com/en/layout/multiple-substitution-with-classes/
2023-05-09 14:06:12 +03:00
Behdad Esfahbod
6a13bdc2e6 [featureVars] Remove unused argument 2023-05-02 10:57:43 -06:00
Behdad Esfahbod
5b96fff9ce [featureVars] Process lookups for features other than rvrn last
Fixes https://github.com/fonttools/fonttools/issues/3097
2023-05-02 10:57:43 -06:00
Tim Maffett
61ca53ab10 fix ttx split tables option to work on source files which have been url encoded and contain the '%' character 2023-04-28 17:07:44 -07:00
Jens Kutilek
85c80be6b6
Fix missing composite instructions in ttx (#3092)
* Fix calculation of haveInstructions
* Add test
2023-04-25 16:21:24 +02:00
Cosimo Lupo
cb5aa96702
add missing __main__.py file to ttLib package, plus some tests
Fixes https://github.com/fonttools/fonttools/issues/17
2023-04-24 11:22:53 +01:00
Behdad Esfahbod
623f3f14be [iup] Micro-optimize 2023-04-22 15:07:03 -06:00
Behdad Esfahbod
afd4695d26 [iup] Fix cython tests 2023-04-22 14:49:25 -06:00
Behdad Esfahbod
e92c79e0e8 [iup] Micro-optimize cython 2023-04-22 14:34:41 -06:00
Behdad Esfahbod
b5899772c7 [interpolatable] Use math.sqrt() 2023-04-22 14:10:11 -06:00
Behdad Esfahbod
7fd3f7632e [bezierTools] Remove division hack 2023-04-22 12:50:25 -06:00
Behdad Esfahbod
dc60198f78 [bezierTools] Micro-optimize cython 2023-04-22 12:49:22 -06:00
Behdad Esfahbod
14ec21af40 [qu2cu] Micro-optimize cython 2023-04-22 12:43:33 -06:00
Behdad Esfahbod
a91c3381b5 [qu2cu] Remove division hack 2023-04-22 12:40:00 -06:00
Behdad Esfahbod
990afce0db [cu2qu] One more annotation 2023-04-22 12:37:12 -06:00
Behdad Esfahbod
027f644d12 [cu2qu] Micro-optimize cython code
By defining some core functions as cfunc, so they inline.

Almost 10% speedup.
2023-04-22 12:29:08 -06:00
Behdad Esfahbod
0cb46862e0 [cu2qu] Remove another division hack 2023-04-22 12:17:57 -06:00
Behdad Esfahbod
3470b7494a [cu2qu] Remove old hack
Python3 optimizes const division, and Cython doesn't need it anyway.
2023-04-22 12:13:27 -06:00
خالد حسني (Khaled Hosny)
3a4b9d770e
Merge pull request #3084 from fonttools/update-apple-url
Update link to Apple documentation
2023-04-21 00:24:22 +02:00
Behdad Esfahbod
57c7792477
[merge] Handle differing default/nominalWidthX in CFF (#3070)
* [merge] Handle None GDEF.table.MarkGlyphSetsDef

* [merge] Handle differing CFF nominal/defaultWidthX

Fixes https://github.com/fonttools/fonttools/issues/3069

* Update Lib/fontTools/merge/tables.py

Co-authored-by: Cosimo Lupo <clupo@google.com>

---------

Co-authored-by: Cosimo Lupo <clupo@google.com>
2023-04-19 12:14:41 -06:00
Just van Rossum
56b543826c re-wrap 2023-04-18 14:38:50 +02:00
Just van Rossum
82441262e7 Update link to Apple doco 2023-04-18 14:37:34 +02:00
Colin M. Ford
edc3584d5b
Using set comprehension
Suggestion by anthrotype

Co-authored-by: Cosimo Lupo <cosimo@anthrotype.com>
2023-04-06 10:34:48 -04:00
Colin M. Ford
9656e3faf1 formatting with black to get lint to pass 2023-04-05 22:33:38 -04:00
Colin M. Ford
491bd74f4b Missed a m0idx 2023-04-05 18:22:21 -04:00
Colin M. Ford
9c1380be96 Oops, UFOLib's getGlyphSet does not have an items function 2023-04-05 18:21:17 -04:00
Colin M. Ford
4a991d1d89 Comment corrections 2023-04-05 17:12:43 -04:00
Colin M. Ford
208c36800b Oops, any could potentially block a list like [None, [], []], which is not what we want 2023-04-05 17:11:30 -04:00