7266 Commits

Author SHA1 Message Date
Behdad Esfahbod
2c9d97652d [ttFont] Add reorderGlyphs
Fixes https://github.com/fonttools/fonttools/issues/2060
2024-03-30 17:22:38 -06:00
Simon Cozens
430e364db7 Compile aux fields 2024-03-19 16:46:37 -06:00
Cosimo Lupo
e39cc26b67
Bump version: 4.50.0 → 4.50.1.dev0 2024-03-15 17:30:45 +00:00
Cosimo Lupo
10dd8b4575
Release 4.50.0 2024-03-15 17:30:44 +00:00
Cosimo Lupo
3e949ed07c
recordingPen: add DecomposingRecordingPointPen to __all__ list for star imports 2024-03-14 09:51:38 +00:00
Cosimo Lupo
d84c74c2ab
[filterPen] add decomposing filter pens 2024-03-05 15:58:41 +00:00
Cosimo Lupo
cccc358c79
[recordingPen] Add DecomposingRecordingPointPen, test new decomposing pen options 2024-03-05 15:58:41 +00:00
Cosimo Lupo
c0074ee26f
[pointPen] add DecomposingPointPen, point-pen eqivalent to DecomposingPen 2024-03-05 15:18:39 +00:00
Cosimo Lupo
e7bd486766
[basePen] add reverseFlipped=False option to DecomposingPen
decomposed components with flipping transform have their path direction reversed, possibly causing dropouts if they overlap other components; this option ensures they will get reversed as they are decomposed (similar to what ufo2ft DecomposeComponentsFilter or Glyphs.app does when decomposing flipped components).

Also we allow specific instances of to set skipMissingComponents differently from the class default value, and add an alias to MissingComponentError so one doesn't need to import it explicitly but can the pen's class attribute.
2024-03-05 15:18:39 +00:00
Cosimo Lupo
345d6b2f81 [instancer] drop explicit no-op axes from tuplevariations
Fixes #3453
2024-03-04 15:25:48 +00:00
Cosimo Lupo
f02813bd54
[cu2qu/ufo] return set of modified glyph names from fonts_to_quadratic
In ufo2ft preProcessor, we need to know which specific glyphs were actually modified (converted to quadratic), in order to do other things while processing filters, not simply if the fonts were modified as a whole; thus, here I changed fonts_to_quadratic to return the set of modified glyph names instead of just True/False. The change is backward compatible because code that checks whether the returned value is True/False will continue to work since bool(set) is True for non-empty set, False for empty ones.
2024-03-04 12:11:09 +00:00
Khaled Hosny
d7eed23e34 Bump version: 4.49.0 → 4.49.1.dev0 2024-02-15 23:55:06 +02:00
Khaled Hosny
e044025042 Release 4.49.0 2024-02-15 23:54:59 +02:00
خالد حسني (Khaled Hosny)
90e391bb31
Update Lib/fontTools/otlLib/builder.py
Co-authored-by: Cosimo Lupo <cosimo@anthrotype.com>
2024-02-15 14:56:10 +02:00
Khaled Hosny
bb557938bd [otlLib] Document buildMathTable 2024-02-14 02:54:15 +02:00
Khaled Hosny
0f953cccd8 [otlLib] Support building MATH table 2024-02-14 02:48:13 +02:00
خالد حسني (Khaled Hosny)
534ceed9db
Merge pull request #3438 from fonttools/pyup-scheduled-update-2024-02-05
Scheduled weekly dependency update for week 05
2024-02-06 15:54:33 +02:00
Khaled Hosny
cf08265cd5 Black 2024-02-06 15:47:35 +02:00
Cosimo Lupo
2189c2334d
Bump version: 4.48.1 → 4.48.2.dev0 2024-02-06 13:41:07 +00:00
Cosimo Lupo
9c9e8f5f13
Release 4.48.1 2024-02-06 13:41:06 +00:00
Cosimo Lupo
2c92d41e1c
Bump version: 4.48.0 → 4.48.1.dev0 2024-02-06 12:42:25 +00:00
Cosimo Lupo
f519011558
Release 4.48.0 2024-02-06 12:42:24 +00:00
Cosimo Lupo
3975ce6339
avoid calling getCompiledSize_ twice 2024-02-06 12:25:00 +00:00
Cosimo Lupo
96054e8152
[otlLib] choose most compact contextual lookup format (#3439)
* [otlLib] chose most compact contextual lookup format

Fixes https://github.com/fonttools/fonttools/issues/2934
2024-02-05 16:59:29 +00:00
Behdad Esfahbod
1e989abec4 [designspaceLib] Add "description" to <mappings> and <mapping>
Fixes https://github.com/fonttools/fonttools/issues/3435
2024-02-05 09:58:51 -07:00
Behdad Esfahbod
1418b4c916 [designspaceLib] Add a roundtripping __main__
Works as a normalizer as well.
2024-02-05 09:58:51 -07:00
Behdad Esfahbod
0572f78718 [svgPathPen] Add --glyphs 2024-01-30 13:45:25 -08:00
Behdad Esfahbod
16991a8cd2 [varLib] Remove unused code 2024-01-26 12:20:34 -08:00
Thatchapon Unprasert
447c9e1887
Support sbix Glyphs with graphicType "flip" (#3433)
* Support sbix Glyphs with graphicType = "flip"

Since iOS 17.4 beta, Apple introduced the "flip" graphic type for the sbix glyphs to reference the another glyph to be flipped by their render engine. Their use case is for directional emojis.

Example emoji: https://emojipedia.org/woman_walking_facing_right#technical

This is the example of the output XML after this PR:

```
<glyph graphicType="flip" name="u1F3C3.0.M.u27A1" originOffsetX="0" originOffsetY="0">
    <ref glyphname="u1F3C3.0.M" />
</glyph>
```

Before, it was just `<hexdata>` with some data in it.
2024-01-26 11:09:44 +00:00
Qunxin Liu
3e548ff29c fix bug in instancer iup optimization
pass in correct value to tolerance
2024-01-25 16:18:24 -08:00
Cosimo Lupo
6ff7d00e06
[feaLib] fix ordering of alternates in aalt lookups
Fixes https://github.com/fonttools/fonttools/issues/2937
2024-01-25 13:25:41 +00:00
Cosimo Lupo
957b5fb45a
don't sort product of liga components to keep declaration order
technically we are tweaking the original example from the spec but it keeps the spirit, so that the product of glyph classes produces the same representation in the font as if the sequences were manually enumerated (while keeping the declaration order)
2024-01-24 12:59:00 +00:00
Cosimo Lupo
f96b2128a1
[feaLib] keep declaration order of ligatures within ligature set
Fixes #3428
2024-01-24 12:59:00 +00:00
Jens Kutilek
7cdac78423
Add transformRoundFunc parameter to RoundingPens (#3426)
* Add optional transformRoundFunc to RoundingPen and RoundingPointPen
* Add tests
* Add doc about comparing UFO to TTF glyphs
* Use floatToFixedToFloat for example with rounding
2024-01-23 18:59:09 +01:00
Khaled Hosny
2616ab959c feaLib: Drop glyph and class names length limit
These were implemented to follow FEA spec, but makeotf does not seem to
have a name length limit any more (or it has a very large one, I tested
a 600-character name and it was accepted).

Fixes https://github.com/googlefonts/ufo2ft/issues/588
See also https://github.com/googlefonts/ufo2ft/pull/811#discussion_r1461667058
2024-01-22 16:38:54 +02:00
Cosimo Lupo
701b06f3c6
[varLib]: do not log when there are no OTL tables to be merged 2024-01-11 12:00:08 +00:00
Khaled Hosny
6f5a2d0b34 Bump version: 4.47.2 → 4.47.3.dev0 2024-01-11 12:40:30 +02:00
Khaled Hosny
c97d60907d Release 4.47.2 2024-01-11 12:40:30 +02:00
Khaled Hosny
ad7ee2fc68 Bump version: 4.47.1 → 4.47.2.dev0 2024-01-11 12:16:32 +02:00
Khaled Hosny
7d5fca3eb5 Release 4.47.1 2024-01-11 12:16:27 +02:00
خالد حسني (Khaled Hosny)
1c25210360
[featureVars] Re-use FeatureVariationRecord's when possible
If a FeatureVariationRecord with the same ConditionTable exists re-use
it and append FeatureTableSubstitutionRecord’s.

Without this, in the following feature code only the first lookup will
be applied since there will be two FeatureVariationRecord with the same
ConditionTable, so the first will be matched and the other will be
skipped:

    conditionset test {
        wght 600 1000;
        wdth 150 200;
    } test;

    variation ccmp test {
        sub e by a;
    } ccmp;

    variation rlig test {
        sub b by c;
    } rlig;

With this change only one FeatureVariationRecord will be created with
two FeatureTableSubstitutionRecord’s.
2024-01-10 19:06:26 +02:00
Cosimo Lupo
6388cfd6ea
Merge pull request #3406 from fonttools/stat-addname-ttfont
[otlLib] Pass ttFont to name.addName in buildStatTable
2024-01-09 16:15:45 +00:00
Jan Kučera
549ce732bf [merge] linter fixes 2024-01-08 16:12:26 +00:00
Jan Kučera
b034d5611f [merge] usage help 2024-01-08 15:07:02 +00:00
Jan Kučera
0d1c8b98b6 [merge] --import-file 2024-01-07 18:37:52 +00:00
Jan Kučera
08ae1dfe7f [merge] print merging keys when verbose 2024-01-07 18:00:23 +00:00
Jan Kučera
42c24a4735 [merge] args help 2024-01-07 17:12:53 +00:00
Jan Kučera
d975087ca2 [merge] --input-file 2024-01-07 16:40:05 +00:00
Jan Kučera
8df24b1b1f [merge] --output-file to Options 2024-01-07 15:59:33 +00:00
Khaled Hosny
c65dba41bb [otlLib] Pass ttFont to name.addName in buildStatTable
Avoids ltag warning similar to:
ae31d056051a28c39bc60fa2b827bc14efcef287
2024-01-07 14:37:53 +02:00