100 Commits

Author SHA1 Message Date
Behdad Esfahbod
283fb26820 By default, don't load fonts lazily
Lazy loading has implications on how people use objects.
So, by default, don't load lazily.  This only affects
GSUB/GDEF/GPOS/etc and is closer to what fonttools used
to do traditionally.

Turn lazy loading on in subset and inspect.
2013-12-16 00:52:29 -05:00
Behdad Esfahbod
9e6ef94b55 Use "is None" instead of "== None"
The latter hits the __eq__ method and can fail because we now
do not allow comparing objects of different types.

For example, was failing subsetting Andika-R.ttf.
2013-12-04 16:35:10 -05:00
Behdad Esfahbod
153ec40209 Fix a few pychecker warnings
Fixes https://github.com/behdad/fonttools/issues/58
2013-12-04 01:15:46 -05:00
Behdad Esfahbod
e388db566b py23 Use new-style classes
Such that we get the same semantics in both Python 2 and 3.
2013-11-28 18:53:30 -05:00
Behdad Esfahbod
c076261598 s/latin-1/latin1/g 2013-11-28 17:32:44 -05:00
Behdad Esfahbod
5f6418d9e1 py23 Turn Unicode XML parsing on; more bytes fixes 2013-11-28 17:32:43 -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
ac4672e451 py23 Introduce Tag to autoconvert tag types 2013-11-27 16:44:53 -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
223273f792 2to3 --fix=except 2013-11-27 14:01:37 -05:00
Behdad Esfahbod
3ec6a25823 2to3 --fix=print with manual fixup 2013-11-27 04:57:33 -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
8c35239853 Support ./ttx'ing woff files
Doesn't dump woff metadata/private sections yet.
2013-11-26 12:58:28 -05:00
Behdad Esfahbod
5f875e76d6 Merge pull request #28 from olivierberten/ttc
Catch TTLibError raised when missing (or wrong) -y argument on a ttc file
2013-11-25 04:44:04 -08:00
Behdad Esfahbod
188f2a398a Default to non-lazy for ttx 2013-11-24 19:04:25 -05:00
Behdad Esfahbod
38fdae6342 Use True/False instead of 1/0 2013-11-24 18:49:35 -05:00
Olivier Berten
70343cc48e Catch TTLibError raised when missing (or wrong) -y argument on a ttc file 2013-11-19 10:32:09 +01:00
Behdad Esfahbod
271f25feed More fixup 2013-11-14 21:57:25 -05:00
Behdad Esfahbod
d1072ddcc9 Further fixup to cf75a7c5d05b96df6c6cacde3fdc53e8e6cb200d 2013-11-14 20:28:12 -05:00
Behdad Esfahbod
cf75a7c5d0 Fixup ttx file-name mangling after eac107f1 2013-11-14 18:59:41 -05:00
Behdad Esfahbod
eac107f11f Fix regex module usage
Previously the opentypeheaderRE thing was never matching, making
ttx always use ttf extension instead of otf.
2013-11-01 00:43:06 +00:00
Dave Crossland
d7efd5692c Make parsing XML quiet 2013-09-04 14:51:16 +01:00
Dave Crossland
5ffb91eb8c Fix: Actually parse q for Quiet mode 2013-09-04 14:49:37 +01:00
Dave Crossland
85af40e7d8 Adding quiet mode to xmlImport 2013-09-04 13:30:21 +01:00
Dave Crossland
b158597aea Add -q for quiet mode 2013-09-04 13:16:39 +01:00
Matt Fontaine
7baa13689c Add -z flag to ttx to choose a bitmap dump format 2013-08-19 14:16:04 -04:00
pabs3
278d4d8cea Fix syntax error
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@617 4cde692c-a291-49d1-8350-778aa11640f8
2013-06-22 08:16:33 +00:00
pabs3
e83b4c4482 Detect both types of quotes when detecting OTF vs TTF XML.
Fixes: http://sourceforge.net/p/fonttools/bugs/47/

git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@616 4cde692c-a291-49d1-8350-778aa11640f8
2013-06-22 08:13:22 +00:00
pabs3
5f4193373b Writing to stdout is not actually implemented yet
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@615 4cde692c-a291-49d1-8350-778aa11640f8
2013-06-22 06:47:34 +00:00
pabs3
fb37a24708 Implement writing output to arbitrary files including stdout.
Partially-fixes: http://sourceforge.net/p/fonttools/feature-requests/7/

git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@614 4cde692c-a291-49d1-8350-778aa11640f8
2013-06-22 06:43:01 +00:00
pabs3
ca75e43333 Fix some typos in the ttx usage instructions
Patch-by: Paul Flo Williams <paul@frixxon.co.uk>
Fixes: https://bugzilla.redhat.com/694387
Fixes: http://sf.net/support/tracker.php?aid=3279073

git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@590 4cde692c-a291-49d1-8350-778aa11640f8
2011-10-30 12:26:09 +00:00
pabs3
b8ce5bfe27 Remove shebang from ttyx.py since it is not executed directly
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@589 4cde692c-a291-49d1-8350-778aa11640f8
2011-03-28 10:41:39 +00:00
pabs3
0a6dea0ac2 Fix typo in help output.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@575 4cde692c-a291-49d1-8350-778aa11640f8
2009-11-08 15:53:24 +00:00
pabs3
7e91e776c9 Apply remainder of #1675210: add support for TrueType Collection (TTC) files.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@564 4cde692c-a291-49d1-8350-778aa11640f8
2009-02-22 08:55:00 +00:00
jvr
142506b07d added comment, the OTL Extension mechanism should not be here
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@546 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-09 20:39:38 +00:00
jvr
45d1f3b3b5 - removed support for Python 2.2 on MacOS 10.2
- worked around a bug in GetCreatorType() on intel Macs


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@526 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-01 11:34:54 +00:00
jvr
1bcc11dcf6 Expose ignoreDecompileErrors as a command line option (-e, to set
ignoreDecompileErrors to to false)


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@525 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-01 09:42:58 +00:00
jvr
823f8cd15f Misc patches from rroberts:
fontTools/ttx.py
  # support virtual GIDs, support handling some GSUB offset overflows.

fontTools/ttlib/__init__.py
# 1) make getReverseGlyphMap  a public function; I find a reverse map
to often be useful
# 2) support virtual glyphs, e.g. references to GID's that are not in the font.
# Added the TTFont argument allowVID (default 0) to turn this off and on;
# added the arg requireReal ( default 0) so as to get the obvious
default behaviour when
# allowVID is 0 or 1, but to allow requiring a true GID when allowVID is 1.

fontTools/ttlib/tables/otBase.py
fontTools/ttlib/tables/otConverters.py
fontTools/ttlib/tables/otData.py
fontTools/ttlib/tables/otTables.py
# 1) speed optimization
# - collapse for loops
# - do not decompile extension lookups until a record is requested
from within the lookup.
# 2) handling offset overflows
# 3) support of extension lookups
# 4) Fixed FetauresParam converter class def so as to survive a font
that has this offset non-NULL.
# This fixes a stack dump.
# The data will now just get ignored


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@511 4cde692c-a291-49d1-8350-778aa11640f8
2006-10-21 14:12:38 +00:00
jvr
e0912bb819 fix for new 2.4 hex() behavior
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@477 4cde692c-a291-49d1-8350-778aa11640f8
2004-12-24 15:59:35 +00:00
jvr
6588c4e2df Patch #845551 from Anthony Fok:
- two minor typos
- changed copyright year in LICENSE (and it's 2004 now...)


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@464 4cde692c-a291-49d1-8350-778aa11640f8
2004-09-25 07:35:05 +00:00
jvr
3d24a106ba don't use macfs, it's deprecated
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@416 4cde692c-a291-49d1-8350-778aa11640f8
2003-08-24 19:52:03 +00:00
jvr
2e838ce766 Jaguar Python 2.2 workaround
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@400 4cde692c-a291-49d1-8350-778aa11640f8
2003-08-22 18:50:44 +00:00
jvr
f7f0f74419 ugh, the zfill string method doesn't exist in 2.2.1 and earlier :-(
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@366 4cde692c-a291-49d1-8350-778aa11640f8
2002-09-14 15:31:26 +00:00
jvr
70e2cb86e8 add simple support for Mac Suitcases, when running on MacOS
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@358 4cde692c-a291-49d1-8350-778aa11640f8
2002-09-12 22:59:09 +00:00
jvr
2921bb25cd doh! fixed wrong indentation, now does batch jobs again...
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@352 4cde692c-a291-49d1-8350-778aa11640f8
2002-09-12 20:05:23 +00:00
jvr
1c803b6988 moved all ttx code to new fontTools.ttx module
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@346 4cde692c-a291-49d1-8350-778aa11640f8
2002-09-12 17:33:12 +00:00