Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
khatt 0.18.1
khatt 0.18.1
  • Gallery
  • Arabic in other Python libraries
  • Moving off arabic_reshaper
  • API reference
  • Changelog
Back to top
View this page
Edit this page

Gallery¶

Everything khatt draws, with the line that draws it. The pictures are made by khatt itself each time these docs are built, so they show the version you are reading about.

Fonts¶

The eight bundled fonts. pip install khatt-fonts adds 22 more, and any .ttf or .otf file works too.

amiri¶

الخط العربي فنّ in amiri

khatt.draw_text(image, xy, text, font="amiri")

aref-ruqaa¶

الخط العربي فنّ in aref-ruqaa

khatt.draw_text(image, xy, text, font="aref-ruqaa")

cairo¶

الخط العربي فنّ in cairo

khatt.draw_text(image, xy, text, font="cairo")

lalezar¶

الخط العربي فنّ in lalezar

khatt.draw_text(image, xy, text, font="lalezar")

noto-naskh¶

الخط العربي فنّ in noto-naskh

khatt.draw_text(image, xy, text, font="noto-naskh")

rakkas¶

الخط العربي فنّ in rakkas

khatt.draw_text(image, xy, text, font="rakkas")

reem-kufi¶

الخط العربي فنّ in reem-kufi

khatt.draw_text(image, xy, text, font="reem-kufi")

rubik¶

الخط العربي فنّ in rubik

khatt.draw_text(image, xy, text, font="rubik")

Word art¶

3d¶

خط عربي as 3d word art

khatt.word_art("خط عربي", effect="3d")

fire¶

خط عربي as fire word art

khatt.word_art("خط عربي", effect="fire")

gold¶

خط عربي as gold word art

khatt.word_art("خط عربي", effect="gold")

ice¶

خط عربي as ice word art

khatt.word_art("خط عربي", effect="ice")

neon¶

خط عربي as neon word art

khatt.word_art("خط عربي", effect="neon")

retro¶

خط عربي as retro word art

khatt.word_art("خط عربي", effect="retro")

silver¶

خط عربي as silver word art

khatt.word_art("خط عربي", effect="silver")

sticker¶

خط عربي as sticker word art

khatt.word_art("خط عربي", effect="sticker")

Text on curves¶

arc¶

Gold text on a arc

khatt.word_art(text, curve="arc")

ring¶

Gold text on a ring

khatt.word_art(text, curve="ring")

smile¶

Gold text on a smile

khatt.word_art(text, curve="smile")

wave¶

Gold text on a wave

khatt.word_art(text, curve="wave")

Calligrams¶

Text flowing inside a shape, its lines stretched with kashida.

arch¶

A arch calligram

khatt.calligram(text, "arch")

circle¶

A circle calligram

khatt.calligram(text, "circle")

crescent¶

A crescent calligram

khatt.calligram(text, "crescent")

diamond¶

A diamond calligram

khatt.calligram(text, "diamond")

heart¶

A heart calligram

khatt.calligram(text, "heart")

Terminal art styles¶

ascii¶

khatt "خط" --style ascii -w 36

    .%.
    .@:
     #.            --
     *-            *#
     += .:==.  :-:
     -==++*@@ =*##%#*+=--:
.. .:#+=-=+%= ..:=*%%#***=
-#@@@@%@@%@%%%%%*=:

blocks¶

khatt "خط" --style blocks -w 36

     █
     █░
     ▓             ░░
     ▓░            ▓▓
     ▒▒  ░▒▒   ░░░
     ░▒▒▒▒▓██ ▒▓▓▓█▓▓▒▒░░░
    ░▓▒▒░▒▒█▒   ░▒▓██▓▓▓▓▒
░▓██████████████▓▒░

braille¶

khatt "خط" --style braille -w 36

⠀⠀⠀⠀⠀⣷⡀
⠀⠀⠀⠀⠀⣿⠁
⠀⠀⠀⠀⠀⢿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣀
⠀⠀⠀⠀⠀⢸⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⠟
⠀⠀⠀⠀⠀⢸⡇⠀⠀⣀⣠⣤⡀⠀⠀⢀⣀⡀
⠀⠀⠀⠀⠀⢸⣁⣴⠾⠟⠿⣿⣿⠀⠼⠿⠿⢿⣿⣶⣦⣤⣀⣀⣀⣀
⠀⠀⠀⠀⢀⡾⣋⣀⣀⣤⣤⣾⠃⠀⠀⠀⣀⣠⣤⣿⠿⠿⠛⠛⠻⠋
⠙⢿⣿⣿⣿⣿⣿⡿⠿⠿⠿⢿⣿⣿⣿⠿⠛⠋⠁

halfblocks¶

khatt "خط" --style halfblocks -w 36

     █
     █
     █             ▄▄
     █             ▀▀
     █    ▄▄    ▄
      ▄▄█▀▀██ █▀▀███▄▄▄▄
    ▄█▀ ▄▄▄█▀    ▄▄██▀▀▀▀▀
▀████████▀██████▀▀

letters¶

khatt "خط" --style letters -w 36

     ﺥ
     ﻁ
     ﺥ
     ﻁ             ﺥﻁ
     ﺥ
        ﺥﻁﺥﻁﺥ  ﻁﺥﻁﺥﻁﺥﻁ
     ﻁﺥ   ﻁﺥ      ﻁﺥﻁﺥﻁﺥﻁ
 ﻁﺥﻁﺥﻁﺥﻁﺥﻁﺥﻁﺥﻁﺥﻁﺥ

quadrants¶

khatt "خط" --style quadrants -w 36

     █▖
     █▘
     ▜             ▗▖
     ▐▌            ▀▛
     ▐▌  ▗▄▄    ▖
     ▐▚▄▛▀▀██ ▟▀▜██▙▄▄▄▄
    ▗▟▀ ▄▄▄▟▘   ▗▄▄█▛▀▀▀▀▘
▝▜███████▀█████▛▀▀

sextants¶

khatt "خط" --style sextants -w 36

     🬺🬏
     █🬀
     🬬             🬞🬭
     ▐▌            🬎🬆
     ▐▌  🬞🬭🬭🬏  🬞🬭🬏
     ▐🬮🬹🬎🬎🬎██ 🬍🬎🬎🬬█🬹🬹🬭🬭🬭🬭🬭
    🬞🬜🬡🬭🬭🬭🬹🬻🬄   🬭🬭🬵█🬎🬎🬎🬎🬎🬄
🬂🬬██████🬝🬎🬎████🬎🬆🬂🬀

Colour palettes¶

andalus¶

مرحبا in the andalus palette

khatt "مرحبا" -s quadrants --fit -w 64 --palette andalus

damask¶

مرحبا in the damask palette

khatt "مرحبا" -s quadrants --fit -w 64 --palette damask

desert¶

مرحبا in the desert palette

khatt "مرحبا" -s quadrants --fit -w 64 --palette desert

fajr¶

مرحبا in the fajr palette

khatt "مرحبا" -s quadrants --fit -w 64 --palette fajr

gold¶

مرحبا in the gold palette

khatt "مرحبا" -s quadrants --fit -w 64 --palette gold

nile¶

مرحبا in the nile palette

khatt "مرحبا" -s quadrants --fit -w 64 --palette nile

Frames¶

double¶

khatt "خط" -s braille -w 24 --frame double

╔════════════════════════════╗
║                            ║
║  ⠀⠀⠀⠀⢰⣆                    ║
║  ⠀⠀⠀⠀⢸⡇                    ║
║  ⠀⠀⠀⠀⠀⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣶⡄      ║
║  ⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉       ║
║  ⠀⠀⠀⠀⠀⡿⢀⣠⣶⣿⣿⣦⠀⣠⣶⣶⣶⣤⣄⣀      ║
║  ⠀⠀⠀⠀⣠⠿⠋⢁⣀⣠⣽⠏⠀⠀⠀⢀⣉⣽⣿⡿⠿⠿⠿⠟  ║
║  ⠙⢿⣾⣿⣿⣿⣿⡿⠿⠿⢿⣿⣶⣿⠿⠛⠋⠁        ║
║                            ║
╚════════════════════════════╝

heavy¶

khatt "خط" -s braille -w 24 --frame heavy

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                            ┃
┃  ⠀⠀⠀⠀⢰⣆                    ┃
┃  ⠀⠀⠀⠀⢸⡇                    ┃
┃  ⠀⠀⠀⠀⠀⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣶⡄      ┃
┃  ⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉       ┃
┃  ⠀⠀⠀⠀⠀⡿⢀⣠⣶⣿⣿⣦⠀⣠⣶⣶⣶⣤⣄⣀      ┃
┃  ⠀⠀⠀⠀⣠⠿⠋⢁⣀⣠⣽⠏⠀⠀⠀⢀⣉⣽⣿⡿⠿⠿⠿⠟  ┃
┃  ⠙⢿⣾⣿⣿⣿⣿⡿⠿⠿⢿⣿⣶⣿⠿⠛⠋⠁        ┃
┃                            ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

lawha¶

khatt "خط" -s braille -w 24 --frame lawha

۞══════════════۞═════════════۞
║                            ║
║  ⠀⠀⠀⠀⢰⣆                    ║
║  ⠀⠀⠀⠀⢸⡇                    ║
║  ⠀⠀⠀⠀⠀⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣶⡄      ║
║  ⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉       ║
║  ⠀⠀⠀⠀⠀⡿⢀⣠⣶⣿⣿⣦⠀⣠⣶⣶⣶⣤⣄⣀      ║
║  ⠀⠀⠀⠀⣠⠿⠋⢁⣀⣠⣽⠏⠀⠀⠀⢀⣉⣽⣿⡿⠿⠿⠿⠟  ║
║  ⠙⢿⣾⣿⣿⣿⣿⡿⠿⠿⢿⣿⣶⣿⠿⠛⠋⠁        ║
║                            ║
۞══════════════۞═════════════۞

round¶

khatt "خط" -s braille -w 24 --frame round

╭────────────────────────────╮
│                            │
│  ⠀⠀⠀⠀⢰⣆                    │
│  ⠀⠀⠀⠀⢸⡇                    │
│  ⠀⠀⠀⠀⠀⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣶⡄      │
│  ⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉       │
│  ⠀⠀⠀⠀⠀⡿⢀⣠⣶⣿⣿⣦⠀⣠⣶⣶⣶⣤⣄⣀      │
│  ⠀⠀⠀⠀⣠⠿⠋⢁⣀⣠⣽⠏⠀⠀⠀⢀⣉⣽⣿⡿⠿⠿⠿⠟  │
│  ⠙⢿⣾⣿⣿⣿⣿⡿⠿⠿⢿⣿⣶⣿⠿⠛⠋⠁        │
│                            │
╰────────────────────────────╯

single¶

khatt "خط" -s braille -w 24 --frame single

┌────────────────────────────┐
│                            │
│  ⠀⠀⠀⠀⢰⣆                    │
│  ⠀⠀⠀⠀⢸⡇                    │
│  ⠀⠀⠀⠀⠀⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣶⡄      │
│  ⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉       │
│  ⠀⠀⠀⠀⠀⡿⢀⣠⣶⣿⣿⣦⠀⣠⣶⣶⣶⣤⣄⣀      │
│  ⠀⠀⠀⠀⣠⠿⠋⢁⣀⣠⣽⠏⠀⠀⠀⢀⣉⣽⣿⡿⠿⠿⠿⠟  │
│  ⠙⢿⣾⣿⣿⣿⣿⡿⠿⠿⢿⣿⣶⣿⠿⠛⠋⠁        │
│                            │
└────────────────────────────┘

Zakhrafa¶

Decorated names to copy and paste (khatt.zakhrafa(name, style)), with every letter still joined.

Style

محمد

brackets

『محمد』

crown

♚ مـحـمـد ♚

dots

مـ۪ٜـحـ۪ٜـمـ۪ٜـد

flowers

✿ مـحـمـد ✿

hearts

♡ مـحـمـد ♡

long

مـــحـــمـــد

royal

꧁༺ مـ͜͡ـحـ͜͡ـمـ͜͡ـد ༻꧂

stars

★彡 مـحـمـد 彡★

tatweel

مـحـمـد

waves

مـ͜͡ـحـ͜͡ـمـ͜͡ـد

Next
Arabic in other Python libraries
Previous
Home
Copyright © 2026, Mohammed Essam
Made with Sphinx and @pradyunsg's Furo
On this page
  • Gallery
    • Fonts
      • amiri
      • aref-ruqaa
      • cairo
      • lalezar
      • noto-naskh
      • rakkas
      • reem-kufi
      • rubik
    • Word art
      • 3d
      • fire
      • gold
      • ice
      • neon
      • retro
      • silver
      • sticker
    • Text on curves
      • arc
      • ring
      • smile
      • wave
    • Calligrams
      • arch
      • circle
      • crescent
      • diamond
      • heart
    • Terminal art styles
      • ascii
      • blocks
      • braille
      • halfblocks
      • letters
      • quadrants
      • sextants
    • Colour palettes
      • andalus
      • damask
      • desert
      • fajr
      • gold
      • nile
    • Frames
      • double
      • heavy
      • lawha
      • round
      • single
    • Zakhrafa