Skip to main content

thonny-ligatures

Ligaduras tipograficas de Fira Code (->, ==, !=, <=, >=, ...) en el editor de codigo de Thonny, sin parchear ni recompilar Thonny ni Tcl/Tk.

Instalacion

pip install thonny-ligatures

Instalalo en el mismo entorno de Python desde el que arrancas Thonny (el mismo pip/python que usa python -m thonny, o el mismo intérprete que usa el ejecutable de Thonny si lo instalaste con su instalador).

Luego, en Thonny: Tools > Options > Editor, pon la fuente en Fira Code, reinicia Thonny, y las ligaduras aparecen automaticamente.

Como funciona

Ver los comentarios en src/thonnycontrib/ligatures/_plugin_impl.py para el detalle tecnico. En resumen: Fira Code implementa sus ligaduras con la feature OpenType "calt" como una sustitucion de glifo por glifo (no fusiona caracteres), asi que la rejilla monoespaciada de Tk no se toca. Para cada racha de caracteres cuyo glifo contextual difiere del normal, se le aplica un tag elide (ancho cero, pero el caracter sigue en el buffer) y se inserta ahi una mini-imagen con el glifo ya compuesto con HarfBuzz + FreeType, coloreada resolviendo las mismas prioridades de tags que usa Tk internamente (por eso funciona igual con cualquier tema, incluidos los oscuros).

Descubrimiento automatico

Este paquete no modifica Thonny: se instala bajo el namespace package thonnycontrib, que es el mecanismo oficial de plugins de terceros de Thonny. Thonny lo detecta y carga solo con tenerlo instalado en el mismo entorno.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thonny_ligatures-0.1.0.tar.gz (148.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

thonny_ligatures-0.1.0-py3-none-any.whl (148.4 kB view details)

Uploaded Python 3

File details

Details for the file thonny_ligatures-0.1.0.tar.gz.

File metadata

  • Download URL: thonny_ligatures-0.1.0.tar.gz
  • Upload date:
  • Size: 148.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for thonny_ligatures-0.1.0.tar.gz
Algorithm Hash digest
SHA256 329bc963c1cf7ca945d977384c6acfc3d998fd3169790a0a2fde84ed4bf69dcf
MD5 fee1d613900079043966d57d7346a706
BLAKE2b-256 5984c3fc7a28f5ed94d4ac14860abec73102edfc53c633f9241143453bd3059a

See more details on using hashes here.

File details

Details for the file thonny_ligatures-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for thonny_ligatures-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3827081d9554e0c042bfd65046ab67fed69e087e799bd39107e038836fa6bf8b
MD5 8d5bc4cf98a222dcba2edba7bccf9001
BLAKE2b-256 daabad33090b138c23f16a3fb9c2eb89c8289c09eea31001dbb9971d33685486

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.1

2 files

This release

0.1.0 This release

2 files

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