morphio 0.1.2

Morphs the font, so it renders worda as wordb
Documentation

Morphio

GitHub License GitHub Repo stars GitHub Issues or Pull Requests GitHub Issues or Pull Requests Crates.io Version Crates.io Total Downloads docs.rs

Morphs the font, so it renders worda as wordb.

📥 Installation

[!NOTE] You can try Morphio without installing it in the browser.

Using binstall

cargo binstall morphio

Downloading from Releases

Navigate to the Releases page and download respective binary for your platform. Make sure to give it execute permissions.

Compiling from Source

cargo install morphio

📖 Usage

$ morphio --help
Usage: morphio -i <input> -o <output> [-m] [-y] [pairs...]

Morphio: Morphs the font, so it renders worda as wordb.

Options:
  -i, --input       input font file path
  -o, --output      output font file path
  -m, --no-word-match
                    disable word match
  -y, --yes         allow overwrite output file if it exists
  -h, --help        display usage information

[!NOTE] For variable-length many-to-many morphs, Morphio appends empty placeholder glyphs to the font. When this happens, some legacy glyph-count-dependent tables such as LTSH and hdmx may be dropped instead of rebuilt. This is usually fine in modern browsers and text renderers, but very old rasterizers may render slightly differently.

✅ TODO

  • Recipe (configuration) support
    • Advanced settings
    • Morph rules
  • Configure word matching of start and end of words separately
  • Reduce TTC font sizes (table sharing?)
  • Allow morphing multiple words in one go
  • Allow morphing words with different lengths
  • ServiceWorker
  • Option for enabling/disabling word matching
    • Say we want to morph "banana" to "orange"
    • When word matching is enabled, xbanana will not be morphed, because we're matching whole words, not letters
    • When word matching is disabled, xbanana will be morphed to xorange
  • Optimization
    • Use CoverageTable::Format2, which allows for more efficient storage of contiguous ranges of glyphs
  • Better word matching
    • Currently we consider whole words only by letters ([a-zA-Z]+)
    • Next stage: consider digits ([0-9]+) and underscores (_)
    • Maybe an option for toggling which characters to consider as part of words?
  • Bug fixes
    • Might not work with fonts with multiple language records, e.g. IMPACT.TTF

🎉 Credits