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.
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.
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.
- 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
- Add support for processing fonts with CFF outlines
- Enhance Manuel de Codage interpretation capabilities
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"
eglyf --input <input-font> --output <output-font> [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"
- Example:
--experimental-mdc-subst
: Enable/disable GSUB lookups for Manuel de Codage support ("on"/"off", default "off")
This writing direction is the default writing form. No feature setting needed.
This writing direction is not supported.
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";
}
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";
}
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.
- C++20 compatible compiler
- CMake 3.16+
- cxxopts
- harfbuzz (for unit test)
- doctest (for unit test)
- Noto Egyptian Hieroglyphs (for unit test)
The following fonts have been successfully tested with eglyf:
Important
When modifying these or other fonts, please ensure compliance with their respective licenses.
- MIT
See the LICENSE file for details.