Entering Large Volumes of Hieroglyphic Text

Introduction

In 2020 I put up a webpage for MAT390H1 (History of Mathematics before 1700) that discussed various methods for entering Hieroglyphic and Cuneiform characters and numbers. It was bit level oriented, and it focused on approaches that were only viable for entering a handful of characters at a time , and which did not scale well to entering full sentences, paragraphs or documents.

This page addresses the question of entering sentences or paragraphs of hieroglyphic text. It discusses several ways of quickly entering text, their strengths and weaknesses.

Solution (with links) Brief Description Output Format Getting output into Applications Support: Quadrats Support: Right-Left, Top-Bottom Comments
Keyman with Hieroglyphic Keyboard Template Adds a new keyboard template to the operating system. Allows you to type Gardiner Codes or MdC phonetic codes and have them displayed in hieroglyphics. Keyman and its templates are free.

Sample:

𓂋𓂝𓀭

Unicode characters As the output is Unicode, you can use this approach directly in almost all applications. I have tried it successfully in MS Office, Libre Office, various text editors ... None - Characters are displayed as a 1 dimensional string, going from left to right. None As long as you don't need any quadrats or right-left, top-bottom text, this approach allows you to enter hieroglyphs as native Unicode strings in almost all applications. You need to know the Gardiner Codes/MdC transliteration codes, but that is true for all of the approaches described here. This approach is very useful for typing documents, as you can switch between hieroglyphics and other languages with a simple key sequence, and you can take advantage of the capabilities of whatever application you are using. The major issue is the lack of support for quadrats and it only supports left-right text.

Sample Keyman: ... and we see that 𓂋𓂝𓀭 contains 3 glyphs ..

JSesh Open source program that allows you to enter Hieroglyphics with quadrats. Probably the closest thing to a standard tool in the field.

Sample:

Images - .png, .jpg, .svg ... Note that JSesh supports .svg, so its exported images scale better than those from RES. Probably not an issue for web pages, but this can be important for output that is meant to be printed. You can copy hieroglyphic strings directly from JSesh and paste them into other applications. In the case of LaTeX, you can save the image as a file, and then import it into your source code. Additionally, the author of JSesh has developed a basic facility to enter quadratted hieroglyphics directly into your LaTeX source file. It only supports left-right text and does not support all of JSesh's formatting functions, but it is quite intuitive and bypasses the need to deal with intermediate image files. Yes. Excellent Support Also supports showing damaged hieroglyphs, and output in black and red. Yes. Excellent Support. Flips glyphs appropriately for right-left. JSesh is the standard approach for entering Hieroglyphics. It is intuitive to use, and its output can be further customized to create an accurate rendition of an actual object by feeding JSesh .svg output into an SVG editor like Inkscape. The only real issue is that it outputs images rather than text. This means that you cannot search for individual characters or strings in your output document, and you may end up with a hybrid document containing a mix of Unicode characters and images, which may have a bit of that "Kindle" look and feel (although by using .svg output you can minimize this:

JSesh(.png): ... and we see that contains 3 glyphs ...

JSesh(.svg): ... and we see that contains 3 glyphs ...

RES(Revised Encoding Scheme) Javascript Implementation RES is a revision to the MdC(Manuel de Codage)approach to encoding hieroglyphs and transliterations. It is supported by working Java and Javascript implementations. It is available from the University of St. Andrews in Scotland, and it is free and open source. I will be discussing the Javascript implementation, which can be used to include hieroglyphs in web pages.

Sample:

r:a-A40

Images - .png, .jpg, ... in html web pages. As noted above, RES does not support .svg, so its output is not "print quality". Also, because it formats the hieroglyphics at page load time, you will find that pages with a lot of hieroglyphics take a few seconds to load and format. Once you have displayed a string in a web page, you can move it to another application by cutting and pasting, or by saving it as a .png, .jpg ... file. See comments above re JSesh.The fact that output consists of image files rather than Unicode characters is the main drawback to using either JSesh or RES - but the underlying issue is not with them, but rather that existing applications do not support the quadrat formatting capabilities that Unicode defines. Until that happens (probably never??) outputting quadrat formatted (or right-left text) as images will likely be the only game in town. Yes. Excellent Support. Also supports showing damaged hieroglyphs, and output in the basic html colours. Yes. Excellent Support. Flips glyphs appropriately for right-left. This is the approach that I have used to build almost all of the pages in this website and my preferred way of generating hieroglyphic text for the web. There is a caveat, however. I build web pages by writing raw html, css and javascript or by writing Python/Javascript scripts to programatically generate the html/css from spreadsheets and pandas dataframes. Given this, the RES approach is very productive, but it assumes you are comfortable working down at the html/css code level. Of course, the upside of this is that you get much more control. For example, the Python code that generates my web pages that show the RES command strings in "canonical form" simply feeds a string that is quadrat formatted into a Python function which strips out the quadrat formatting commands and converts any transliteration shortcuts into Gardiner Codes:
toRESCanonical('r:a-A40') ==> D21-D36-A40
You may end up with a hybrid document containing a mix of Unicode characters and images, which may have that "Kindle" look and feel:

RES(.png): ... and we see that r:a-A40 contains 3 glyphs ...

Summary:

Data Input Approach
Property Keyman JSesh RES
Output Format Unicode Character String Image: .svg, .png, .jpg, .pdf... Bitmap image: .png, .jpg ...
Output Quality Print/Publication Print/Publication Web page
Quadrat & right-left support None Excellent Excellent
Formatting Excellent: All the formatting options available for text formatting can be used. The major caveat is that there is no support for quadrats, right-left or vertical text. Limited: red or black Medium: basic web colours; some formatting can be done using the RES command string, rather than manipulating the image after the fact.
Integration into text documents Excellent, as it uses standard font technology - BUT, as there is no support for quadrats or right to left character strings, it does not produce formatted hieroglyphics. Medium to very good-image/text hybrid, but .svg/.pdf output fits in nicely to a text document Medium-image/text hybrid with bitmap images (.png, .jpg). RES does not support SVG, so scaling and image quality can be problematic in some situations.
Use of code to generate or manipulate Medium: Unicode characters are easy to deal with, but you will need to build some Gardiner Code <=> Unicode codepoints conversion scaffolding. Medium-Difficult: There is an API for Java, but you will have to do some work to integrate the JSesh libraries, and then you have to write your code in Java. Easy-ish: Just use your favourite language. For this website, I tend to use Python for those pages that can be pre-generated, and Javascript for ones that dynamically update as a result of user actions.
Sweetspots Publication quality output. Use Keyman keyboard template whenever quadrats are not needed for fastest data entry. Use JSesh for high quality quadrats. Use Keyman template to enter transliterations. Web page development, both hand crafted and code generated. Complex text processing. e.g. Building verb conjugation tables