10614 Commits

Author SHA1 Message Date
Behdad Esfahbod
0677c0e705 [varStore] Another bugfix in optimize() 2023-05-24 13:18:58 -06:00
Behdad Esfahbod
e4281b07bc [varStore] Add test for optimize()
Doesn't hit all branches yet.
2023-05-24 12:51:24 -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
9bb3b652b0
fontBuilder_test: test error with cubics but glyf format 0 2023-05-23 12:56:09 +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)
115275cbf4
Merge pull request #3118 from fonttools/subset-layout-order
[subset] Make sure GDEF is processed before GSUB and GPOS
2023-05-22 23:34:38 +03: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
Khaled Hosny
7b0e3643a0 [subset] Add test for pruning GDEF.MarkGlyphSetsDef 2023-05-22 14:30:15 +03: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
Cosimo Lupo
f7c1407703 Add test to reproduce DSIG split by XML buffered parser 2023-05-22 12:15:50 +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
خالد حسني (Khaled Hosny)
86291b6ef6
Merge pull request #3105 from fonttools/deduplicate-multiple-subst-classes
feaLib: Dedupe multiple substitutions with classes
2023-05-14 17:11:31 +03:00
David Corbett
bd00fe24f1 feaLib: Test deduped multiple substitution lookups 2023-05-14 09:35:53 -04: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
f430da359f Fix setuptools warning
SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
2023-05-10 18:25:06 +03:00
خالد حسني (Khaled Hosny)
fbb30dc6a0
Merge pull request #3104 from fonttools/multiple-subst-classes-2
feaLib: handle singleton class as a single glyph in multiple subst
2023-05-10 17:57:43 +03:00
Khaled Hosny
ddcb4dcdd6 Remove accidentally committed file 2023-05-09 17:42:11 +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
Cosimo Lupo
f026853cb2
Merge pull request #3096 from timmaffett/fix_ttx_urlencode_filenames
fix ttx split tables option to work on filenames containing '%' fixes #3095
2023-05-02 11:53:19 +01: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
2e1eda2695
Merge pull request #3088 from fonttools/ttLib-main
add missing __main__.py file to ttLib package, plus some tests
2023-04-24 11:59:27 +01:00
Cosimo Lupo
df42e9d1e4
ttLib_main.py: test directly __main__.main(), coverage-py doesn't collect in subprocess 2023-04-24 11:48:36 +01: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