Skip to main content

A Python package for working with SF Symbols within PyQt.

Project description

pysfsymbols

PyPI - Version PyPI - Python Version


Table of Contents

Installation

You can install the library using pip:

pip install pysfsymbols

Usage[^1]

This library was designed to be used in combination with Qt for Python, specifically tested with PySide6.

Due to how the Unicode Private Use Area (PUA) works, this library can only work if the application is set to use an Apple San Francisco Font, e.g.:

app = QApplication()

font_id = QFontDatabase.addApplicationFont(":/resources/fonts/sf_pro_rounded/SF-Pro-Rounded-Regular.otf"),
font_family = QFontDatabase.applicationFontFamilies(font_id)[0]

font = QFont(font_family, 12, QFont.Weight.Normal)

app.setFont(font)
app.exec()

To use an SF Symbol within a QPushButton:

import pysfsymbols

button = QPushButton(sf_symbols.fetch_symbol('symbol.name'))

[^1]: sorry this documentation isn't very useful rn, if you have any issues email me at thom-cummings@outlook.com and i can possibly help better.

License

pysfsymbols is distributed under the terms of the MIT license.

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

pysfsymbols-0.1.0.tar.gz (48.2 kB view details)

Uploaded Source

Built Distribution

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

pysfsymbols-0.1.0-py3-none-any.whl (48.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pysfsymbols-0.1.0.tar.gz
  • Upload date:
  • Size: 48.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for pysfsymbols-0.1.0.tar.gz
Algorithm Hash digest
SHA256 eac26f320bd1059036c4266241099fa4ea08c1b5b8255a4a31e878b21f5d5494
MD5 ef2b047aa2a165caf7e629c0d0bef5fa
BLAKE2b-256 0e0557cf933143b6b41714959092f2444fb840f8a7e0ea81d6b166b84406bb5d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pysfsymbols-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 48.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for pysfsymbols-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52b9f35f1f927e7b87742b7c4b2eb7fc9bb78e7717c499948581fbecc372033f
MD5 33a1f9a05d7d3bb6a100ef8b06392db7
BLAKE2b-256 b4e969095ad6b6909074f0e8b648125c4500e2f1bde3dbd75f135af8d3d67a58

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