Skip to main content

Текстовые стили с множеством шрифтов

Project description

pip install trolltext

Импортируйте нужные функции:

from trolltext import style_text, allfont

Создайте переменную с текстом:

text = "Hello world!"

Преобразуйте текст в выбранный стиль (например, жирный):

bold_text = style_text(text, "bold")

print(bold_text)

Выведите текст во всех доступных стилях:

print(allfont(text))

Доступные стили для параметра font в функции style_text:

double_struck, bold, italic, bold_italic, script, fraktur, bold_script, bold_fraktur, monospace, circled

Если передать несуществующий стиль, библиотека выдаст ошибку:

style_text("Hello", "unknown_font") # ValueError: Шрифт 'unknown_font' не найден.

Если у вас есть идеи или нашли баги — создайте issue или pull request в репозитории.

Лицензия: MIT © Ваше Имя

Спасибо за использование TrollText!

Project details


Download files

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

Source Distribution

trolltext-0.1.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

trolltext-0.1.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: trolltext-0.1.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for trolltext-0.1.1.tar.gz
Algorithm Hash digest
SHA256 964671214b7b5bc1d55a0dd3eabc88d280efe7a2dfd17f5d96de80bc3b009626
MD5 c67c5241d5bf357de4636acd410865fa
BLAKE2b-256 a44030cb37967bf26ddb2a2c512ceda60f94a9a6b127e14898c798c5b83b7bc7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: trolltext-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for trolltext-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7b2380e74aad2ee782af9994280bc9a6e49d3345479dc853eddd155ab6514db6
MD5 226ca83876d56544ce7c8db7ad2c2a7c
BLAKE2b-256 3f24ab26ee8c8d2baf89962bf7eedaa9402e5e64264125e7836ec85a7d9df73d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page