Marktune, small utility for fixing Arabic mark collisions

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:
https://github.com/fontamin/Marktune
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.)
Comments
-
Marktune inserts special control charactersWhat are these control characters, and what does their presence do to the text in terms of searching, sorting, spellchecking, switching to a non-Marktune font, and similar processing operations?0
-
John Hudson said:Marktune inserts special control charactersWhat are these control characters, and what does their presence do to the text in terms of searching, sorting, spellchecking, switching to a non-Marktune font, and similar processing operations?
These are supposed to be less common, empty Arabic Mark characters (their codepoints can be changed globally via Marktune's
config.json, not per font). They have real Unicode values, so they become part of the text stream, which has some side effects:- Font switching: if the new font doesn't support characters, they typically render as
.notdef/empty boxes, or fall back to a system font if one supports that Unicode range. - Search: exact-match search can fail if these invisible characters interrupt otherwise-identical words, unless the search normalizes/strips them.
- Spellcheck: most spellcheckers don't recognize them and may either flag the word or silently ignore the character, depending on its Unicode category.
- Sorting: since they sit after visible marks, they can affect collation order unless treated as ignorable by the sorting algorithm.
These trade-offs are inherent to the caret-based mark-shifting approach, and are worth being aware of before using Marktune on text meant for search/sort-heavy workflows.
0 - Font switching: if the new font doesn't support characters, they typically render as
-
These are supposed to be less common, empty Arabic Mark characters .... They have real Unicode values...I am still unsure what these characters are. What codepoints are you using?
0
Categories
- All Categories
- 47 Introductions
- 4K Typeface Design
- 496 Type Design Critiques
- 589 Type Design Software
- 1.1K Type Design Technique & Theory
- 674 Type Business
- 902 Font Technology
- 29 Punchcutting
- 542 Typography
- 127 Type Education
- 333 Type History
- 82 Type Resources
- 114 Lettering and Calligraphy
- 33 Lettering Critiques
- 81 Lettering Technique & Theory
- 575 Announcements
- 101 Events
- 116 Job Postings
- 173 Type Releases
- 184 Miscellaneous News
- 270 About TypeDrawers
- 54 TypeDrawers Announcements
- 114 Suggestions and Bug Reports
