Skip to main content

imscribe

Markdown, streaming and diff views for Dear ImGui in Python: paragraphs justified and broken into lines the way TeX breaks them, headings, lists, tables, fenced code, formulas written as $...$, text that arrives a piece at a time, side-by-side and unified diffs, selection and copying. You hand a view markdown source and call draw each frame, inside your own window.

The text is set and drawn by imtypeset, a C++ library that binds to the Dear ImGui inside the imgui-bundle wheel. imscribe is the Python layer over it: it reads the markdown, describes it to the library, and is the views. There is no other renderer in it: where imtypeset is not installed a view draws nothing and says why.

This is 0.2.0, the first full release (0.2.0b1 was the beta before it):

pip install imscribe

Two pins, held together

imscribe requires both of these exactly, and they move together:

imgui-bundle==1.92.900
imtypeset==0.4.3.192900

An imtypeset wheel is built for one imgui-bundle version and its fourth number says which (192900 is 1.92.900). So imscribe cannot be installed beside anything that needs another imgui-bundle. An application that pins its own dependencies pins these two with it.

Where it runs

Anywhere imgui-bundle 1.92.900 does, as far as installing goes. It DRAWS where imtypeset has a wheel:

CPython
Linux x86-64, glibc 2.28 or later 3.11, 3.12, 3.13, 3.14
macOS 14 or later on Apple Silicon 3.11, 3.12, 3.13, 3.14

Not Windows, not Linux on arm64, not macOS on Intel: there pip install imscribe succeeds without imtypeset, imscribe.typesetter.kind() answers Kind.NOT_INSTALLED, and nothing is drawn. On Linux with musl (Alpine), with a glibc older than 2.28, and on macOS older than 14, the install fails at imtypeset, which has no wheel that fits; imgui-bundle has none for an old glibc or an old macOS either.

On Linux, imgui-bundle's extension module loads libX11.so.6 and libXext.so.6 from the system when it is imported (read from the 1.92.900 wheel's binaries); neither is in a wheel. On Debian and Ubuntu they are the packages libx11-6 and libxext6. imtypeset's library asks the system for nothing beyond the C and C++ runtimes.

Using it

from imgui_bundle import hello_imgui, immapp
from imscribe import DARK_PALETTE, Theme, TypesetView, typesetter

SOURCE = "# Hello\n\nSome *markdown*, set in lines of even colour, and $e^{i\\pi} + 1 = 0$."
assert typesetter.module() is not None, typesetter.reason()  # before any window
views = []

def fonts():
    hello_imgui.imgui_default_settings.load_default_font_with_font_awesome_icons()
    typesetter.load_fonts()  # last, after the application's own fonts

def gui():
    if not views:  # on the first frame: the fonts are loaded by then
        views.append(TypesetView(SOURCE, theme=Theme.build(), palette=DARK_PALETTE, math=True))
    views[0].draw(palette=DARK_PALETTE)

params = hello_imgui.RunnerParams()
params.callbacks.load_additional_fonts = fonts
params.callbacks.show_gui = gui
params.callbacks.before_exit = typesetter.unload  # before Dear ImGui's context goes
immapp.run(params)

Where no imtypeset was found, the assert stops with the sentence for "there is no imtypeset here": imtypeset is not installed: pip installs it with imscribe where imtypeset has a wheel (CPython 3.11 to 3.14 on Linux x86-64 and on macOS 14 or later on arm64), and IMTYPESET_LIBRARY names no library. On a platform outside the table above there is nothing to do about it; the variable is only how a developer names a library built from source. With IMSCRIBE_NO_TYPESET set, an installed imtypeset is not looked for and the sentence says so instead.

TypesetStreamView takes text as it arrives (append), and TypesetDiffView two texts or a unified diff. python -m imscribe.typesetter prints, with no window, which imtypeset was found and whether it was accepted.

What is not known

  • Nobody but its author has looked at what it draws. The tests measure where text is placed and that frames are drawn; none of them judges how it looks.
  • macOS has been run once, by hand. The owner ran the 0.2.0b1 demo and test suite on one Apple Silicon Mac (macOS 26.7, CPython 3.11); the 25 tests that failed there read /proc/loadavg, which a Mac does not have, and are fixed. Nothing has been run on a Mac since, and no CI runs there. imtypeset's wheels pass their own installed checks on GitHub's macOS arm64 runners (three of that project's 55 tests fail there, by its own notes).
  • Everything was measured on Linux x86-64, CPython 3.11, with a software renderer and a display scale of 1.

More

The repository has the examples, the demo application, the tests and the notes on every decision: https://github.com/WalterCReel3/imscribe

MIT licence. The fonts the views set text in are not in this package: they ship in the imgui-bundle wheel under their own licences.

Metadata

Release files for imscribe 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for imscribe 0.2.0
File Size Uploaded Provenance Actions
imscribe-0.2.0.tar.gz 553.9 kB With provenance Details for imscribe-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for imscribe 0.2.0
File Interpreter ABI Platform Actions
imscribe-0.2.0-py3-none-any.whl Python 3 none any Details for imscribe-0.2.0-py3-none-any.whl

Total release size: 1.2 MB

Release files / imscribe-0.2.0.tar.gz

Download URL imscribe-0.2.0.tar.gz
Size 553.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f98f01dc2d8bcd3d079ac13a2a79215d5b20989773b089e3cfc8dcc73f6b6ed8
BLAKE2b-256 checksum
How to use checksums
54f1bcada66ddb28c00ae9064ca31013df917aaff235006251b7a88f21e83088
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / imscribe-0.2.0-py3-none-any.whl

Download URL imscribe-0.2.0-py3-none-any.whl
Size 600.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e54399942ce2938e83d5ea82263f3f194da6cfdbde1ec55d867507f07e8baec
BLAKE2b-256 checksum
How to use checksums
12837c4e6572e8415ff6441bc1c81b7952de5195191f7b2bf15864f8af11099f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Security for imscribe 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for imscribe-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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