Nathan Williis
e5eb053105
Docs: add boilerplate docstrings to table converters. Mostly links to reference specs.
2024-12-04 15:58:46 +00:00
Cosimo Lupo
335a1e56ec
re-run black v23.10 on all .py files
2023-11-03 10:25:15 +00:00
Cosimo Lupo
442576fb1f
Fix UnbouldLocalError and let {h,v}hea be no-op when no {v,h}mtx is present
...
Fixes https://github.com/fonttools/fonttools/issues/3289
2023-10-06 10:30:33 +01:00
Nikolaus Waxweiler
d584daa8fd
Blacken code
2022-12-13 11:26:36 +00:00
Just van Rossum
5fc65d7168
Misc py23 cleanups ( #2243 )
...
* Replaced all from ...py23 import * with explicit name imports, or removed completely when possible.
* Replaced tounicode() with tostr()
* Changed all BytesIO ans StringIO imports to from io import ..., replaced all UnicodeIO with StringIO.
* Replaced all unichr() with chr()
* Misc minor tweaks and fixes
2021-03-29 11:45:58 +02:00
Khaled Hosny
09174b9129
[CFF2] Make recalcBBoxes work with CFF2 table
...
Add checks for CFF2 table next to CFF checks as applicable.
2020-01-31 23:39:47 +02:00
Simon Cozens
6e55f939e3
[ttLib] Add aliases for renamed entries in hhea table
...
Closes #1714
2019-09-05 12:38:45 +01:00
Nikolaus Waxweiler
01328213c7
Remove __future__ imports
2019-08-09 12:20:13 +01:00
Behdad Esfahbod
4fec016862
[cff] Fix calcBound when seac-like components happen in endchar
...
I'm also unimpressed by the copy-pasted bounds logic in hhea and vhea,
and the fact that that's coded in there instead of calling a function
on CFF / glyf tables respectively.
2018-01-26 17:41:53 -08:00
Cosimo Lupo
ae73c45e6a
[hhea/vhea] cast to int when using math.ceil and floor
...
Fixes https://github.com/fonttools/fonttools/issues/1064
2017-10-05 13:27:13 +01:00
Behdad Esfahbod
03cf8fc157
Fix hhea/vhea compile with metrics tables
2017-08-16 16:42:59 -07:00
Masaya Nakamura
3708f2c8d3
Don't cache charString bounds
...
https://github.com/fonttools/fonttools/pull/970#discussion_r117903692
2017-08-01 10:54:47 +09:00
Masaya Nakamura
68c7275945
[hhea,vhea] Refactor
2017-08-01 10:53:28 +09:00
Masaya Nakamura
69199b3225
[hhea,vhea] Ensure charString has bounds
2017-08-01 10:53:27 +09:00
Masaya Nakamura
1b773c17d7
[hhea,vhea] Fix advance{Width,Height}Max calculations
...
Before this commit, empty glyphs were wrongly ignored.
2017-08-01 10:51:48 +09:00
Masaya Nakamura
d13aab2c70
[hhea,vhea] Add recalcBBoxes support for CFF-flavored fonts
2017-08-01 10:51:48 +09:00
Masaya Nakamura
cf3474ba6a
[hhea,vhea] Refactor to support CFF bounds recalculation
2017-08-01 10:51:47 +09:00
Masaya Nakamura
d1bc55756f
[hhea,vhea] Use float('inf') instead of INFINITY
2017-08-01 10:51:47 +09:00
moyogo
f67d0eb826
hhea: tableVersion as L instead of 16.16F, hex in XML
2016-10-18 18:18:09 +02:00
Behdad Esfahbod
b30e12ae00
More whitespace
2015-04-26 02:01:01 -04:00
Behdad Esfahbod
bd67253118
Some more whitespace fixes from pep8 tool
2015-04-26 01:59:01 -04:00
Behdad Esfahbod
a47d226662
Apply fixes from 'hhea' to 'vhea'
...
Maybe they should be merged...
2014-06-02 18:31:52 -04:00
Behdad Esfahbod
1ae29591ef
from __future__ import absolute_import
...
Such that our Python 2 is closer to Python 3.
Part of https://github.com/behdad/fonttools/issues/77
2014-01-14 15:07:50 +08:00
Behdad Esfahbod
32c10eecff
py23 from __future__ import division and adjust divisions
2013-11-28 17:32:42 -05:00
Behdad Esfahbod
30e691edd0
py23 from __future__ import print_function
2013-11-27 17:27:45 -05:00
Behdad Esfahbod
7ed91eca1e
py23 import in all nontrivial source files and unused import cleanup
2013-11-27 15:25:00 -05:00
Behdad Esfahbod
ecbe4c87b5
2to3 --fix=numliterals with manual cleanup
2013-11-27 03:37:29 -05:00
Behdad Esfahbod
3a9fd30180
2to3 equivalent to --fix=tuple_params
...
I hope I got this all right...
2013-11-27 03:30:21 -05:00
Behdad Esfahbod
2b06aaa2a6
2to3 --fix=import
2013-11-27 02:34:11 -05:00
Behdad Esfahbod
bc5e1cb195
2to3 --fix=has_key
2013-11-27 02:33:03 -05:00
Behdad Esfahbod
978b1ea877
Indent
2013-11-14 19:18:11 -05:00
Behdad Esfahbod
246301acc9
Fixup hhea recalc after 9222b8ef93fd6b41f9c4dcf152593cd0c80f0ba4
2013-11-14 18:55:35 -05:00
Roozbeh Pournader
c360f04754
Separate out the logic of computing advanceWidthMax from minLeftSideBearing, minRightSideBearing, and xMaxExtent for minimal fonts.
2013-11-14 18:53:20 -05:00
Behdad Esfahbod
7bdf6d39fc
Minor
2013-11-14 17:27:15 -05:00
Behdad Esfahbod
9222b8ef93
Consider composite glyphs when recalcing 'hhea' values
...
Fixes https://github.com/behdad/fonttools/issues/20
2013-11-14 17:22:47 -05:00
Behdad Esfahbod
335f182a58
Consider advance width of all glyphs when recalcing 'hhea'
...
Part of https://github.com/behdad/fonttools/issues/20
2013-11-14 17:18:56 -05:00
Behdad Esfahbod
d95db25720
Indent
2013-10-26 22:03:46 +02:00
Denis Jacquerye
cff3740f14
* wrong indentation after else
2013-10-09 12:13:40 +02:00
Roozbeh Pournader
d7921e33d9
Improved support for minimal fonts (with no visible glyphs).
2013-10-08 21:29:22 -07:00
Behdad Esfahbod
8413c108d2
Move sstruct under fontTools.misc
...
Our footprint in the Python module namespace is all under
fontTools now. User code importing sstruct should be updated
to say "from fontTools.misc import sstruct".
2013-09-17 16:59:39 -04:00
jvr
5aaeac3333
Ha, a reserved field got eaten. Noticed by Yannis Haralambous.
...
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@443 4cde692c-a291-49d1-8350-778aa11640f8
2003-09-01 15:09:29 +00:00
jvr
6d73fdef1c
this wasn't meant te be checked in yet.
...
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@229 4cde692c-a291-49d1-8350-778aa11640f8
2002-05-13 18:13:03 +00:00
jvr
e69caf8771
more cosmetics
...
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@227 4cde692c-a291-49d1-8350-778aa11640f8
2002-05-13 18:08:19 +00:00
Just
3e097c6095
don't recalc a number of things then TTFont().recalcBBoxes is off. This allows us to compact glyphs right after they've been parsed from XML, which should greatly reduce memory usage, and therefore should speedup compiling large fonts.
...
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@31 4cde692c-a291-49d1-8350-778aa11640f8
1999-12-23 14:44:16 +00:00
Just
7842e56b97
Created a new library directory called "FreeLib". All OpenSource RFMKII components will reside there, fontTools being the flagship.
...
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@2 4cde692c-a291-49d1-8350-778aa11640f8
1999-12-16 21:34:53 +00:00