348 Commits

Author SHA1 Message Date
Cosimo Lupo
a398996855
ttx_test: add test for -g splitGlyphs option 2018-02-28 13:13:31 +00:00
Cosimo Lupo
6473cc9349
add more tests for userNameToFilename function
plus minor whitespace
2018-02-28 12:26:52 +00:00
Bill Amidei
ccae4687cc
Moving userNameToFileName to its own file, adding unit test 2018-02-28 11:30:33 +00:00
Cosimo Lupo
232e2b8467
Revert "Merge pull request #1130 from anthrotype/temp-revert-split-glyphs"
This reverts commit 060f856f92e0fb2d8e60f6be080c89c08528bacb, reversing
changes made to 1e42224af741fac73e20f7193d8115cfda7d3594.
2018-02-28 11:24:19 +00:00
Cosimo Lupo
e5c0bdd5df
[feaLib.ast] make location=None by default
This would make it easier to construct feaLib AST from code,
where the location is not defined and thus should be None.
Also, we can make other arguments as kwargs with a default
value, now that the first parameter is no longer 'location'.
2018-02-27 19:00:08 +00:00
Cosimo Lupo
05e66d29d0
Merge pull request #1175 from belluzj/add-designspace-lib
Add properties to designspace documents
2018-02-26 12:01:49 +00:00
Miguel Sousa
efca91e7f1 [_n_a_m_e_test] ensure that struct format string is native str
https://github.com/fonttools/fonttools/pull/1193#issuecomment-367769342
2018-02-23 03:02:06 -08:00
Miguel Sousa
d401b2522b [cffLib_test] Test setting topDict.Encoding
#1177
2018-02-23 03:02:06 -08:00
Miguel Sousa
299dbcbe14 [cffLib_test] use boilerplate class; change class and method names 2018-02-23 03:02:06 -08:00
Miguel Sousa
bf6852a7f6 [ttx_test] Test for split tables (-s) option
#1188
2018-02-22 07:38:25 -08:00
Cosimo Lupo
97375135c4
lexer_test: catch IncludedFeaNotFound explicitly 2018-02-21 18:02:55 +00:00
Behdad Esfahbod
1adf7fd2c0 [varLib] Update tests for VarStore optimization
Also, don't emit GDEF if VarStore is empty.
2018-02-21 01:10:36 -08:00
Behdad Esfahbod
d5efd2b7ee [varLib] When optimizing NumShorts, drop zero columns
Related to https://github.com/fonttools/fonttools/issues/1184
2018-02-20 20:51:56 -08:00
Behdad Esfahbod
48125e9812 [varLib] Fix HVAR generation
We cannot tail-optimize there.
2018-02-18 22:58:47 -08:00
Behdad Esfahbod
21cbab8ce9 Fix read/write of VarIdxMap to use glyph names
Was relying on glyph IDs. Ouch.
2018-02-18 22:33:32 -08:00
Behdad Esfahbod
eb6af2da72 [varLib] Fix pruning of HVAR 2018-02-18 21:49:39 -08:00
Cosimo Lupo
18bd9603a9
[Tests] fixup for new subset default --name-IDs
25d3822275c04169ba380393b1d41c7605c61d58
2018-02-16 18:11:59 +00:00
Jany Belluz
03f8ec3b87 [designspaceLib] Add tests for the new parameters 2018-02-14 15:24:32 +00:00
Miguel Sousa
5eebad29df [subset_test] Include nameIDs 3, 4, 6 in results 2018-02-11 18:00:34 -08:00
Behdad Esfahbod
4fec016862 [cff] Fix calcBound when seac-like components happen in endchar
I'm also unimpressed by the copy-pasted bounds logic in hhea and vhea,
and the fact that that's coded in there instead of calling a function
on CFF / glyf tables respectively.
2018-01-26 17:41:53 -08:00
Cosimo Lupo
241384ab21
[feaLib] allow to build from pre-parsed ast.FeatureFile object 2018-01-25 09:53:42 -08:00
Cosimo Lupo
b1a67bd812
Merge pull request #1159 from anthrotype/feaLib-build-some-tables
[feaLib] add `tables` argument to only build some tables (e.g. GSUB)
2018-01-25 00:42:12 +01:00
Cosimo Lupo
596ad14526
Merge pull request #1157 from moyogo/feaLib-multiple_by_multiple_error
feaLib.parser: raise meaningful error for substitution of multiple glyphs by multiple glyphs
2018-01-25 00:09:07 +01:00
Cosimo Lupo
803530b281
[feaLib] assert all requested tables are supported
better than just warn
2018-01-24 15:07:34 -08:00
Cosimo Lupo
b2da85cffd
[feaLib] add tables argument to only build some tables (e.g. GSUB)
`tables=None` by default will build all supported tables;
To build only some of these and ignore the others, one can pass a
subset of supported tables tags: .e.g. `tables={'GSUB'}` will only
build the GSUB, even if the feature file may contain e.g. GPOS
related features.
2018-01-24 15:07:34 -08:00
Cosimo Lupo
92c3e3a3bc
Merge pull request #1154 from belluzj/improve-feaLib
Add option to parse one feature file without resolving included files
2018-01-24 19:20:38 +01:00
Denis Moyogo Jacquerye
94b51e7344 feaLib.parser: raise meaningful error for substitution of multiple glyphs by multiple glyphs 2018-01-24 11:40:07 +00:00
Cosimo Lupo
677954d5b9
unicodedata: add ot_tag_to_script function
returns the Unicode script code for a given OpenType script tag, or None if no match is found
2018-01-23 11:45:20 -08:00
Jany Belluz
89979dea04 [feaLib.parser] Add option to not follow includes
Currently, the feature file parser always resolves included files,
parses their content and inserts it in the resulting AST. The original
`include` statement is lost.

This commit introduces an option to not follow inclusions. Instead, the
output AST will contain an `include` statement. This allows to process a
feature file on its own, and allows to round-trip it.

For example in glyphsLib, when going from a UFO to a .glyphs file, a
UFO feature file will be sliced up into Glyphs.app classes (e.g. a
GSFeaturePrefix with code `include(../family.fea);`) and when going back
from .glyphs to UFO, the feature file will be patched back together.
2018-01-23 11:07:16 +00:00
Jany Belluz
d6a5a489c0 [feaLib.parser] Parse a feature file with only comments 2018-01-22 17:07:28 +00:00
Denis Moyogo Jacquerye
29deb7e6fb
Merge pull request #1110 from belluzj/merge-design-space-document
Merge designSpaceDocument
2018-01-22 15:44:39 +00:00
Cosimo Lupo
91a8cc33e7
unicodedata: add script_horizontal_direction function
same as harfbuzz hb_script_get_horizontal_direction.

We just hard-code the set of RTL script here, as it doesn't change often anyway.
The function is just syntactic sugar as it all does is basically looking up the
constant RTL_SCRIPTS set.
It's nice to have it here in a central place alongside 'script', 'script_name', etc.
2018-01-19 18:04:33 +00:00
Cosimo Lupo
f62f79eb23
otConverters: don't write XML comment if NameID value is 0 == NULL
Fixes https://github.com/fonttools/fonttools/issues/1151
2018-01-19 13:25:59 +00:00
Cosimo Lupo
25b944ccce
typo 2018-01-18 20:24:28 +00:00
Cosimo Lupo
c9259c4723
unicodedata: add ot_tags_from_script function
Fixes https://github.com/fonttools/fonttools/issues/1112

This implements the same logic found in harbfuzz hb-ot-tag.cc to
convert between Unicode (or ISO 15924) script codes to OpenType script
tags as defined at:
https://www.microsoft.com/typography/otspec/scripttags.htm

461a605fde/src/hb-ot-tag.cc (L127)
2018-01-18 20:20:17 +00:00
Cosimo Lupo
a4e1d4a2bf
[builder_test] test_pairPos_redefinition_warning 2018-01-15 18:45:42 +00:00
Cosimo Lupo
40e50b60c3 Revert "Merge pull request #1136 from santhoshtr/svg-arc-support"
This reverts commit 5c392bc86542fbbc0c63335cfedae0d1406b0794, reversing
changes made to 4b69d77ae57776480901e2af82c7d9c1c29de8d6.
2018-01-05 13:07:57 +00:00
Santhosh Thottingal
a8abf7246c Remove duplicate point, add more tests 2018-01-05 17:31:53 +05:30
Santhosh Thottingal
3926353a9f Fix tests for arc parsing using approximate comparison of float values 2018-01-04 21:14:58 +05:30
Santhosh Thottingal
37b3889429 svgLib: Add test for arc parser 2018-01-01 20:46:20 +05:30
Khaled Hosny
5e23b0545b [feaLib] Test mixed single/multiple substitutions 2017-12-22 16:30:34 +02:00
Cosimo Lupo
56a84ae905 Temporarily revert PR #1035 bamidei/split_g_l_y_f_to_one_per_file
The split-glyf-to-one-glyph-per-file feature is only partially implemented,
as it was discussed here:

https://github.com/fonttools/fonttools/issues/153#issuecomment-346677171

I need to cut a bugfix release today, but I don't want to ship this as is.
I prefer to temporarily rever, tag a release from master branch, then
revert it again to its present state so that bamidei can complete his
work.

---

Revert "[glyf] make splitGlyphs output more compact"

This reverts commit d08d635a93289982b028aacd3b9039fbe742f3e8.

Revert "more whitespace"

This reverts commit bd030f61c6b360fd360632bbc6c19abb057c9a24.

Revert "minor whitespace"

This reverts commit f2a8c787b13b92ae0e0f61477e584316144747c7.

Revert "Merge pull request #1035 from bamidei/split_g_l_y_f_to_one_per_file"

This reverts commit 17b89d9dde7691dbbb6815efba92eff446af62ac, reversing
changes made to b8482d9666f08d3603ee93d3ca52931550f715fc.
2017-12-18 12:00:43 +00:00
Jany Belluz
84f61d6fc4 Fix some test comments 2017-11-30 12:21:29 +00:00
Jany Belluz
ac329fbd69 Move the tests to pytest 2017-11-29 17:08:23 +00:00
Cosimo Lupo
bbcb3776ac [Tests/subset] adjust expected test results 2017-11-27 19:37:56 +00:00
Jens Kutilek
e51293f3f0
Merge pull request #1113 from fonttools/varlib-sharedpoints-fix-test
Don't share points in cvar by default
2017-11-27 18:01:48 +01:00
justvanrossum
74faedf848 completed a comment 2017-11-24 20:02:47 +01:00
justvanrossum
6ee901cc81 added some simple tests for afmLib 2017-11-24 19:59:27 +01:00
Jens Kutilek
cb6676f93e Don't share points in cvar by default (fails in Chrome), adjust tests to test both shared and private points in cvar 2017-11-24 19:06:36 +01:00
Cosimo Lupo
bd030f61c6 more whitespace 2017-11-23 19:05:05 +01:00