Cosimo Lupo
452c85ecef
Update Blocks, Scripts and ScriptExtensions for Unicode 11
...
I run: python3 MetaTools/buildUCD.py
2018-07-12 11:35:16 +01:00
Cosimo Lupo
460c08286d
test_plistlib: add test for pretty_print=False
2018-07-11 18:33:10 +01:00
Cosimo Lupo
8011e828dd
glifLib: call plistlib.totree with intent_level=2
...
since 'lib' element is itself contained in 'glyph' root element
2018-07-11 18:32:37 +01:00
Cosimo Lupo
790876da04
plistlib: justify multiline base64 data; add 'pretty_print' option
...
we right-justifiy binary data text to max 76 chars (min 16) per line
similarly to the way the stdlib plistlib module does (although they
use tabs for indentation, equivalent to 8-spaces).
We write the plist doctype ourselves, otherwise lxml always adds a
newline to it (even wen pretty_print is False).
2018-07-11 18:27:12 +01:00
Cosimo Lupo
a8124a0eef
plistlib: use double-quotes in xml declaration
...
for consistency with glifLib
2018-07-11 13:29:54 +01:00
Cosimo Lupo
61c19acace
Add test_plistlib.py
...
this is basically the same cpython plistlib test suite,
rewritten as pytest-style tests
2018-07-11 12:48:14 +01:00
Cosimo Lupo
01269bfee7
test: replace all readPlist/writePlist with load/dump
2018-07-11 12:30:11 +01:00
Cosimo Lupo
584666ffe9
glifLib: use new plistlib load/dump/totree/fromtree
2018-07-11 12:29:18 +01:00
Cosimo Lupo
0b15b7d61e
ufoLib: use new plistlib load/dump instead of readPlist/writePlist
2018-07-11 12:28:26 +01:00
Cosimo Lupo
0776e9405c
remove ufoLib.plistFromETree, superseded by new plistlib
2018-07-11 12:27:47 +01:00
Cosimo Lupo
715d6c6b68
Add plistlib module from ufoLib2
...
https://github.com/fonttools/ufoLib2/blob/master/src/ufoLib2/plistlib.py
replaces the old ufoLib.plistlib shim, privides a single interface
similar to python3's stdlib `plistlib` module, but built on top of
lxml.
On python < 3, it requires the singledispatch backport.
This will be added as conditional installation requirement.
2018-07-11 12:26:00 +01:00
Cosimo Lupo
657b4cf496
test_glifLib: add test to check double-quoted XML_DECLARATION
2018-07-10 18:56:30 +01:00
Cosimo Lupo
cdbb2d6b30
glifLib: use double quotes in XML declaration like old ufoLib
...
fixes #158
2018-07-10 18:56:30 +01:00
Cosimo Lupo
b3b495153b
Bump version: 2.2.4 → 2.2.5.dev0
2018-07-10 16:24:02 +01:00
Cosimo Lupo
46d11299b0
Release 2.2.4
2018-07-10 16:18:13 +01:00
Cosimo Lupo
1780a11b99
test_glifLib: add basic roundtrip test for read/write glif/string functions
2018-07-10 16:02:47 +01:00
Cosimo Lupo
4cb26a3521
_glifTreeFromString: ensure we pass UTF-8 bytes to etree.fromstring
...
Fixes https://travis-ci.org/robofab-developers/fontParts/jobs/402178235#L499
Instead of passing a unicode string to lxml.etree.fromstring, which must not have
an XML declaration containing an explicit encoding, we now pass a UTF-8 bytes string.
The latter may or may not have the xml declaration. If it doesn't, UTF-8 is implied
by lxml parser (libxml2 defaults to UTF-8 internally).
2018-07-10 15:39:58 +01:00
Cosimo Lupo
489c6baa02
Bump version: 2.2.3 → 2.2.4.dev0
2018-07-10 12:51:14 +01:00
Cosimo Lupo
754b89fbaf
Release 2.2.3
2018-07-10 12:50:45 +01:00
Cosimo Lupo
586b83c1f1
Merge pull request #157 from anthrotype/xml-declaration
...
add the default xml declaration in writeGlyphToString
2018-07-10 13:47:00 +02:00
Cosimo Lupo
864bb26eb4
glifLib: avoid re-encoding str to utf-8 when writing to file
...
the writeGlyphToString will still return a unicode string, like it's always done.
However, in the writeGlyph method we can call a private _writeGlyphToBytes and
write UTF-8 bytes directly instead of decoding them, then re-encoding them as
we write to the file.
2018-07-10 12:37:15 +01:00
Cosimo Lupo
c51ca22a6b
test_GLIF{1,2}: use itertools.islice to skip first line with xml declaration
2018-07-10 12:23:22 +01:00
Martin Hosken
d5a1e5257e
Simplify code for language statement
2018-07-09 21:10:46 +01:00
Cosimo Lupo
7bbdf6eef2
test: skip first line in pyToGLIF helper function
2018-07-09 20:16:18 +01:00
Cosimo Lupo
8ad8f7631c
glifLib: writeGlyphToString must include the xml declaration
...
This is a regression from ufoLib v2.1.1, see
https://github.com/adobe-type-tools/afdko/pull/462#issuecomment-403577134
https://travis-ci.org/adobe-type-tools/afdko/jobs/401751859#L8427
2018-07-09 20:16:18 +01:00
Martin Hosken
d76f447775
More depths to allowing languages in DFLT
2018-07-09 16:41:54 +01:00
Jeremie Hornus
b72c9b9724
test private subr simpler
2018-07-09 15:07:08 +02:00
Jeremie Hornus
d95c09f272
<head> indexToLocFormat : first
2018-07-09 15:03:47 +02:00
Jeremie Hornus
11b004e172
improvements to CFF merge after Cosimo’s comments
2018-07-09 14:55:08 +02:00
Miguel Sousa
523c31dd0b
Add context manager to XMLWriter
...
93103c08ca (r29633076)
2018-07-08 22:12:44 -07:00
Jeremie Hornus
8410c0c070
bug fix with CFF charSet order and make better use of Subsetter
2018-07-08 13:13:03 +02:00
Jeremie Hornus
4966804d9d
[merge] desubroutinizing with _DesubroutinizingT2Decompiler
...
No final compression (may happen after, outside merge)
2018-07-07 15:35:39 +02:00
Jeremie Hornus
660a057fb3
merges CFF tables
2018-07-07 14:41:46 +02:00
Ben Kiel
530c723e91
Bump version: 2.2.2 → 2.2.3.dev0
2018-07-04 17:07:19 -05:00
Ben Kiel
ac5cf7f6ed
Release 2.2.2
2018-07-04 17:04:09 -05:00
Ben Kiel
c6712ad2f7
Bump version: 2.2.1 → 2.2.2.dev0
2018-07-04 17:02:46 -05:00
Ben Kiel
a93a441acb
Merge pull request #154 from unified-font-object/small_validation_fixes
...
Small validation fixes
2018-07-04 16:02:47 -05:00
Ben Kiel
e1227441e4
Grammer
2018-07-04 15:02:26 -05:00
Ben Kiel
53b4352a3b
Turn on validation by default in glyphLib
2018-07-04 13:56:44 -05:00
Ben Kiel
926bbdd57e
Update __init__.py
2018-07-04 13:48:37 -05:00
Frederik Berlaen
7763e01ef8
append the image fileName when no validation is required
2018-07-04 14:44:35 +02:00
Frederik Berlaen
46fefd82c7
set the _validate attribute before reading or writing anything
2018-07-04 14:44:05 +02:00
Cosimo Lupo
d01c383fe9
Release 2.2.1
2018-07-03 19:15:36 +01:00
Ben Kiel
00595aa4f8
Bump version: 2.2.0 → 2.2.1.dev0
2018-07-03 10:42:56 -05:00
Ben Kiel
4811c3ddc6
Release 2.2.0
2018-07-03 10:39:32 -05:00
Ben Kiel
acf8e83d33
Bump version: 2.1.2.dev0 → 2.2.0.dev0
2018-07-03 10:35:27 -05:00
Miguel Sousa
8d7774a3e8
[pscharstrings] Optimize the charstring's bytecode
...
by encoding as integers all float values that have no decimal portion.
This optimization is expected to reduce the file size of CFF2 fonts that have intermediate masters.
Related to https://github.com/adobe-type-tools/afdko/issues/444
Many thanks to @cjchapman for the help on the fixed point math
2018-06-29 09:54:00 -07:00
bgermann
d438f15118
Add missing import
2018-06-28 14:07:14 +02:00
Martin Hosken
1ae0bf87a0
Allow any languages under DFLT script
2018-06-20 09:42:46 +01:00
Cosimo Lupo
f251c8d665
Bump version: 3.28.0 → 3.28.1.dev0
2018-06-19 17:30:35 +01:00