JavaScript implementation of Ancient Egyptian in Unicode

This implements Additional control characters for Ancient Egyptian hieroglyphic texts (L2/21-248). There is a choice of three different technologies:

  1. using SVG,
  2. using DOM elements (CSS and HTML), and
  3. using HTML canvas.

For most applications, SVG seems to be the best choice. One advantage of DOM elements is that they allow copy-and-paste; this is currently not possible with SVG without getting spurious linebreaks between signs. With DOM elements, however, positioning of signs is suboptimal on Mac OS. HTML canvas is the most robust but suffers from pixelization.

Other pages on this site

All the relevant files can be found on GitHub.


Use hieroglyphic encoding in web pages

Copy hierojax.js, hierojax.css, and NewGardinerSMP.ttf to your folder with web pages. In the header of a web page with hieroglyphic, include:

<link rel="stylesheet" type="text/css" href="hierojax.css" />
<script type="text/javascript" src="hierojax.js"></script>
<script type="text/javascript">
    window.addEventListener("DOMContentLoaded", () => { hierojax.processFragments(); });
In your web page, represent fragments of hieroglyphic as exemplified in demo.html.

Invoke the graphical editor off-line

Copy edit.html, edit.css, help.html, hierojaxedit.js, hierojax.css, NewGardinerSMP.ttf to a local folder. Open edit.html in your browser.

Run MdC-to-Unicode conversion off-line

Copy mdcconversion.html, mdcconversion.js, conversion.css, NewGardinerSMP.ttf to a local folder. Open mdcconversion.html in your browser.

Run RES-to-Unicode conversion off-line

Copy resconversion.html, resconversion.js, conversion.css, NewGardinerSMP.ttf to a local folder. Open resconversion.html in your browser.

Make web page out of converted text

The conversions mentioned above can be downloaded as JSON files. Such a JSON file can be turned into a web page by a customizable Python script.


To explore the benefits of having 16 characters, instead of the current 4, for lost signs: To explore the benefits of having 8 additional characters on a 3x3 grid: