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.1.tar.gz (149.4 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.1-py3-none-any.whl (149.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: thonny_ligatures-0.1.1.tar.gz
  • Upload date:
  • Size: 149.4 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.1.tar.gz
Algorithm Hash digest
SHA256 01ad6a989cdaeec92e8e689bffd444ad9cc652214476c4580613ca261a588a21
MD5 27647cae7537869520f33b46b22527f6
BLAKE2b-256 903c59f68fe3bc1e11117ebf33c53972ea167e43bcd4676f611203ba699573e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for thonny_ligatures-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ef8a3cc503ad72bdb4102191f8b168a6d2e7b9a2e86f7aa792de081d6c4dcce4
MD5 624f518bb811314e5dbe2dadade174c2
BLAKE2b-256 05200e1c8ab09d18c4007520a6e7d008c3f08ebe5445fd311268ca472a3742bb

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

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