cffsubr
Advanced tools
Sorry, the diff of this file is not supported yet
+1
-1
| Metadata-Version: 2.1 | ||
| Name: cffsubr | ||
| Version: 0.2.6 | ||
| Version: 0.2.7 | ||
| Summary: Standalone CFF subroutinizer based on the AFDKO tx tool | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/adobe-type-tools/cffsubr |
| Metadata-Version: 2.1 | ||
| Name: cffsubr | ||
| Version: 0.2.6 | ||
| Version: 0.2.7 | ||
| Summary: Standalone CFF subroutinizer based on the AFDKO tx tool | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/adobe-type-tools/cffsubr |
@@ -190,2 +190,10 @@ import copy | ||
| # When UPEM != 1000, tx leaves behind an invalid FontMatrix operator inside the | ||
| # CFF2 FontDict, which produces a spurious warning on compiling with fontTools. | ||
| # https://github.com/adobe-type-tools/cffsubr/issues/13 | ||
| if output_format == CFFTableTag.CFF2: | ||
| for font_dict in cff_table.cff[0].FDArray: | ||
| if "FontMatrix" in font_dict.rawDict: | ||
| del font_dict.rawDict["FontMatrix"] | ||
| del otf[input_format] | ||
@@ -192,0 +200,0 @@ otf[output_format] = cff_table |
| # coding: utf-8 | ||
| # file generated by setuptools_scm | ||
| # don't change, don't track in version control | ||
| version = '0.2.6' | ||
| version = '0.2.7' |
| import io | ||
| import pathlib | ||
| import logging | ||
| from fontTools import ttLib | ||
| from fontTools import cffLib | ||
| import cffsubr | ||
@@ -118,3 +120,19 @@ import pytest | ||
| def test_non_standard_upem_mute_font_matrix_warning(self, caplog): | ||
| # See https://github.com/adobe-type-tools/cffsubr/issues/13 | ||
| font = load_test_font("FontMatrixTest.ttx") | ||
| assert font["CFF "].cff[0].FontMatrix == [0.0005, 0, 0, 0.0005, 0, 0] | ||
| cffsubr.subroutinize(font, cff_version=2) | ||
| with caplog.at_level(logging.WARNING, logger=cffLib.log.name): | ||
| font2 = recompile_font(font) | ||
| assert ( | ||
| "Some CFF FDArray/FontDict keys were ignored upon compile: FontMatrix" | ||
| not in caplog.text | ||
| ) | ||
| @pytest.mark.parametrize( | ||
@@ -121,0 +139,0 @@ "testfile, table_tag", |
Sorry, the diff of this file is too big to display
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
69569569
0.01%8850
0.01%25562
0.08%