33 Commits

Author SHA1 Message Date
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
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
cf2c6ec127 vhea: tableVersion as L instead of 16.16F, hex in XML 2016-10-18 18:18:09 +02:00
moyogo
d7a3ae3f3d vhea: vhea.reserved0 should be vhea.caretOffset 2016-10-18 18:18:09 +02:00
Cosimo Lupo
4d6a94dfaa [_v_h_e_a] don't recalc vertical bounds if recalcBBoxes == False 2015-08-17 10:23:03 +01: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
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
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