Skip to main content

ufostroker-py

This Python module wraps the Rust MFEK/math library's capability for path stroking. It currently exports one function, constant_width_stroke:

from ufostroker import constant_width_stroke
f = ufoLib2.Font("tests/data/Scurve.ufo")

constant_width_stroke(f["A"], width=50, startcap="square", endcap="square")

This modifies the glyph in place. The library works with defcon and ufoLib2 objects.

This may also be used as a fontmake command line plugin:

fontmake --filter 'ufostroker::StrokeFilter(pre=True,Width=50)' -u OpenPaths.ufo -o ttf

Or by adding a lib key into the UFO file's lib.plist file:

    <key>com.github.googlei18n.ufo2ft.filters</key>
    <array>
      <dict>
        <key>name</key>
        <string>ufostroker.StrokeFilter</string>
        <key>pre</key>
        <true/>
        <key>kwargs</key>
        <dict>
            <key>Width</key>
            <integer>50</integer>
            <key>StartCap</key>
            <string>square</string>
            <key>EndCap</key>
            <string>square</string>
            <key>JoinType</key>
            <string>mitre</string>
            <key>RemoveExternal</key>
            <true/>
        </dict>
      </dict>
    </array>

Building

Use maturin to build ufostroker.

pip3 install maturin
python3 -m venv strokervenv
. ./strokervenv/bin/activate
maturin develop
maturin build # Build wheel

License

Apache 2.

Metadata

Release files for ufostroker 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ufostroker 0.3.0
File Size Uploaded Provenance Actions
ufostroker-0.3.0.tar.gz 18.1 kB Without provenance Details for ufostroker-0.3.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for ufostroker 0.3.0
File Interpreter ABI Platform Actions
ufostroker-0.3.0-cp37-abi3-manylinux_2_34_x86_64.whl CPython 3.7 abi3 Linux glibc 2.34+ x86-64 Details for ufostroker-0.3.0-cp37-abi3-manylinux_2_34_x86_64.whl
ufostroker-0.3.0-cp37-abi3-macosx_11_0_arm64.whl CPython 3.7 abi3 macOS 11.0+ ARM64 Details for ufostroker-0.3.0-cp37-abi3-macosx_11_0_arm64.whl
ufostroker-0.3.0-cp37-abi3-macosx_10_12_x86_64.whl CPython 3.7 abi3 macOS 10.12+ x86-64 Details for ufostroker-0.3.0-cp37-abi3-macosx_10_12_x86_64.whl

Total release size: 2.5 MB

Release files / ufostroker-0.3.0.tar.gz

Download URL ufostroker-0.3.0.tar.gz
Size 18.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c1f8026c9c42b65543818f81b6ef0ec7f12a03b45cddbde91296722e4120b7ac
BLAKE2b-256 checksum
How to use checksums
fb5802c0fd65a9d515e1e442fca0d5abd761067a71f5959245af21392cea488b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.18

Release files / ufostroker-0.3.0-cp37-abi3-manylinux_2_34_x86_64.whl

Download URL ufostroker-0.3.0-cp37-abi3-manylinux_2_34_x86_64.whl
Size 1.9 MB
Tags CPython 3.7 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
bffa0afeebf5bcbc9ba3d7af986d28b82adc4542fe71b62fec187b96d080f52d
BLAKE2b-256 checksum
How to use checksums
1fd20d3a17aa8da3168e82d27e098364f743cf8b0b33c03da6ea6ba26553e7a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.18

Release files / ufostroker-0.3.0-cp37-abi3-macosx_11_0_arm64.whl

Download URL ufostroker-0.3.0-cp37-abi3-macosx_11_0_arm64.whl
Size 276.4 kB
Tags CPython 3.7 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
91e00c1f265d5000ae4e3a0f5f65f373389fd1cc3aac6bf850842eac9ff65574
BLAKE2b-256 checksum
How to use checksums
0eec6df047c0bc9f21eac08adbbecf023c54f79e93e7ab9ad94684237c9ca993
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.18

Release files / ufostroker-0.3.0-cp37-abi3-macosx_10_12_x86_64.whl

Download URL ufostroker-0.3.0-cp37-abi3-macosx_10_12_x86_64.whl
Size 283.0 kB
Tags CPython 3.7 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
b84eb7fb97885e4d7be2f94761a4e4e62f50efab99c6cceb2b5bdf10f7fbcc3a
BLAKE2b-256 checksum
How to use checksums
2fecf99d0da67dbfa1af0dec6fd7030478d36dd818ca015562c3a3f45e0dfa1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.18

Security for ufostroker 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page