justvanrossum
9ffb2e0f75
removed cringy comments from a long long long long time ago
2022-04-05 17:02:34 +02:00
Cosimo Lupo
25746a3600
add clarifying comment as per review
2022-03-18 09:23:07 +00:00
Cosimo Lupo
ab8fc321a7
otBase: also return name and index from iterSubTables
...
makes it more useful for constructing generic traversals of trees of otTables
2022-03-17 17:47:41 +00:00
Cosimo Lupo
43d2ee2822
Revert "return self so one can do font=TTFont(file).ensureDecompiled()"
...
This reverts commit 61e7b294483cbe729b1437804406b4571ae57cfb.
2022-03-17 15:55:20 +00:00
Cosimo Lupo
61e7b29448
return self so one can do font=TTFont(file).ensureDecompiled()
2022-03-17 15:44:02 +00:00
Cosimo Lupo
ee27b73d7c
BaseTTXConverter: add ensureDecompiled method
...
to unlazify a whole tree of otTables, recursively
2022-03-17 12:54:22 +00:00
Cosimo Lupo
64dc37fc01
otBase: add iterSubTables method to iterate over all BaseTables
...
can be useful to traverse a tree of otTables
2022-03-17 12:53:06 +00:00
Cosimo Lupo
7f1e5e1fc7
glyf: add ensureDecompiled method
...
to 'expand' all the lazy glyphs
2022-03-17 12:51:56 +00:00
Cosimo Lupo
4119d8f582
cmap: if lazy=False, decompile all cmap subtables upfront
...
previously cmap was completely ignoring lazy attribute, always loading lazily
2022-03-17 12:46:57 +00:00
Olli Meier
5986107b43
based on feedback: Change name and add comments.
2022-02-09 17:57:55 +01:00
Olli Meier
8dddbf4a61
refactor based on feedback.
2022-02-09 17:48:51 +01:00
Olli Meier
1649973800
Make use of 'Best' in names
2022-02-09 17:44:28 +01:00
Olli Meier
6d05b938be
fix typo
2022-02-09 17:40:28 +01:00
Olli Meier
79360a30bf
Refactor based on feedback.
2022-02-09 17:34:40 +01:00
Olli Meier
c50f38ed0e
extend name table with getFamilyName, getSubFamilyName and getNiceFullName + unittests
2022-02-09 17:06:02 +01:00
Cosimo Lupo
d190a7c206
otTables: no need get LayerRecordCount by name, we already have it in scope
...
Fixes #2468
2021-12-13 11:17:08 +00:00
Khaled Hosny
6481cff159
Merge pull request #2464 from simoncozens/demystify-deduplication
...
Demystify deduplication
2021-12-12 22:13:31 +02:00
Simon Cozens
fa0eae6658
Don’t put extension lookups into an extension lookup, obviously
2021-12-08 09:02:24 -07:00
Simon Cozens
f7b866573b
Speculatively promote lookups to extension
2021-12-08 09:02:24 -07:00
Simon Cozens
c04639af70
Add comment to demystify deduplication
2021-12-06 11:15:12 +00:00
Simon Cozens
3e0caa881e
[docs] Fully document the glyf table ( #2457 )
...
* Fully document the glyf table
* Correct docs for getGlyphName/getGlyphId
* Fix typo
* Grammar nits
2021-12-02 15:32:20 +00:00
Simon Cozens
f887389d59
[docs] Fully document the cmap table ( #2454 )
...
* Fully document the cmap table
* Try not to completely break cmap handling while writing docs, Simon
2021-12-02 15:32:03 +00:00
Simon Cozens
0f03e6529a
[docs] Fix sphinx warnings ( #2453 )
...
* Add default auto doc options
* Ensure all references are unique
* Use anonymous links to avoid duplicate references
* Remove default options, fix wrong module name
* Don’t index repeated class
* Remove repeated classes included through automodule
* Fix warnings
* We don’t use our own static directory
* Correctly format XML in docs
* Fix indentation
* Fix overline
* Bring TOC to top
* Fix definition list
* Offset definition lists and examples
* Fix erroneous markup
* Fix markup
* Already included in automodule
* Fix args markup
* Correct markup for example
* Don’t reindex repeated module
* Correct XML code block markup
* Fix markup errors, change example to doctest
* Correct list markup
* Make ttx docstring both valid RST and valid help output
* Various other boring markup fixes
* Fix example indenting
* Make docstring valid RST and valid help output
* Mock import for reportlab
* It’s ok if manual links don’t appear in toctrees
* Oops typo, I guess doctests are useful
2021-12-02 15:31:49 +00:00
Simon Cozens
00f37ea6b6
[docs] Split table docs into individual pages ( #2444 )
2021-11-18 09:01:27 +00:00
Rod S
7dd3488732
Traverse when there is no layer list
2021-11-06 14:26:27 -07:00
Cosimo Lupo
11c98b04a5
SVG: don't write extra empty newline at beginning of SVG table
...
it serves no purpose.
2021-10-13 14:51:42 +02:00
Cosimo Lupo
2967f18e35
SVG: on compile reuse offsets when doc bytes are same
...
https://github.com/fonttools/fonttools/issues/534#issuecomment-934528761
2021-10-13 14:50:08 +02:00
Cosimo Lupo
be8d6e29d5
SVG: remove old deprecated version1 and embedded colorPalettes
...
Fixes https://github.com/fonttools/fonttools/issues/2426
2021-10-13 14:47:41 +02:00
Behdad Esfahbod
e5bf2a7f1a
[ttFont] Apply review comments
2021-08-22 04:09:29 -06:00
Behdad Esfahbod
7a22c0fb07
[ttFont] Add getGlyphIDMany(); use in otLayout
...
Fixes https://github.com/fonttools/fonttools/issues/1536
Superced https://github.com/fonttools/fonttools/pull/1654
Part of https://github.com/fonttools/fonttools/pull/2398
2021-08-21 11:23:11 -06:00
Behdad Esfahbod
3ec769907b
[ttFont] Add getGlyphNameMany()
...
Part of fixing https://github.com/fonttools/fonttools/pull/1654
Related https://github.com/fonttools/fonttools/issues/2334
2021-08-20 16:17:48 -06:00
Behdad Esfahbod
d0d082e76e
[otTables] Allow virtual GIDs in Coverage/ClassDef reader
...
Fixes https://github.com/fonttools/fonttools/issues/2334#issuecomment-901885598
2021-08-20 09:59:46 -06:00
Khaled Hosny
232b2ccbc4
Move the rest of py23 module to textTools
...
Change all imports to use textTools module, except the test_py23.py test
which is kept until we decide to remove the module (if ever).
2021-08-20 01:29:45 +02:00
Cosimo Lupo
d025bb8ba7
fix NameError while decompiling ClipList
...
when range references a missing glyph ID, the loop must continue
2021-08-09 11:30:00 +02:00
Cosimo Lupo
9f7a4ea3e7
otTables: fix CompositeMode enum missing PLUS mode
...
Our enumeration of CompositeMode was missing one COMPOSITE_PLUS mode (12)...
see 'PaintComposite' paragraph in https://github.com/googlefonts/colr-gradients-spec/blob/main/OFF_AMD2_WD.md
2021-08-09 11:27:46 +02:00
Cosimo Lupo
58ac5a9fd8
have ClipList and ClipBox format start at 1, not 0
...
b7e81fcbd6
2021-08-02 19:34:30 +02:00
Cosimo Lupo
800bf85b2f
add ClipList.Format so we can bump when we finally get >16bit GIDs
...
https://github.com/googlefonts/colr-gradients-spec/issues/346
2021-07-29 15:35:08 +02:00
Cosimo Lupo
9876f3c5c0
address review comments
2021-07-29 15:06:16 +02:00
Cosimo Lupo
bee2c85f61
[colrv1] otData: define ClipList, ClipBox, etc.
2021-07-28 18:04:48 +02:00
Cosimo Lupo
29a2ebf813
omit default VarIndexBase
...
4294967295 (0xFFFFFFFF in decimal form) is not very memorable.
Still, using hex notation for all VarIndexBases would make the non-default values less readable (when interpreted as an index into the DeltaSetIndexMap array, decimal makes more sense).
Since 0xFFFFFFFF means 'no variation data', it makes sense to omit it from the ttx dump and write an empty <VarIndexBase/> element with no value.
We also allow to build Var tables without needing to pass "VarIndexBase": 0xFFFFFFFF in the source dict.
2021-07-23 17:27:57 +01:00
Cosimo Lupo
e8e2aa530b
remove unused Variable{Float,Int} namedtuples from otTables/otConverters
2021-07-23 17:27:57 +01:00
Cosimo Lupo
0eb27e9878
Remove and inline {Var,}ColorIndex
2021-07-23 17:27:57 +01:00
Cosimo Lupo
40897a1508
Define DeltaSetIndexMap table used for COLR.VarIndexMap
...
https://github.com/googlefonts/colr-gradients-spec/pull/316
2021-07-23 17:27:57 +01:00
Cosimo Lupo
60f0724144
remove wrapping around from Angle converter, let the struct.error propagate
2021-07-19 17:52:00 +01:00
Rod S
7225ac22a6
Update to reflect COLR v1 FWORD center and offset to transform
2021-07-06 17:47:56 +01:00
Cosimo Lupo
0e99474985
otData: reduce precision of specialized transforms, use F2Dot14 for all angles
...
https://github.com/googlefonts/colr-gradients-spec/pull/307 & https://github.com/googlefonts/colr-gradients-spec/pull/310
2021-07-06 17:47:56 +01:00
Cosimo Lupo
bb4c3e27c3
otConverters: define Angle and VarAngle, fractions of half circle encoded as F2Dot14
...
to be used with PaintRotate, etc.
2021-07-06 17:47:56 +01:00
Cosimo Lupo
a0bd872f0e
TupleVariation: make shared tuples order deterministic
...
most frequent first (like before https://github.com/fonttools/fonttools/pull/2351 ), only sort ties alphabetically
2021-07-02 12:52:54 +01:00
Garret Rieger
7f9e2c3808
sort shared tuples produced by Counter.most_common()
...
In python 3.7 and earlier most_common() sorts first by the item count and then arbitrarily in the event of ties. This can result in two identical instancing operations producing different binary results.
2021-06-30 17:00:59 -07:00
Cosimo Lupo
d0d59d2f2c
Add PaintScale* and Paint{Rotate,Skew}* variants
...
This updates fonttools to match the latest draft COLRv1 spec at https://github.com/googlefonts/colr-gradients-spec/pull/290
Summary of changes:
- Added 8 new PaintScale* tables: with/without centers, uniform vs non-uniform
- Added *AroundCenter variants to PaintRotate and PaintSkew (default versions no longer have centerX/Y defaulting to origin)
- PaintRotate, PaintSkew and PaintComposite formats re-numbered
2021-06-28 18:38:47 +01:00