From d97953e6ff67978da9554e7b4601aedceb21e215 Mon Sep 17 00:00:00 2001 From: "Liguros - Gitlab CI/CD [develop]" Date: Tue, 12 Apr 2022 21:03:09 +0000 Subject: Adding metadata --- dev-python/cu2qu/Manifest | 1 + dev-python/cu2qu/cu2qu-1.6.7.ebuild | 31 ++++++++++++++++++++++++ dev-python/cu2qu/metadata.xml | 48 +++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 dev-python/cu2qu/Manifest create mode 100644 dev-python/cu2qu/cu2qu-1.6.7.ebuild create mode 100644 dev-python/cu2qu/metadata.xml (limited to 'dev-python/cu2qu') diff --git a/dev-python/cu2qu/Manifest b/dev-python/cu2qu/Manifest new file mode 100644 index 000000000000..49964751a7f4 --- /dev/null +++ b/dev-python/cu2qu/Manifest @@ -0,0 +1 @@ +DIST cu2qu-1.6.7.zip 215819 BLAKE2B 328df385c459f82805eaa9483ccf49ab1faae2f4a878381d2a7fd1e2be01d15f55eb5f2afabc1a0487d3bed4ae407cc2042989bc820620bd1ac0b33f95d441bc SHA512 929d353cf8ef6f989cd373c49ba77082cfdd35edce6aafa1c13d983782562a16245d75d086d3a7e28dd217bda6c19d50966a4fb1ce50d5a0397eb1304816a28f diff --git a/dev-python/cu2qu/cu2qu-1.6.7.ebuild b/dev-python/cu2qu/cu2qu-1.6.7.ebuild new file mode 100644 index 000000000000..370716a77993 --- /dev/null +++ b/dev-python/cu2qu/cu2qu-1.6.7.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_{7,8,9,10} ) + +inherit distutils-r1 + +DESCRIPTION="Cubic-to-quadratic bezier curve conversion" +HOMEPAGE="https://github.com/googlefonts/cu2qu" +SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.zip" + +LICENSE="Apache-2.0" +KEYWORDS="~amd64" +SLOT="0" + +RDEPEND=" + >=dev-python/fonttools-3.32[${PYTHON_USEDEP}] + >=dev-python/defcon-0.6.0[${PYTHON_USEDEP}] +" +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + app-arch/unzip + dev-python/cython[${PYTHON_USEDEP}] + dev-python/fs[${PYTHON_USEDEP}] +" + +distutils_enable_tests pytest diff --git a/dev-python/cu2qu/metadata.xml b/dev-python/cu2qu/metadata.xml new file mode 100644 index 000000000000..9c9d667bb3d4 --- /dev/null +++ b/dev-python/cu2qu/metadata.xml @@ -0,0 +1,48 @@ + + + + + co-maintainers welcome + lssndrbarbieri@gmail.com + Alessandro Barbieri + + + googlefonts/cu2qu + cu2qu + + +This library provides functions which take in UFO objects (Defcon Fonts or Robofab RFonts) and converts any cubic curves to quadratic. The most useful function is probably fonts_to_quadratic: + +from defcon import Font +from cu2qu.ufo import fonts_to_quadratic +thin_font = Font('MyFont-Thin.ufo') +bold_font = Font('MyFont-Bold.ufo') +fonts_to_quadratic([thin_font, bold_font]) + +Interpolation compatibility is guaranteed during conversion. If it's not needed, converting one font at a time may yield more optimized results: + +for font in [thin_font, bold_font]: + fonts_to_quadratic([font]) + +Some fonts may need a different error threshold than the default (0.001 em). This can also be provided by the caller: + +fonts_to_quadratic([thin_font, bold_font], max_err_em=0.005) + +for font in [thin_font, bold_font]: + fonts_to_quadratic([font], max_err_em=0.001) + +fonts_to_quadratic can print a string reporting the number of curves of each length. For example fonts_to_quadratic([font], dump_stats=True) may print something like: + +3: 1000 +4: 2000 +5: 100 + +meaning that the font now contains 1000 curves with three points, 2000 with four points, and 100 with five. Given multiple fonts, the function will report the total counts across all fonts. You can also accumulate statistics between calls by providing your own report dictionary: + +stats = {} +for font in [thin_font, bold_font]: + fonts_to_quadratic([font], stats=stats) +# "stats" will report combined statistics for both fonts + +The library also provides a command-line script also named cu2qu. Check its --help to see all the options. + -- cgit v1.3.1