Cosimo Lupo
f083209590
[woff2] use OrderedDict like sfnt module
2015-08-19 16:36:03 +01:00
Cosimo Lupo
4fe88a41f3
[TTFont] fix reorderTable logic
2015-08-19 15:47:07 +01:00
Behdad Esfahbod
9aed8e1e9d
Merge pull request #270 from anthrotype/woff2_14
...
implement WOFF2 encoder/decoder as standalone module
2015-08-19 15:33:44 +01:00
Cosimo Lupo
6ba67ab699
[TTFont] changed behaviour of 'reorderTables' argument of save function
...
Reorder to OT spec recommended order if reorederTables == True (default).
Don't reorder if reorderTables == None.
Keep the input font original table order if reorderTables == False (and
the font has a reader object from which to get the original order).
2015-08-19 14:36:58 +01:00
Cosimo Lupo
099c260b36
[sfnt] use OrderedDict for SFNT{Reader,Writer}.tables dictionaries
2015-08-19 14:36:51 +01:00
Cosimo Lupo
4d6a94dfaa
[_v_h_e_a] don't recalc vertical bounds if recalcBBoxes == False
2015-08-17 10:23:03 +01:00
Cosimo Lupo
f7064535ba
[woff2_test] rename py3 deprecated 'assertRaisesRegexp' to 'assertRaisesRegex'
2015-08-11 17:47:17 +01:00
Cosimo Lupo
77b1a4aa8e
rename 'test_data' folder to 'testdata' so it matches #334
2015-08-11 16:31:09 +01:00
Cosimo Lupo
915b8c303a
Merge pull request #332 from miguelsousa/mixed_indents
...
fix "indentation contains mixed spaces and tabs" errors reported by Landscape
2015-08-09 13:21:30 +01:00
Miguel Sousa
d28a942683
fix two misc errors reported by Landscape
2015-08-09 00:40:31 -07:00
Miguel Sousa
a7aef47695
fix "indentation contains mixed spaces and tabs" errors reported by Landscape
2015-08-09 00:33:50 -07:00
Cosimo Lupo
2a713bfd79
[woff2/woff2_test] replace 'StringIO' with 'BytesIO'
2015-08-07 18:23:55 +01:00
Cosimo Lupo
0d21b67162
[woff2_test] add unit tests for woff2 module
2015-08-07 18:23:41 +01:00
Cosimo Lupo
4fc34de9e6
[ttLib] add 'test_data' folder containing font data to use in unit tests
2015-08-07 18:23:41 +01:00
Cosimo Lupo
b6ce7ae668
[woff2] add woff2 module with support for reading/writing single WOFF2 fonts (no font collections yet)
2015-08-07 18:23:41 +01:00
Cosimo Lupo
77ffbab995
[glyf] pad glyph data upon compile if self has attribute 'padding'
2015-08-07 18:23:41 +01:00
Cosimo Lupo
d50af59a52
[ttLib] pass if _getGlyphNamesFromCmap raises KeyError on 'cmap'
...
when _getGlyphNamesFromCmap gets called by the cmap parser itself, the
partially loaded subtable is removed and then restored later.
However, when a TTFont instance is imported from XML rather than from
binary file, its 'reader' attribute is None, and so the line:
tempcmap = self['cmap'].getcmap(3, 1)
will make TTFont.__getitem__ raise KeyError. It's better to fail nicely,
and return a dummy glyphOrder based on maxp numGlyphs.
2015-08-07 18:23:41 +01:00
Cosimo Lupo
2996c2e308
[sfnt] ovveride __new__ methods of SFNTReader and SFNTWriter to return flavor-compatible instances
2015-08-07 18:23:41 +01:00
Cosimo Lupo
bf0e336d31
replace all 'StringIO' with 'BytesIO'
2015-08-07 17:25:22 +01:00
Cosimo Lupo
4bfbdc8852
[xmlReader] initialise OTTableWriter instance with self.longOffset = False
...
Fixes https://github.com/behdad/fonttools/issues/323
2015-07-24 15:55:58 +01:00
Cosimo Lupo
c67295d759
remove remaining references to fondLib in macUtils.py and install.txt
...
Fixes #319
2015-07-08 16:40:19 +01:00
Sascha Brawer
48cfcb076f
Add ‘meta’ to the list of supported tables
2015-07-03 15:13:04 +02:00
Sascha Brawer
3a6e5aca55
Merge pull request #315 from brawer/meta
...
Implement Apple’s “meta” table
2015-07-03 11:43:27 +02:00
Sascha Brawer
11d3770ca6
Implement Apple’s “meta” table
...
Because I could not find any fonts with “dlng” (design languages) or
“slng” (supported languages) sub-tables, these are not implemented yet.
We could easily implement them according to spec, but it is unclear
to what extent the spec is matching reality.
2015-07-03 11:36:50 +02:00
Behdad Esfahbod
c7187c3b20
Optimize reading array of GlyphIDs
2015-07-03 01:15:16 -07:00
Behdad Esfahbod
7d38ebb143
Minor
2015-07-03 01:01:10 -07:00
Behdad Esfahbod
0097e40ced
Minor
2015-07-03 00:55:54 -07:00
Behdad Esfahbod
089241a587
Minor
2015-07-03 00:53:15 -07:00
Behdad Esfahbod
a7e9d634d7
Minor
2015-07-03 00:50:34 -07:00
Behdad Esfahbod
1fbbbdd358
Micro-optimization for previous commit
2015-07-03 00:49:28 -07:00
Behdad Esfahbod
754a20d987
Implement lazy array for loading otData-driven arrays
...
Speeds up subsetting of GPOS table with many pairs by huge factor
(counted 5).
2015-07-02 18:00:41 -07:00
Behdad Esfahbod
92093990cc
[ot] Minor
2015-07-02 15:01:20 -07:00
Behdad Esfahbod
aa9b3b6d43
[ot] Add readArray() and writeArray()
...
To be used soon to optimize partial / glyph array loading.
2015-07-02 15:01:15 -07:00
Behdad Esfahbod
64f1179230
Minor moving code around in prep for optimization work
2015-07-02 15:01:11 -07:00
Sascha Brawer
db1773af5d
Remove redundant line
...
It should have been removed in #4792d7419cd44a6fb3988b760b87dcb494db8488
2015-07-01 12:21:07 +02:00
Sascha Brawer
4792d7419c
Do not expose 'fvar' axis and instance flags in XML
...
The specification defines no values for these flags.
Resolves https://github.com/behdad/fonttools/issues/312
2015-07-01 09:10:32 +02:00
Cosimo Lupo
e05db5c75f
[_c_m_a_p] fix compiling of cmap subtable format 6
...
Fixes https://github.com/googlefonts/fontbakery/issues/551
the `codes` variable needs to be a sorted list of cmap keys, else the following line
```python
codes = range(codes[0], codes[-1] + 1)
```
cannot work properly, since dict keys are unsorted.
Up until 13a08d0c3a59402459875155b7dbd194787fb229, there was a line with
```python
codes.sort()
```
which was deleted for some reason.
2015-06-27 17:01:51 +01:00
Sascha Brawer
292315cf63
[GX] Use OpenType range for weight axis in ‘fvar’ test
2015-06-27 02:07:37 +02:00
Cosimo Lupo
4fd6373b92
[TTFont] keep input file open if we didn't open it
2015-06-26 18:30:18 +01:00
Cosimo Lupo
356c923411
[TTFont] wrap input file in a temporary stream to allow overwriting
...
Fixes https://github.com/behdad/fonttools/issues/302
2015-06-26 12:19:42 +01:00
Behdad Esfahbod
389c445760
Merge pull request #300 from brawer/fvar
...
[GX] Make it easier to construct ‘fvar’ tables from code
2015-06-26 01:48:03 -07:00
Behdad Esfahbod
e7795be277
Merge pull request #307 from garretrieger/master
...
Test for load a kern table with a bad glyph id.
2015-06-25 18:36:02 -07:00
Behdad Esfahbod
0c68f18361
Fix compile/decompile of kern table with invalid glyphs
...
Was "broken" in the performance work in commits
8724513a67f954eac56eeb77ced12e27d7c02b6b and
1d93f9099de4987c5c7d7e49a23f4c46a45dfab2.
Use slow method if exception raised.
The changes should move to TTFont layer itself. I'll move them
in a separate commit.
2015-06-25 18:31:52 -07:00
Garret Rieger
8bebea7253
Test for load a kern table with a bad glyph id.
2015-06-25 18:17:04 -07:00
Behdad Esfahbod
16edc99440
Merge pull request #305 from anthrotype/fix_program_len
...
add doctests for __bool__ method in ttProgram.Program and _f_p_g_m
2015-06-25 11:46:47 -07:00
Cosimo Lupo
3a856eeef8
[ttProgram] add doctests for __bool__ method
2015-06-25 19:22:42 +01:00
Cosimo Lupo
efdb837075
[_f_p_g_m] add doctests for __bool__ method
2015-06-25 19:22:01 +01:00
Cosimo Lupo
ca6e5c4f0a
Merge pull request #303 from anthrotype/fix_program_len
...
[ttProgram] add missing __len__ method to Program class
2015-06-25 20:06:05 +02:00
Cosimo Lupo
ac41b6086b
[_f_p_g_m] remove __len__ method from fpgm (and prep) table
2015-06-25 19:03:39 +01:00
Cosimo Lupo
733c05f51d
[_f_p_g_m] add __bool__ and __nonzero__ methods to fpgm table
2015-06-25 19:03:39 +01:00