49 Commits

Author SHA1 Message Date
Behdad Esfahbod
8af5c69ea0 Unbreak backward compatibility re _h_e_a_d.mac_epoch_diff
Fixes https://github.com/behdad/fonttools/issues/210
2015-01-22 11:21:43 -08:00
Olivier Berten (selapa.net)
ff84e2dadd Regard very low datetimes as unix timestamps 2015-01-03 23:04:10 +01:00
Behdad Esfahbod
b056318ca9 Ignore top four bytes of head table timestamps
Warn instead.
2015-01-02 13:08:57 -08:00
Behdad Esfahbod
15f2bb1e2f Fixup previous commit 2015-01-02 13:02:36 -08:00
Behdad Esfahbod
f0200def0c Refactor timestamp code into misc.timeTools 2015-01-02 12:53:16 -08:00
Behdad Esfahbod
497863a190 Allow disabling 'head' table modified-timestamp recalculation
Part of:
https://github.com/behdad/fonttools/issues/115
https://github.com/behdad/fonttools/issues/46
2014-05-01 15:13:22 -07: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
d0a85754fe Remove unused data 2013-12-06 17:56:28 -05:00
Behdad Esfahbod
1112495ae5 Simplify mac_epoch_diff 2013-12-06 17:56:09 -05:00
Behdad Esfahbod
65d3a02d16 Simplify date parsing 2013-12-06 17:47:14 -05:00
Behdad Esfahbod
b8e1afa809 Use struct format 'Q' to read/write 64bit integers 2013-12-06 17:26:09 -05:00
Behdad Esfahbod
5e36f854aa Remove redundant code 2013-12-06 17:16:57 -05:00
Behdad Esfahbod
821572c9a9 py23 Add bytesjoin() 2013-11-28 17:32:43 -05:00
Behdad Esfahbod
b7fd2e1913 py23 Remove uses of __cmp__ and cmp() 2013-11-28 17:32:42 -05:00
Behdad Esfahbod
319c5fd10e py23 introduce byteord() and use it 2013-11-28 17:32:42 -05: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
b7a2d797a4 py23 Use bytechr() instead of chr() 2013-11-27 15:25:00 -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
14fb031125 Remove most uses of module string 2013-11-27 14:01:44 -05:00
Behdad Esfahbod
e5ca79699d 2to3 --fix=map with manual cleanup 2013-11-27 04:38:16 -05:00
Behdad Esfahbod
ac1b435946 2to3 --fix=idioms 2013-11-27 04:15:34 -05:00
Behdad Esfahbod
7cc6d271ac 2to3 --fix=long with manual cleanup 2013-11-27 04:00:15 -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
0ba7aa7ab5 Make __cmp__() functions stable 2013-10-28 12:07:15 +01: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
Behdad Esfahbod
96b321c8ae Fix comparison to arbitrary objects 2013-08-19 14:17:11 -04:00
jvr
a220bf3567 a different fix for [1296026]: just comment out the offending assert
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@557 4cde692c-a291-49d1-8350-778aa11640f8
2008-05-17 08:52:33 +00:00
jvr
03e02adeb4 back out 'fix', as this solution isn't portable
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@556 4cde692c-a291-49d1-8350-778aa11640f8
2008-05-17 08:44:06 +00:00
pabs3
14654b2a88 Apply 1296026: fix tracebacks in some timezones
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@551 4cde692c-a291-49d1-8350-778aa11640f8
2008-05-16 07:17:26 +00:00
fcoiffie
83f069d66c The dates are stored in 8-bytes fields (Microsoft reference document) but Macintosh dates are only coded with 4-bytes. In some fonts, these date fields are badly coded and 8-bytes are used. So, a ValueError occurs.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@502 4cde692c-a291-49d1-8350-778aa11640f8
2006-01-25 15:12:14 +00:00
jvr
f34c6f3937 fix for new 2.4 hex() behavior
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@478 4cde692c-a291-49d1-8350-778aa11640f8
2004-12-24 16:07:01 +00:00
jvr
266bf21dbe workaround for bug [ 766694 ] Error from invalid date
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@470 4cde692c-a291-49d1-8350-778aa11640f8
2004-09-25 10:01:12 +00:00
jvr
e73b8a53a5 Fix for bug #691744; calc_mac_epoch_diff() was broken when the timezone
was GMT (or perhaps other situations; it's not entirely clear).


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@391 4cde692c-a291-49d1-8350-778aa11640f8
2003-02-23 19:40:07 +00:00
jvr
1332d3e549 clean up checkSumAdjustment XML output: suppress trialing 'L'
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@386 4cde692c-a291-49d1-8350-778aa11640f8
2003-01-10 22:34:13 +00:00
jvr
26fc63c854 fix from Owen Taylor that fixes my previous patch; thanks!
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@385 4cde692c-a291-49d1-8350-778aa11640f8
2003-01-10 22:23:46 +00:00
jvr
df22c27d92 detab table string literal
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@384 4cde692c-a291-49d1-8350-778aa11640f8
2003-01-03 21:29:23 +00:00
jvr
130c1a0d9c make two fields unsigned, to conform to the spec but also to suppress Python 2.3 warnings for hex(negativenumber).
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@383 4cde692c-a291-49d1-8350-778aa11640f8
2003-01-03 21:23:04 +00:00
jvr
b74f03c7e5 fixed previous fix: it assumed 4 bytes of data, which is wrong
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@372 4cde692c-a291-49d1-8350-778aa11640f8
2002-10-08 14:22:16 +00:00
jvr
c3974fb055 Handle negative long time values gracefully instead of looping infinitely. Reported by Jessica P. Hekman
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@371 4cde692c-a291-49d1-8350-778aa11640f8
2002-10-07 21:34:47 +00:00
jvr
c3403cfbd4 style constency
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@168 4cde692c-a291-49d1-8350-778aa11640f8
2001-08-15 09:26:15 +00:00
jvr
95cf546fb4 dump macStyle as binary
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@166 4cde692c-a291-49d1-8350-778aa11640f8
2001-08-15 07:00:01 +00:00
Just
64892f5a34 Don't take month and day names from calendar.py: a buggy Metrowerks strftime() made this crash hard in Python 2.2.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@137 4cde692c-a291-49d1-8350-778aa11640f8
2001-06-27 23:09:57 +00:00
Just
cb317bfad3 The "flags" field is an unsigned short, not a byte
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@107 4cde692c-a291-49d1-8350-778aa11640f8
2000-06-07 18:07:14 +00:00
Just
7268e24408 be relaxed about zero padding the input data to 4-byte boundaries
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@87 4cde692c-a291-49d1-8350-778aa11640f8
2000-02-21 21:30:32 +00:00
Just
222aea7fca another 64-bit fix
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@86 4cde692c-a291-49d1-8350-778aa11640f8
2000-02-21 21:14:05 +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