Adrien Tétar
8044d2fb88
Use ElementTree in glifLib and drop embedded XML parsing infrastructure
2016-05-20 11:11:15 -07:00
Khaled Hosny
f88c43d105
Check for file attribute before deleting it
...
I don’t know why this is happening, but I’m getting attribute error when
I build https://github.com/khaledhosny/mada with compreffor
optimisations on.
2016-05-19 20:50:10 +02:00
Tal Leming
29db50cd01
Remove plistlib shim.
2016-05-16 15:02:19 -04:00
Tal Leming
ca217854ba
Remove local testing code.
2016-05-16 14:58:32 -04:00
Tal Leming
173669b265
Add a fallback for OSFS when fs isn't installed.
2016-05-16 14:57:46 -04:00
Cosimo Lupo
ca8e49b6f5
subset: fix typo
...
Ouch.
2016-05-16 17:05:46 +01:00
Cosimo Lupo
920c6a8249
subset: set maxp.maxStorage to 0 when --no-hinting option is passed
...
'maxStorage' is the maximum number of Storage Area locations used.
If there's no hinting, it should be 0.
2016-05-16 15:57:17 +01:00
Tal Leming
db9467ff1e
Merge branch 'master' into ufo4
2016-05-16 10:24:09 -04:00
Tal Leming
4d26482e9a
Add an optimized implementation of the kerning value lookup algorithm from the spec.
...
The optimization is that the caller can provide glyph to group mappings.
2016-05-16 10:22:38 -04:00
Cosimo Lupo
6c1c2a44d1
cffLib: use tostr() when getting SID of indexed string (or we end up with duplicates in py3)
...
I noticed this issue while porting compreffor to py3. In my test fonts, the binary
CFF tables as generated with python 2 sometimes were slightly different from the
ones generated with python 3, although the TTX dump was identical!
It turns out, when running in Python 3, cffLib adds extra entries to the
list of CFF indexed strings, because of bytes vs str.
The `IndexedStrings.getSID` method takes an input string 's' and and returns
the SID integer for that string. If it's a new string, it gets appended to the
list, as well as to an internal strings-to-SID mapping, so that the same SID
value is returned for any given string.
The problem with python 3 was that, if the input string was of `bytes` type
instead of `str`, then the test for inclusion (the dict's `__contains__`)
would return False, and as a result the "same" string (e.g. "Regular" and
b"Regular") could be encoded twice in the list of CFF strings.
(yes, we desperately need unit tests for cffLib...)
2016-05-16 13:11:46 +01:00
justvanrossum
650aae7cf3
making error and warning consistent #604
2016-05-13 07:10:47 +02:00
justvanrossum
1394416821
Better error message for broken hmtx/vmtx table, addressing #604 .
2016-05-13 07:07:52 +02:00
Behdad Esfahbod
26bb99e1c3
[subset] Whitespace
2016-05-12 13:40:14 +02:00
Behdad Esfahbod
cd914c9575
[subset] Protect against some more prematurely-short arrays
2016-05-12 13:40:14 +02:00
Behdad Esfahbod
85750a864a
[subset] Protect against prematurely-short arrays GPOS
2016-05-12 13:40:14 +02:00
Behdad Esfahbod
18e53dbdf5
[varLib] Minor
2016-05-12 13:40:14 +02:00
Rod Sheeter
df2c2c7128
Verify that we can see individual parts of timing messages
2016-05-11 17:39:37 -07:00
Rod Sheeter
74e7400097
Minimal change to allow Google Fonts to easily capture subset timings serverside via log handler.
2016-05-11 12:59:37 -07:00
Masaya Nakamura
a8c7788d66
Fix _getGlyphSetFormatVersion3()
2016-05-11 17:50:14 +09:00
Cosimo Lupo
a796b03366
py23: raise Py23Error when using 'xrange'
...
see https://github.com/behdad/fonttools/pull/600#issuecomment-216935319
2016-05-04 18:31:13 +01:00
Cosimo Lupo
7efb32b2de
py23: always use iterator whether one uses 'range' (py3) or 'xrange' (py2)
2016-05-04 17:16:39 +01:00
Tal Leming
08f8f114cb
Implement writing to package or ZIP.
...
This has only been lightly tested. It slightly breaks defcon, but I'll
deal with that later.
2016-05-04 10:53:43 -04:00
Tal Leming
59d723b9f8
GlyphSet tweaks.
2016-05-03 10:17:48 -04:00
Tal Leming
622b7c9352
ZIPs will contain a single root directory that packages will not. Abstract this.
2016-05-03 09:59:26 -04:00
Tal Leming
45910b6131
Initial work on reading single file UFO.
...
This is a work in progress update of UFOReader and UFOWriter that
supports UFO in its package and zipped forms. Reading works. Writing is
not yet implemented.
I'm building a base file system (that lives on top of fs for now and
maybe in the long term) that the reader and writer then subclass. This
base class implements the file system interaction so that the reader
and writer can be blissfully ignorant about file systems.
Additionally, I ran into a problem with the local plistlib.py creating
an import error, so I've temporarily renamed it plistlibShim.py so that
I can continue working.
Did I mention that this is a work in progress? It's a work in progress.
2016-05-02 23:06:25 -04:00
Khaled Hosny
b5afd862e1
[glyf] Round component offset before compiling
...
We can get a float here.
2016-04-30 00:16:15 +02:00
Cosimo Lupo
70ec8513d0
varLib: use cElementTree if available to parse designspace
...
The C implementation of ElementTree is included in CPython since 2.5.
It's got the same API and is up to 20 times faster than the Python implementation.
We'd better use it.
2016-04-28 09:56:21 +01:00
Behdad Esfahbod
7a9c6be76c
[mtiLib] Warn if trailing tabs are found
2016-04-27 17:04:25 -07:00
Behdad Esfahbod
71633457df
[mtiLib] Ignore trailing tabs
2016-04-27 16:58:38 -07:00
Behdad Esfahbod
973270e7f9
[mtiLib] Assert that glyph name is not empty
2016-04-27 16:58:33 -07:00
Sascha Brawer
9f287353f3
[CPAL] Support CPAL table version 1
2016-04-27 13:15:45 +02:00
Behdad Esfahbod
da4d097234
[varLib.mutator] Add minimal docstring
2016-04-27 01:41:48 -07:00
Behdad Esfahbod
5fdd980564
[varLib.mutator] Remove copy-pasta comments
2016-04-27 01:40:46 -07:00
Behdad Esfahbod
3238b4270e
[varLib] Add mutator, which instantiates a variation font
...
Run, eg:
$ python mutator.py ./NotoSansArabic-GX.ttf wght=140 wdth=85
API to be cleaned up.
2016-04-27 01:30:59 -07:00
Behdad Esfahbod
e13f46c1dd
[varLib] Add _SetCoordinates()
2016-04-27 01:30:12 -07:00
Behdad Esfahbod
e391cdb787
[glyf] GlyphCoordinates: Implement __del__()
2016-04-27 01:14:08 -07:00
Behdad Esfahbod
e36b7069d9
[glyf] GlyphCoordinates: Upgrade to float in math ops if needed
2016-04-27 01:11:40 -07:00
Behdad Esfahbod
ac26b33f48
[varLib] Copy coordinates before modifying
2016-04-27 00:25:31 -07:00
Behdad Esfahbod
e963a5b2c9
[varLib] Remove unused imports
2016-04-27 00:21:46 -07:00
Behdad Esfahbod
f7d390a955
[varLib] Minor refactoring, and bug fix
2016-04-27 00:15:07 -07:00
Behdad Esfahbod
c8b5b618e0
[varLib] Minor simplification
2016-04-26 23:59:39 -07:00
Sascha Brawer
9e7e77bdf4
[CPAL] Share color records when possible
2016-04-26 17:40:00 +02:00
Sascha Brawer
15781e4183
Add unit tests for handling CPAL table
2016-04-26 11:53:09 +02:00
moyogo
84e7423a6e
[feaLib] use OrderedDict instead of dict in MarkClass
2016-04-26 06:58:46 +01:00
moyogo
4ec59b27dd
[feaLib] add test for issue #504
2016-04-25 22:37:58 +01:00
moyogo
f81e1411b3
[otlLib] glyph class as list and tuple instead of set and frozenset
2016-04-25 22:37:34 +01:00
moyogo
17c8e582d0
[feaLib] glyph class as list and tuple instead of set and frozenset
2016-04-25 22:36:56 +01:00
Khaled Hosny
cdda278bd4
Use ttLib.newTable when possible
...
I learnt about it from [1] and seems like a nice thing to use.
1. https://github.com/behdad/fonttools/pull/586#issuecomment-213285350
2016-04-23 02:00:24 +02:00
Tal Leming
185c04220d
The UFO spec has changed with regard to kerning conflicts. Reflect this in ufoLib.
2016-04-22 13:30:28 -04:00
Miguel Sousa
cc5d6c96fa
don't hardcode the table tags, rely on ttLib.getClassTag instead
2016-04-21 23:42:13 -07:00