🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

fontsimi

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fontsimi

Fast font similarity matching via vector search

pipPyPI
Version
3.0.0
Maintainers
1

FontSimi v3 (core package)

Fast font similarity via 64‑dimensional vectors and per‑script HNSW indices.

What works now (v3.0.0)

  • Rust core: vector math, script mapping (174 scripts), beam-density metrics, SSIM, alignment, and HNSW save/load APIs with unit tests.
  • Python types: FontVector, GlobalMetrics, ScriptId, IndexCollection, and low-level docs/tests under tests/.

What is still stubbed

  • PyO3 bindings now expose ScriptIndex, compute_font_vector, render_canonical, compute_ssim, and a stub optimize_match; the CLI and pipeline run, but optimizer refinement and more tests are still needed for v3.1.
  • The packaged .so in the repo targets CPython 3.13 only; rebuild for your interpreter with maturin.
  • License is MIT across Cargo and pyproject; repository LICENSE is included.

Install from source (macOS, rust toolchain required)

cd /Users/adam/Developer/vcs/github.docrepair-fonts/fontsimi
uv venv --python 3.12
source .venv/bin/activate
uv pip install maturin==1.6.0
maturin develop --features python --release

Minimal usage (works today)

from fontsimi import FontVector, GlobalMetrics, IndexCollection, ScriptId

metrics = GlobalMetrics(aspect=0.5, width=0.6, density=0.4, consistency=0.1,
                        h_beam=0.2, v_beam=0.8, d_beam=0.2, ref_height=0.7)
vector = FontVector(metrics)

index = IndexCollection()
index.insert(ScriptId.latn(), "demo-font", vector)
results = index.search(ScriptId.latn(), vector, k=5)

Roadmap to v3.1

See ../PLAN.md and ../TODO.md for the detailed v3.1 scope (binding completion, CLI fixes, wheels for py310–py313).

Keywords

fonts

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts