Marktune, small utility for fixing Arabic mark collisions

Marktune-v0.2.0

Marktune is a small utility for fixing Arabic mark collisions in fonts.
In Arabic fonts combining marks (fatha, damma, sukun, etc.) can visually overlap(especially in Quranic phrases). Marktune inserts special control characters, mapped in the font as positional offsets, at the text caret via configurable global hotkeys, shifting mark placement. (A CGJ(Combining Grapheme Joiner) is also inserted between these control characters, to bypass AMTRA.)

Key points:

  • Cross-platform: macOS and Windows
  • Hotkeys and codepoints are configured via a simple config.json
  • Runs from the system tray, with a quick enable/disable toggle
  • Core cluster parsing/serialization logic is written in Rust and is platform-independent
  • No interference with text shaping at all, the whole process is designed to be very lightweight and generally predictable everywhere.

Marktune is free and open-source, under the MIT license:

The project tree also includes a font-integration folder, containing a Python script with accompanying bash and batch files to generate the proper mkmk feature easily, plus a Glyphs file with the control characters ready to be copied. By following simple steps, any font can be compatible with Marktune.(For older fonts, we may in the future look into injecting the mkmk feature and control characters at a lower level, using tools such as ttx, as a post-process step.)

Using a decomposed structure, it’s also possible to shift a glyph’s dots independently of its marks. This has been tested and works, but a dedicated set of shortcuts entry isn’t implemented in Marktune yet.

This project was built with the help of AI tools (Claude and ChatGPT), used for coding assistance throughout development.

(There are more technical and practical details in the repo.)