Skip to content
/ eglyf Public

An OpenType font tool that modifies OTF files to add support for Egyptian Hieroglyph Format Controls

License

Notifications You must be signed in to change notification settings

kbinani/eglyf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eglyf

An OpenType font tool that modifies OTF files to add support for Egyptian Hieroglyph Format Controls.

This project is inspired by and builds upon concepts from Microsoft Font Tools.

Important

This tool is currently under development.

About Egyptian Hieroglyph Format Controls

Egyptian Hieroglyph Format Controls (U+13430–U+1343F) are Unicode characters that specify the layout of hieroglyphic text. While these controls are defined in the Unicode standard, they typically require specialized software to be interpreted correctly.

What this tool does

eglyf enhances fonts to support these format controls:

  • Enables hieroglyph-specific layouts through the font's native capabilities
  • Allows proper rendering with widely-available text engines

Once processed with eglyf, fonts can correctly display hieroglyphs with their unique layouts using only standard OpenType features.

Features

  • Replaces the 'DFLT' script of GSUB and GPOS tables to add necessary lookups for Egyptian Hieroglyph Format Controls
  • Modifies cmap, GDEF, and other tables to enable proper rendering of hieroglyphic text

Future plans

  • Add support for processing fonts with CFF outlines
  • Enhance Manuel de Codage interpretation capabilities

Steps to build

git clone https://github.com/kbinani/eglyf.git
cd eglyf
git submodule update --init --recursive
mkdir build
cd build
cmake ..
cmake --build . --parallel
./eglyf_artefacts/eglyf --input input.ttf --output output.ttf --names "My EgyptHiero/Regular/My Egyptian Hieroglyphs Regular/MyEgyptianHieroglyphs-Regular"

Usage

eglyf --input <input-font> --output <output-font> [options]

Options

  • --input: File path to the input font file (required)
  • --output: File path where the modified font will be saved (required)
  • --names: Custom name for the output font, formatted as "family/subFamily/fullName/postScriptName" (optional)
    • Example: --names "My EgyptHiero/Regular/My Egyptian Hieroglyphs Regular/MyEgyptianHieroglyphs-Regular"
  • --experimental-mdc-subst: Enable/disable GSUB lookups for Manuel de Codage support ("on"/"off", default "off")

Writing Direction

LtR (left to right) horizontal writing

This writing direction is the default writing form. No feature setting needed.

RtL (right to left) horizontal writing

This writing direction is not supported.

LtR vertical writing

When using the font for LtR vertical writing, the vrt2 OpenType feature must be enabled. Here's an example of how to enable this in CSS:

.example {
  writing-mode: vertical-lr;
  font-feature-settings: "vrt2";
}

RtL vertical writing

When using the font for RtL vertical writing, the rtlm and vrt2 OpenType features must be enabled. Here's an example of how to enable them in CSS:

.example {
  writing-mode: vertical-rl;
  font-feature-settings: "rtlm", "vrt2";
}

Disclaimer

This tool modifies font files but does not check the license terms of the input fonts. Users are responsible for ensuring that any modifications made to fonts comply with the original font's license terms. Some font licenses may not permit modification or may have specific requirements for derivative works.

Dependencies

Tested fonts

The following fonts have been successfully tested with eglyf:

Important

When modifying these or other fonts, please ensure compliance with their respective licenses.

License

  • MIT

See the LICENSE file for details.

About

An OpenType font tool that modifies OTF files to add support for Egyptian Hieroglyph Format Controls

Topics

Resources

License

Stars

Watchers

Forks

Languages