70 Commits

Author SHA1 Message Date
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
bc7cf1fd5d [cffLib] Packing charset with only .notdef glyph fails
Fixes https://github.com/behdad/fonttools/issues/136
2014-07-09 14:30:06 -04:00
Behdad Esfahbod
ade1972557 Remove CFF Index.count member
Clean up.  len(index) should be used instead.
2014-06-16 15:35:15 -04:00
Behdad Esfahbod
b7367012e4 Add __contains__ to cffLib 2014-06-13 12:47:55 -04:00
Behdad Esfahbod
3012076942 Minor 2014-05-19 12:43:37 -06: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
Khaled Hosny
522cd11d51 Remove unnecessary new line after <CFF> tag
No other table does that.
2013-12-16 01:29:16 -05:00
Behdad Esfahbod
85a64db541 py23 Another cff encoding fix 2013-12-16 00:05:10 -05:00
Behdad Esfahbod
617ec41d4c Fix encoding conversion in CFF
Was broken with Python 3 and Salsa-Regular.otf for example.
2013-12-10 18:54:26 -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
d1ba7b53a4 ps23 Fix CFF glyphname encodings 2013-11-28 17:32:44 -05:00
Behdad Esfahbod
024d15317f py23 Fix CFF string encodings 2013-11-28 17:32:44 -05:00
Behdad Esfahbod
c076261598 s/latin-1/latin1/g 2013-11-28 17:32:44 -05:00
Behdad Esfahbod
18316aa769 ps23 More bytes fixes. All ''join()'s fixed 2013-11-28 17:32:43 -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
bb0beb7385 2to3 Use py23 to close some of the bytes/str/unicode gaps 2013-11-27 15:25:00 -05:00
Behdad Esfahbod
9005774c10 2to3 --fix=unicode equivalents
Remove usage of unicode module.  The rest are mostly false
positives.

Remains u'' in macUtils.py and u"" and unichr in M_E_T_A_.py.
2013-11-27 14:01:45 -05:00
Behdad Esfahbod
c2297cd41d 2to3 --fix=dict with manual cleanup 2013-11-27 14:01:45 -05:00
Behdad Esfahbod
2a9b86816e 2to3 --fix=basestring with manual fixup 2013-11-27 14:01:44 -05:00
Behdad Esfahbod
14fb031125 Remove most uses of module string 2013-11-27 14:01:44 -05:00
Behdad Esfahbod
3ec6a25823 2to3 --fix=print with manual fixup 2013-11-27 04:57:33 -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
3a9fd30180 2to3 equivalent to --fix=tuple_params
I hope I got this all right...
2013-11-27 03:30:21 -05:00
Behdad Esfahbod
cd5aad92f2 2to3 --fix=raise 2013-11-27 02:42:28 -05:00
Behdad Esfahbod
180ace6a5f 2to3 --fix=ne 2013-11-27 02:40:30 -05:00
Behdad Esfahbod
bc5e1cb195 2to3 --fix=has_key 2013-11-27 02:33:03 -05:00
Behdad Esfahbod
8c5c966471 Store CFF names in UTF-8
We switched XML encoding from Latin-1 to UTF-8.  Adjust CFF
code.
2013-10-28 13:20:00 +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
jvr
91bca42442 merging fixes & changes from delft-sprint-2012
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@611 4cde692c-a291-49d1-8350-778aa11640f8
2012-10-18 12:49:22 +00:00
jvr
2a9bcde369 - use the builtin symbols instead of the types module
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@542 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-07 19:56:17 +00:00
jvr
f6ff48be3c better float testing, so numpy.floats also work.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@541 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-07 19:49:25 +00:00
jvr
c60a44fa03 Some edits from rroberts:
# 1) speed optimizations
# 2) fixed parseCharset0 to support CFF-CID fonts.
# 3) fixed CharsetConverter.read to work a font that actually has one
of the pre-canned encodings.
# This fixes a stack dump.
# I did not try to support using these encodings when writing a font,
# as the cases will be so rare as to not justify the processing
overhead for all other fonts.

(Read: I took out some of your loop optimizations since I believe they
made the code a lot less clear. I also have my doubts whether they were
actually performance improvements.)


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@509 4cde692c-a291-49d1-8350-778aa11640f8
2006-10-21 13:41:18 +00:00
jvr
ce522410f2 small nits
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@418 4cde692c-a291-49d1-8350-778aa11640f8
2003-08-25 07:37:25 +00:00
jvr
489d76a340 Refactored outline extraction for CharStrings. The interface to
T{1,2}OutlineExtractor is not backwards compatible and this change
basically makes them private classes: CharStrings now have a .draw()
method that takes a Pen object (see fontTools.pens.*), so you never
have to deal with the extractor objects yourself. Only lightly tested.


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@417 4cde692c-a291-49d1-8350-778aa11640f8
2003-08-24 19:56:16 +00:00
jvr
ed10151701 Lots of CID work by rroberts.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@407 4cde692c-a291-49d1-8350-778aa11640f8
2003-08-22 19:53:32 +00:00
jvr
b9702ba0f1 Added support for the Encoding field. (Adam, please let me know if this
works for you.)


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@380 4cde692c-a291-49d1-8350-778aa11640f8
2003-01-03 20:56:01 +00:00
jvr
e2ca9b5a4f make 8-bit chars work in CFF Notice and Copyright fields
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@301 4cde692c-a291-49d1-8350-778aa11640f8
2002-09-09 14:18:39 +00:00
jvr
7ce0a139ab some progress bar support
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@293 4cde692c-a291-49d1-8350-778aa11640f8
2002-07-23 16:42:11 +00:00
jvr
b58176e5ac added support for raw bytecode: this happens unintentionally for subrs that aren't referenced, but it's good to have anyway, in case we want to switch T2 decompilation off.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@257 4cde692c-a291-49d1-8350-778aa11640f8
2002-05-24 11:55:37 +00:00
jvr
74cd1ef7b3 whoops, make charset format 2 work also..
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@256 4cde692c-a291-49d1-8350-778aa11640f8
2002-05-24 10:38:04 +00:00
jvr
6004bafc1f implemented compiling charset format 1 and 2
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@255 4cde692c-a291-49d1-8350-778aa11640f8
2002-05-24 10:35:13 +00:00
jvr
4e5af60930 CFF/T2 <-> XML roundtripping has begun!
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@254 4cde692c-a291-49d1-8350-778aa11640f8
2002-05-24 09:58:04 +00:00
jvr
f2cf9c5d6d first working version of CFF/T2 compiler; needs cleanup/refactoring, and doesn't import from XML yet; hardly tested.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@253 4cde692c-a291-49d1-8350-778aa11640f8
2002-05-23 21:50:36 +00:00