Registry / serialization / cu2qu
library1.6.7.post2pypypi✓ verified 81d ago

cu2qu is a Python library for converting cubic bezier curves to quadratic bezier curves, commonly used in font engineering workflows such as converting cubic outlines (TrueType) to quadratic outlines (OpenType). Current version 1.6.7.post2 is in maintenance mode, with infrequent updates.

pip install cu2qu
INSTALL
IMPORT
SIG · CU2QU
C
cu2qu
serializationpythonv1.6.7.post2
Install
2.7s avg
Import
Disk
42MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.6.7.post2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 41.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.7s · import 0.000s · 45MB
42MB installed
● package 42MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

curve_to_quadratic
from cu2qu import curve_to_quadratic
from cu2qu.pens import CurveToQuadraticPen
curves_to_quadratic
from cu2qu import curves_to_quadratic
from cu2qu.pens import CurveToQuadraticPen

Demonstrates using CurveToQuadraticPen to convert a cubic bezier curve to quadratic. Requires a target pen (here RecordingPen from fonttools) to record the output.

from cu2qu.pens import CurveToQuadraticPen from fonttools.pens.recordingPen import RecordingPen # Example: convert a cubic path to quadratic recorder = RecordingPen() # Assume you have a cubic path to draw # For demonstration, we create a dummy converter pen = CurveToQuadraticPen(recorder, max_err=1.0) pen.moveTo((0, 0)) pen.lineTo((100, 0)) pen.curveTo((50, 150), (150, 150), (100, 0)) pen.closePath() print('Conversion done. Check recorder for output.')
Debug
Known issues
gotchacu2qu functions are primarily designed for use with fonttools pens. Direct usage without fonttools may require additional adaptation.
fix
Ensure fonttools is installed and use pens like fonttools.pens.recordingPen.RecordingPen to capture output.
affects: all
deprecatedThe 'cu2qu.ufo' module is deprecated and may be removed in future versions. Use fonttools instead.
fix
Migrate to fonttools' own quadratic conversion tools or use the pens module directly.
affects: >=1.6.0
gotchaVersion 1.6.7.post2 is a post-release; it may not be the final stable release. Check for newer stable versions or rely on 1.6.7.
fix
Pin to cu2qu==1.6.7 if post-release causes issues.
affects: 1.6.7.post2
Upgrade
Version history
1.6.7.post2latest on PyPI · released Nov 16, 2022
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
cu2qu — pip install cu2qu · libregistry