1783 Commits

Author SHA1 Message Date
Behdad Esfahbod
24eb3f7197 [otData] Fix DeltaValue repeat value
The "" marker is used when a custom converter expects a list.
For DeltaValues, we expect a list as a single value, not a list
to be enumerated in XML. So, None is appropriate here. Cryptic,
I know...

Fixes https://github.com/fonttools/fonttools/pull/3757
2025-01-30 13:52:03 +00:00
خالد حسني (Khaled Hosny)
b467579c8d
Merge pull request #3720 from n8willis/ttLib
[Docs] ttLib: higher-level navigation and helper documentation
2025-01-29 23:23:17 +02:00
Cosimo Lupo
bddedc1bc1 restrict the rounding to where strictly needed
we don't need to round all simple glyphs' coordinates (which may be costly), only when these are used as components with an interesting transform
2025-01-24 18:05:18 +00:00
Cosimo Lupo
4ea10eb88f [glyf] fix rounding of bbox for nested transformed components
when getCoordinates is asked to round, e.g. from recalcBounds, only round the simple glyphs' coordinates; don't do any rounding for the coordinates of component glyphs otherwise rounding errors would accummulate if a composite glyph contains transformed/nested components
2025-01-24 15:10:18 +00:00
Cosimo Lupo
ec5d41929f [glyf] fix recalcBounds of transformed components with unrounded coordinates
Fixes https://github.com/googlefonts/fontc/issues/1206
2025-01-23 11:19:30 +00:00
Andrew Suzuki
68dbfba5c4 Ensure names attr exists on table__n_a_m_e 2024-12-22 10:44:06 -05:00
Nathan Williis
7d5c516b9a Fix broken list in bfs_base_table docstring. 2024-12-07 16:58:12 +00:00
Nathan Williis
3584705ea2 [Docs] Fix docstring formatting. 2024-12-06 14:05:31 +00:00
Nathan Williis
23546cfaa9 [Docs] Import TupeVariation class directly in gvar table module. Fixes a Sphinx autodoc confusion. 2024-12-06 11:38:09 +00:00
Nathan Williis
314eee05c7 [Docs] Fix docstring typo in gcid table module. 2024-12-06 11:37:17 +00:00
Nathan Williis
e5eb053105 Docs: add boilerplate docstrings to table converters. Mostly links to reference specs. 2024-12-04 15:58:46 +00:00
Behdad Esfahbod
e8146a6d07 [glyf] Add optimizeSize option
Set to True by default. Can be turned to False on the table,
or at Glyph() compile time.

Also fixes Glyph's draw() to expand the glyph first. Otherwise
it was failing.
2024-10-11 08:31:31 -06:00
Behdad Esfahbod
6c2cbc273d [otConverters] Map int32
Unused. For completeness.
2024-10-07 06:08:35 -06:00
Behdad Esfahbod
0213bea88e [TupleVariation] Option to optimize for loading speed, not size 2024-10-06 18:11:48 -06:00
Cosimo Lupo
afd73dd2b1
NameRecordVisitor: remove unnecessary check for out of bounds nameIDs 2024-08-30 18:20:13 +01:00
Cosimo Lupo
8f01590353
FeatureParamsSize.SubfamilyID is *not* actually a NameID 2024-08-30 18:20:12 +01:00
Cosimo Lupo
821f37329e
NameRecordVisitor: include whole sequence of UI labels for character variants, not just first
Fixes #3616
2024-08-30 18:20:12 +01:00
Behdad Esfahbod
f4669f0538 [avar] Fix assertion
Fixes https://github.com/fonttools/fonttools/issues/3546
2024-05-31 01:36:17 -07:00
Just van Rossum
1c2a10f700 Rebuild tables lists 2024-05-25 17:50:29 +02:00
Behdad Esfahbod
973072b259 [Condition] Implement ConditionValue
Shift other Condition format numbers.

Implements
https://github.com/adobe-type-tools/opentype-spec-drafts/blob/main/condvalue_spec.md
2024-05-22 18:46:07 -06:00
Behdad Esfahbod
973dc5c9a7 [varc] Use Condition instead of ConditionSet
With more Condition formats.

df7dcc4618
https://github.com/harfbuzz/boring-expansion-spec/issues/147
2024-05-22 18:46:07 -06:00
Behdad Esfahbod
74f870f4ef [varc] Add ConditionSets 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
c155632e8f [varc] Skip reserved records 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
88828e0082 [CFF2IndexOf] Fix data_base
From the spec:
"Offsets in the offset array are relative to the byte
that precedes the object data."
2024-05-22 18:46:07 -06:00
Behdad Esfahbod
a1641d91b2 Newer black 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
3bada5de80 Fix otConverters lazy reader 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
40584ad489 [VARC] Adjust XML output based on review feedback 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
7d6df04d44 [VARC] Minor, match spec better
No functional change.
2024-05-22 18:46:07 -06:00
Behdad Esfahbod
5b2df6b90b [VARC] Compute flags from XML transform components 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
037bbe1030 [VARC] Load axisValues as float
https://github.com/fonttools/fonttools/pull/3395#issuecomment-1897696665
2024-05-22 18:46:07 -06:00
Behdad Esfahbod
5ad4045cec [VarComponent] Nicer XML output
https://github.com/fonttools/fonttools/pull/3395#issuecomment-1895944021
2024-05-22 18:46:07 -06:00
Behdad Esfahbod
e3ba7a7e0b [lazyTools] Simplify based on review feedback 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
87ddb244ea [otBase] Add comment based on review feedback 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
d6482c9b32 [VARC] Rename VarInt32 to uint32var 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
b1142b60cb [VARC] Adjust to latest flags change 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
297e0bd257 [VARC] Use var-int encoding for AxisIndicesIndex
Slightly larger fonts, but more consistency, and freed
a flag bit.
2024-05-22 18:46:07 -06:00
Behdad Esfahbod
6a09096800 [VARC] Use variable-length encoding for VarIdx'es 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
c3dfe10cce [VARC] Use TupleVariations tuple encoding for axisValues
Free improvement.
2024-05-22 18:46:07 -06:00
Behdad Esfahbod
735859f929 [VARC] Implement XML read/write 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
cfc66a3a82 [VARC] Simplify VarCompositeRecord 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
668a40da38 [VARC] Pivot on design again
Just store the AxisIndices in a shared list.
Don't explicitly store numAxes.
2024-05-22 18:46:07 -06:00
Behdad Esfahbod
6af1d5c555 Fix RESERVED 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
58bb96be91 [VARC] Use a DeltaSetIndexMap 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
d37b3942ee [VARC] Encode indices as 1,2,3,4 bytes long
Previously it was 2 or 4.
2024-05-22 18:46:07 -06:00
Behdad Esfahbod
263d4d9a68 Handle scaleY 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
cd1513923b [VARC] Minor 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
d07d960c75 Fix RESERVED 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
f7337b55af [VARC] Make HAVE_VARIATIONS flag automatic 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
76d293ec05 [VARC] Simplify reading 2024-05-22 18:46:06 -06:00
Behdad Esfahbod
43e054b377 [VARC] Minor 2024-05-22 18:46:06 -06:00