Thursday, 29 September 2016

Some remarks about Unicode Hieroglyphic fonts

Some topics are so well known that often they are not even mentioned. This post is about one such topic namely that there are many modern fonts on computers and other digital devices so a writer or publisher needs to choose one or more that work for a specific purpose. Choose the wrong font for your content and the result will be be missing or unsatisfactory characters. This is true for hieroglyphic like every other writing system,

Currently all Unicode Egyptian Hieroglyphic font releases I know of implement the whole Unicode Standard (2009) basic repertoire of 1071 hieroglyphs. There are no subset fonts for specific purposes such as early school education where two hundred signs would be more than adequate. So right now we don't see missing characters or need to take a variety of fonts into account to a great extent.

With ongoing work to extend the Unicode repertoire and include quadrat shaping to make an actual writing system, this situation will likely change considerably. A font designer concerned with the classical phase of the writing system will not want to spend months or years dealing with thousands of specialist hieroglyphs attested only from the Ptolemaic period. A font designed to work well for Ramesside hieratic transcription into hieroglyphic cannot be expected to optimise quadrat arrangements irrelevant to hieratic. A font optimised for small print (e.g. 12pt - 18pt) may make different design choices for glyphs and quadrat shaping than one optimised for 24pt plus).

Furthermore decorative colour fonts are now possible using OpenType but such fonts may be limited in scope to specific purposes.

In short, over time we can expect a wide range of hieroglyphic fonts will evolve. As with modern writing systems. Some aspiring to beauty, others providing specialist functionality. Their scope of use will often be different.

First generation digital hieroglyphic systems (typically using one or another form of Manuel de Codage aka MdC coding), mask these issues. Specialist hieroglyphic software to date typically uses a single 'one size fits all' font such as a Gardiner or Hierogyphica derivation with a single fixed method of arranging hieroglyphs in quadrats. New thinking is needed to embrace a rich world of multiple fonts and take advantage of the Unicode principle of separating plain text encoding data from the fonts used to render the text.

Some of the difficulties in gaining consensus on next steps for Unicode appear to be grounded in the mistaken notion that Unicode should be used in exactly the same way as MdC practice as if the goal were a single Unicode hieroglyphic font that does everything an Egyptologist could ever ask for. There is room for a general purpose font or two - a fallback font - but it should be understood its a small part of the story for many purposes,

One practical consequence of font diversity is Unicode hieroglyphic in plain text can expect to show an 'unsupported character' glyph when displayed using a font that does not support the writers intent. Likewise a quadrat control character sequence will have visible control characters for quadrats the font does not support and might look like:

(actually all quadrats in this specific illustration will likely be fine in most fonts but it illustrates the principle).

This is no different to the situation with Unicode in many disciplines. Mathematical typesetting is a good complex example but even simple examples are commonplace in everyday life if you read beyond a-z. The solution is to understand what you are doing and use appropriate fonts, formats, and software tools for the task in hand. If specific fonts don't do the job you simply don't use them.

Like many concepts this topic will be trivial to understand once hieroglyphic is available for use as a writing system and multiple fonts are released. For now it needs a little imagination.

Historical note

As far as I know (and someone correct me if I am wrong!) the first hieroglyphic typeface was that used in the hieroglyphic dictionary and grammar of Samuel Birch, published in 1867. Next year, we can celebrate 150 years of hieroglyphs in print.

Facsimiles of typeface used in Samuel Birch's' Grammar and Dictionary from 1867. 

The Gardiner/Oxford metal typeface was cut around 60 years after Birch/Bonomi/Longman and several other fonts made and used during the intervening years. Lepsius/Theinhardt is probably the best known of these. The usual MdC situation with a single all-purpose font has a long tradition in print.

It is only recently that we are starting to see richer use of multiple fonts. A good example is Middle Egyptian Literature (James Allen, 2015) which makes effective use of a distinctive bold face.

Distinctive bold font in Middle Egyptian Literature (2015)

I expect we'll see many more innovations once the additions to Unicode are available and supported. We are approaching the beginning of a new era.


Bob Richmond

Monday, 26 September 2016

Unicode Hieroglyphs in web browsers: Web Fonts

I outlined the situation with hieroglyphic for general purpose web pages in an earlier post Unicode Hieroglyphs in web browsers: generic web pages. This note outlines another way of presenting Unicode hieroglyphs on a web page designed for Egyptian.

Web fonts are fonts that are requested by web pages for download (if necessary) for use on the web page. WOFF (the Web Open Font Format [Wikipedia]) is the international standard for packaging web fonts. All popular browsers have supported WOFF since 2010. Browsers may still support older schemes for 'font embedding' for compatibility issues with old web pages but for the vast majority of web sites WOFF should be used and the older schemes avoided.

Web fonts are especially useful for web pages that want to make use of specialist writing systems without having to rely on the writing system being fully supported on your device in order to read the page. They are therefore potentially useful for Egyptian Hieroglyphic in Unicode.

Some useful points to be aware of.

  • Web fonts are compressed and usually 'cached' on the local device so they need not be downloaded each time they are used. This is especially useful and efficient for mobile devices.
  • Browser software usually needs to be enhanced every time the Unicode standard is updated as relates to a specific writing system. This will affect progress during introduction of the hieroglyphic writing system.
  • Services such as Google Fonts can supply identical fonts to a wide range of web sites. Google Fonts is easy for web site developers to use, and only a single copy of the font needs to be downloaded for sharing among sites that use it. For Egyptian Hieroglyphs the recent delays in Unicode standardisation and the cost of creation and release of suitable Google Fonts means this route will probably be impractical for some time unless there is adequate support for the process.
  • Fonts can be provided on an individual site basis. This is the short term approach to be adopted for the Hieroglyphs Everywhere Project web site which also hopes to provide the tools to enable other sites to do the same once the Unicode standard is updated. The same approach could be adopted for a large web site such as Wikipedia.
  • If you copy hieroglyphic from a web page that uses a web font to another application (or web page), that application (or web page) will need to have access to the same (or similar) font in order to gain a satisfactory result. This is no different to any writing system but less obvious in the well-supported systems such as the Latin-based scripts used for English and other popular languages . 

Much can be said on technical aspects of web fonts so I'll likely return to the topic when there is more use of Egyptian Hieroglyphic in Unicode on the web.

In order to set the ball rolling on hieroglyphic web fonts I've created a Browser Test Page for Hieroglyphic in Unicode development. This page uses a web font with a feature to get around the fact that the hieroglyphic writing system is not yet available in Unicode (we have 1071 hieroglyphs but control characters for quadrat arrangements are still being delayed). You can use the page to confirm your web-browser is working correctly. (If there are problems on specific devices I'd like to hear about them so this can be resolved or documented to inform others in a similar situation. Thanks.)

Bob Richmond

Monday, 15 August 2016

Informatique et Égyptologie - Cambridge - 2016

A meeting of the working group “Informatique et Égyptologie” of the International Association of Egyptologists took place at the Fitzwilliam Museum, Cambridge on 11-12 July, 2016.

Presentations and discussions were almost entirely concerned with the hieroglyphic writing system in future additions to the Unicode Standard. The main areas of focus were:


A summary of the meeting by Debbie Anderson of the Script Encoding Initiative, Berkeley is available as Brief Report from Cambridge meeting of Egyptologists and Update [pdf].

Ongoing discussions following the meeting are taking place on the Egyptian Hieroglyphs in the UCS mailing list (see archives at http://evertype.com/pipermail/egyptian_evertype.com/). I'll try to deal with some of these follow-up activities in future blog posts.

If documents from presentations made at the meeting become available online, I'd like to link to them here. Let me know if or when anything becomes available. Thanks.

Bob Richmond

Monday, 18 July 2016

Simple higher level protocols and Unicode Plain Text hieroglyphic writing

Simple (plain) text has limitations in what can be expressed without additional information. There are various 'Higher Level Protocols' (HLP) used to enrichen all kinds of writing systems. HTML/CSS and various document formats such as those used in 'office' applications are kinds of HLP managed as international standards. To use Unicode Egyptian hieroglyphic along with these complex protocols it is desirable for Egyptologists and others to develop conventions of how to work with these protocols in consistent ways so as to be able to share rich data. Something for the future.

However, not all protocols need be complex like HTML/CSS.

Consider hieroglyph combinations already encoded as characters in Unicode. 𓃁 (ab) is 𓂝 (a) on top of  𓃀 (b). Gardiner calls these combinations Monograms and the current practice in Unicode is to encode monograms as separate characters.

As things stand in Unicode there is no character for 𓂧 (d) on top of  𓃀 (b) - (db) rare as a monogram. For many applications and users this is not a problem but this may crop up in some situations like corpus database.

The answer is to define or adopt a simple higher level protocol. For instance use the character '+' to indicate 'on top of' so (db) is encoded 𓂧+𓃀. Similarly for any other monograms not yet encoded. This is still plain text just not pure hieroglyphic so can be used in applications and databases. To render this combination visually software will need adaptation but this is something that needs to be done in general for hieroglyphs not yet encoded in Unicode so there is little impact.

This reasoning applies to other specialist writing features for which there is not sufficiently strong evidence to warrant direct support in plain text at this time. I expect various conventions will evolve as users gain more familiarity with Unicode.

There is an active discussion as whether the policy of encoding monograms as separate characters should be continued or an additional control character should be introduced to take the role of + as given here. Either way, the method described here enables work on Unicode solutions to continue regardless.

Bob Richmond


Thursday, 7 July 2016

Transcription of Hieroglyphic into Unicode Hieroglyphic Plain Text: Part 1

Modern web pages and printed publications are dramatically more elaborate than documents from the 1950s which in turn used advances in printing technologies unavailable to our ancestors. Complex examples surround us online and in print. Newspapers and magazines, product labelling, instruction manuals, advertisements, reference works, textbooks and specialist publications the list goes on and on. Graphics, emojis, icons often complement textual elements which themselves increasingly use a variety of writing systems. Even when written in a language such as English, with its simple alphabet and easy to understand notion of plain text, text in documents can be very elaborate and feature a range of scripts, fonts and typographic styles.

Turning attention to hieroglyphic, consider the Middle Kingdom Stela (BM EA851, from BM page):


There is a line of horizontal text and eight columns of vertical text beneath, along with some pictures/hieroglyphs. Note: traditionally, an Egyptologist might create a line drawing of a stela rather than use a photograph as here; especially useful when there is damage or hard to read hieroglyphs. To discuss the text content, the text elements may be extracted and transcribed, often transcribing vertical text into horizontal writing. Hieroglyphic fonts have been available for 150 years and can be useful for this purpose, Transcription to Unicode Plain Text Hieroglyphic (when standardised) may be used in a similar way.

Modern technology has changed the way we look at artefacts that feature Ancient Egyptian in hieroglyphic. Our eyes are now used to elaborate web pages and publications in everyday life. The idea of arranging text and graphics in the Egyptian way is not as unusual as it would have appeared to scholars or general reader in the 19th and 20th century. Older books on the topic can therefore emphasise different and unfamiliar but this view is becoming increasingly anachronistic to the modern reader.

Web technology and editing tools are also designed around increasing complexity of documents and this means there are now natural ways to think of transcription of hieroglyphic sources in terms of modern technology and standards. In some cases this may mean changes, sometimes subtle, to traditional thinking on digital representations of hieroglyphic.

It is instructive to look at any complex web page based around a simple basic writing system such as English and consider how it might be transcribed as plain text. This exercise can help understand what needs to be considered for Egyptian and avoid over-enthusiastic expectations as to what can be expected from hieroglyphic in Unicode plain text.

This post is is about transcription of hieroglyphic sources to Unicode plain text (however it ends up being standardised). It is important to distinguish this practice from hieratic transcription to hieroglyphic (see Transcription of Hieratic into Unicode Hieroglyphic: Part 1 and later posts on the topic) which uses the same encoding system but has its own specific issues.

There are several points on transcription I'd like to make now in this introduction.
  • Limitations to plain text transcription implied by fonts. Obviously a general purpose hieroglyphic font cannot be expected to contain hieroglyphs that look exactly the same as those in an original document, inscription or painting. The same hieroglyph may be written differently in the same document.
  • Different fonts for plain text may render hieroglyph clusters in different ways. For example a font optimised to represent text in a traditional Manuel de Codage (MdC) layout may look different to a font designed to make a more pleasing generic representation. A font optimised for Late Egyptian hieratic transcription may make different choices for its subject matter. At some point we will have colour fonts in various styles. So far, most Egyptologists are only familiar with editing tools that are limited to a single font. Choice and variety enable a large step forward but can require some fresh thinking.
  • Higher level protocols are essential for many scholarly requirements from hieroglyphic. This will involve defining conventions for web pages (HTML/CSS) and new encoding formats using XML, near plain text, or adaptations of other formats. Work on this has scarcely begun.
  • Transcription is not meant to replace facsimile, photography or other techniques for representing hieroglyphic sources. In many cases the goal is to augment the source in order to promote search-ability, analysis and readability.
  • Typically an Egyptologist will transcribe into left to right horizontal text. If the source material uses columns the vertical text arrangements of hieroglyphs is often not copied verbatim but adapted into a more horizontal style of writing. Partly this is about convenience and uniformity but it is also the case that hieroglyphic fonts don't yet support right to left. General purpose software applications such as word processors are not yet geared up to work terribly well with column text. This is not an intrinsic limitation of the Unicode concept of plain text but likely a practical issue for the next few years at least.
I hope to return to various facets of this large topic in future posts.

Bob Richmond


Monday, 27 June 2016

Unicode Hieroglyphs in web browsers: generic web pages

In an ideal world, Egyptian hieroglyphs in Unicode will simply appear as such to the reader when they are used on a website page. The general reader should not have to do anything special such as install a font or configure the web browser in order to display Unicode text.

Egyptian-aware web pages may render text as images (as mentioned in various earlier posts, e.g. on WikiHiero) or use web-fonts to provide a full text experience. These techniques generally work well with reasonably up to date web browsers on all kinds of devices.

However, this post is concerned with generic web pages meaning web pages without any special coding for Egyptian hieroglyphs. These pages rely on the web browser and/or its underlying operating system to render correctly.

Probably the best known example of a generic web page is the Google search page www.google.com. This blog post itself is also such a web page, hosted on www.blogspot.com so if all is well with the browser and device on which you are reading you should see hieroglyphs at the end of this sentence - 𓇳𓄟𓋴𓋴.

Then if you copy then paste these four hieroglyphs into Google search, you see something like this:


I've highlighted the hieroglyphs in red boxes. Search is just one example. If you want to write hieroglyphs in web forums or read hieroglyphs as text on an arbitrary web page chances are you are reliant on generic hieroglyph support from your web-browser.

Modern versions of macOS/iOS from Apple and Windows 10 from Microsoft are Egyptian hieroglyphic ready 'out of the box' and so are their supplied web browsers (Safari, Edge or Internet Explorer) . So is a correctly configured Linux distro. Generic web pages just work for users of hundreds of millions of these modern devices.

If this works for you, great. The browser or system you are using is Unicode hieroglyphic ready and you are done with this post unless you are curious about technicalities.

However the global picture is not yet entirely rosy. Android, by far the most popular system for mobile phones and tablets, is not yet up to speed. Old versions of iOS/macOS and Windows are not hieroglyph ready. When you try the Google search on these kinds of system you likely see box characters where hieroglyphs are expected unless something has been added to these systems to avoid problems.

Why hieroglyphs work (or don't)

Technically for a web browser to render hieroglyphic text on a generic web page all it needs to do is:

1. Recognise the text characters are hieroglyphs.
2. Use a font with hieroglyphs to render the characters.

The Google search illustration above is from Windows 10 using Internet Explorer 11. Everything works as expected because Windows 10 comes with the Segoe UI Historic font (which contains Unicode hieroglyphs). Internet Explorer recognises hieroglyph characters and, in the absence of any more specific font specifications on the web page, uses the Segoe font as default. The Microsoft Edge and Mozilla Firefox browsers also work correctly.

However, even on Windows 10, the Chrome browser (version 59 and earlier) is not hieroglyph ready. It does not detect hieroglyphs on a web page and choose an available font. Chrome 59 serves as an illustration of how things can go wrong when a browser has bugs in font handling.

The latest release of Android (6.01) has an additional problem in that Android comes with a very limited number of fonts installed. Hieroglyphic is not and this is just one of a large number of writing systems that therefore don't render in Chrome, the standard Android web browser, because no font is available or automatically downloaded when required. In theory a Android device could work when the device maker supplies an enhanced version of  Android. In practice I've never seen this happen. Presumably we'll see a working version of Chrome from Google eventually. Meanwhile Chrome should be fine for most Egyptian-aware web-pages.

Getting hieroglyphs to work for generic web pages

With the huge range of devices and browsers available nowadays it is impossible to give detailed information about what may or may not be done to address problems if your setup is not hieroglyph ready.

In many cases the simplest solution is to update your system setup if possible and/or ensure your web browser version is kept up to date.The technical world has moved a long way since 2009 when hieroglyphs were introduced to the Unicode standard but initially unsupported in the then latest systems such as Ubuntu 10.04 (Lucid Lynx), Mac OS X 10.6 (Snow Leopard) and Windows 7.

Updating is easy for most Linux distros, Apple now provides macOS/iOS updates free of charge and likewise Microsoft provides updates from Windows 7/8 to Windows 10 (strangely, this is currently stated to be free of charge for only a limited time until late July 2016).

If updating is impossible, it seems the Firefox browser works correctly on Linux and Windows devices I've tried so long as it finds a Unicode hieroglyphic font installed. This may work for you. In particular if you are stuck with an old PC setup with Windows 7 it should be sufficient to install a Unicode hieroglyphic font then use Firefox for generic web-browsing instead of Internet Explorer or Chrome. Other less well known browsers may also work.


Bob Richmond

Tuesday, 21 June 2016

Hieroglyphs on the web: The Digital Topographical Bibliography

The Topographical Bibliography of Ancient Egyptian Hieroglyphic Texts, Statues, Reliefs and Paintings (Topographical Bibliography or TopBib for short) is a long running project (work began in the early 20th Century) based at the Griffith Institute, Oxford. The first part of Volume I of the Bibliography - THE THEBAN NECROPOLIS PART 1. PRIVATE TOMBS - was published in 1927. Since then new volumes and revised versions have been published.

The first seven printed volumes of TopBib followed the Topographical approach. The more recent Volume VIII - OBJECTS OF PROVIDENCE NOT KNOWN (2000-) instead, for obvious reasons, organises objects by type and period.

A brief  History of the Topographical Bibliography is available on the Griffith Institute website.

TopBib is the essential and definitive resource concerning Ancient Egyptian objects.

Behind the printed volumes, modern technology was introduced to TopBib during the editorship of Jaromir Malek with use of databases for digitised versions of the text, hieroglyph encodings and so forth. Some material was made available on the web and the notion of an online version of the Bibliography devised. Aside from the benefits of making digitised material available to scholars, technology helps work on TopBib to continue more efficiently (there is a large amount of material available yet to be analysed and published).

The Digital Topographical Bibliography currently provides access to the printed editions (mostly in PDF format). A small amount of material is also available in new data formats and a useful reference system has been introduced (see DIGITAL TOPOGRAPHICAL BIBLIOGRAPHY: The Digital Approach).

TopBib was studied as part of the process of adding Egyptian Hieroglyphs to the Unicode Standard. The printed editions originally employed the Gardiner 'Oxford' font used as the primary reference for the initial hieroglyph repertoire.

The idea of using Unicode plan text hieroglyphic for Digital TopBib goes back over a decade and its a good example of a major publication for which plain text meets all hieroglyph requirements.Much work needs to be done to complete the first digital edition but this should benefit greatly from plain text availability.

Bob Richmond