Thursday, 1 December 2016

Egyptian numbers and MdC transcription of Hieroglyphic

A useful feature of most implementations of Manual de Codage (MdC) notation is distinct codes for numbers. There are five codes named 1, 2, 3, 4 and 5 used in the same way as hieroglyph alphanumeric codes or mnemonics as quadrat building blocks. This is especially useful when dealing with units 1 to 9 where it is often useful to distinguish between the concept of unity (Z1) and the number 1, duality (Z4/Z4A) and the number 2, plurality (Z2) and the number 3.


The situation with numbers, plurality and so forth is more nuanced than this summary suggests. Ancient scribes did not think in these terms. Conventions changed over time. Hieratic featured ligated forms. Specialist representations of numbers were used for fractions and other applications. My point here is about basic practical use of MdC not this wider picture.

There are two important reasons to make the numeric distinction.

1. Fonts. Most fonts used for MdC implementations to date do not display '1' differently to Z1. This will change with a new generation of improved fonts. See Egyptian Grammar (Gardiner, 1957) p191-p206 for examples showing how the original Gardiner font makes a distinction between Z1 and some numeric forms.

2. Search and analysis. Such applications using MdC are rare so far but the next generation of software will add these features. For instance searching transcriptions for dates is very useful and it is likely such software will be strict about use of number forms to avoid confusion.

Many examples of the practice of treating Z1 and numbers as if they are the same cropped up in the analysis referenced in my earlier post Analysis of Unicode Egyptian hieroglyphs in a collection of MdC-coded transcriptions. Part of the explanation of this is the fact that some of the transcriptions originated with early MdC editing software that did not support the numeric feature.

Examples of number codes used incorrectly are A1*B1:Z2 (people, plurality) incorrectly transcribed as A1*B1:3; G1&Z1 (ideogram) incorrectly transcribed as G1&1; Z1*Z1*Z1:Z1*Z1 (3:2) incorrectly transcribed as Z1*Z1*1:Z1*Z1.

It is not an MdC error to use the Z1 form. The verbose Z1*Z1*Z1:Z1*Z1 transcription, for instance, is a legitimate alternative to 3:2 in most current MdC implementations although it may render differently and in a less satisfactory way in some of these MdC implementations. Sometimes verbose is unavoidable such as using the current release of WikiHiero that does not recognise numeric codes. However it can be expected that future releases of MdC software may give a warning when verbose sequences are encountered. I'm taking this approach with data and software in the Hieroglyphs Everywhere Project (HEP) to avoid confusion when linking traditional MdC with Unicode-based solutions. In short, as a general rule use numeric representations for units in MdC where feasible.

MdC provides other numeric codes 10, 20, 30, 40, 50 and 100, 200, 300, 400, 500 used in a similar way to the units. I would like to recommend these but there is a bug in JSesh 5.5 that results in less satisfactory rendering of quadrats using these numeric forms.  -20:10- is a less satisfactory rendering compared with  -V20*V20:V20-. Fortunately, unlike the ambiguous situation with strokes, the linkage with Unicode is less problematic so for the time being its mostly harmless to use verbose notation.

The narrow Z2 issue

One problem encountered with MdC transcriptions is the fact that Hieroglyphica (1993 and 2000 versions) omitted defining a code for the narrow variant of Z2. The narrow variant is a feature of the Gardiner font and commonplace in Egyptian Grammar but not explicitly given a code in the sign list. This narrow variant is known as Z002A in Unicode and Z2D in Hieroglyphica extensions such as the Aegyptus font. Z2D was used in InScribe (2004) and documented in EGPZ version 1 (2006).

Unfortunately, the Z2D omission from Hieroglyphica means transcriptions that need the narrow variant often resort to using the number 3 as a substitute when using editing software such as JSesh 5.5. This unsatisfactory situation needs to be resolved.

Personally, when working with JSesh material I write 3\NaN (meaning not a number) - a legitimate JSesh construction. So rather than write -D21:X1*3- (as in Egyptian Grammar Exercise XVIII) I use -D21:X1*3\NaN-.

I'm not especially advocating my approach at present just drawing attention to the problem as something you will need to fix in your transcriptions in the future.

If you are developing MdC-related software such as WikiHiero it is safe and easy to add Z2D support.

Conclusions

In principle MdC support for numbers is fairly effective but has problems in some implementations. To understand this fully needs a more detailed analysis than can be adequately treated in a blog post.

I hope that by raising these points MdC users will give more thought to representation of numbers when transcribing new material or updating existing transcriptions.

To end on a positive note, the situation with Unicode-based solutions is better defined and potentially easier to use.

Bob Richmond

Tuesday, 29 November 2016

Software Developer Guidance on supporting Egyptian Hieroglyphic in Unicode: Introduction

This is the first in what I hope to be a series of technical posts aimed at software developers interested in supporting the Egyptian Hieroglyphic writing system in their systems or applications.

Most Egyptologists and others interested in Hieroglyphic need not be aware of these technical details and can skip the topic.

Unicode has contained 1071 hieroglyph characters since 2009. Additional features to enable an actual writing system in Unicode was planned for Unicode 10 (2017) but these are on hold until some requests for specialist additions are clarified meaning the release is delayed to Unicode 11 (2018) or possibly Unicode 12 (2019). These possible additions affect detailed font implementations but do not change what needs to done to make an application capable of displaying Hieroglyphic when it becomes available.

I'm working on resources for 2017 to enable useful work to be done and software to be tested so a working software ecosystem already exists whenever the standard is formally released.

Two innovative aspects of hieroglyphic writing may be especially interesting to software developers.

1. Hieroglyphs are typically arranged in clusters

This is different to most writing systems where characters follow one after another. This feature means that hieroglyphic fonts are probably the most complex examples of OpenType and can potentially reveal bugs or deficiencies in the font processing software used by applications.

The web-browser situation is in pretty good shape. If you are developing web-apps for modern browsers there is probably little to be concerned about. Conversely one well-known development environment with only limited support for OpenType is Microsofts .Net-based Universal Windows Programs (UWP) system which at time of writing does not render complex fonts.

2. Hieroglyphic is the first polychromatic writing system in Unicode

Polychromatic fonts are mostly used for Emoji characters at present predominantly via up to date OpenType font support. They are supported in the latest versions of popular web browsers Google Chrome, Mozilla Firefox and Microsoft Edge/Internet Explorer. However even simple color Emoji are still missing from many other applications.

Polychromatic hieroglyphic fonts are capable of rendering in monochrome so support is optional in your application. However casual users of hieroglyphs will likely be engaged by color and the feature also has value for scholarly work. Polychromatic fonts may gain popularity for other purposes so support is something you might like add to your application road-map.

Many application developers will need access to suitable APIs to add polychromatic support to their application. Therefore at this stage I'm especially interested in hearing from developers of high profile applications and popular API libraries and can be contacted via http://www.hieroglyphseverywhere.net/Home/Contact.

Bob Richmond

Friday, 28 October 2016

Analysis of Unicode Egyptian hieroglyphs in a collection of MdC-coded transcriptions

This is a follow-up to my post last week MdC analysis for Unicode Repertoire Extensions.

I've applied the web app to a collection of 180 MdC files and summarised the results in Analysis of Unicode Egyptian hieroglyphs in a collection of MdC-coded transcriptions [PDF].

There is also a minor update to the MdC analysis for Repertoire Extensions web app itself fixing a couple of bugs and increasing the number of repertoire candidates to 200.

Bob Richmond


Wednesday, 19 October 2016

MdC analysis for Unicode Repertoire Extensions

As part of discussions on expanding the hieroglyph repertoire in Unicode it is useful to be able to inspect existing digital documents in Manuel de Codage (MdC) format. I've therefore made a web app available for this purpose: MdC analysis for Repertoire Extensions.

Most users of MdC will probably find the app instructive, whether interested in Unicode developments or not.

MdC methods of encoding Egyptian hieroglyphs have been around for over 25 years. MdC has proved by far the most popular method of digitally encoding hieroglyphic for publishing and database-type applications.

One complication is the fact that MdC was never technically defined in detail and work on the system appears to have stopped after the publication of the second edition of Hieroglyphica (2000) and before documentation was made available online. Therefore, several interpretations, extensions, variations and subsets of MdC are in existence (e.g. WinHiero, JSesh 5.5, WinGlyph and InScribe 2004). The web app attempts to be fairly permissive on what variation of MdC is analysed.

There is something of the chicken and the egg about releasing an app before there is a clear vision of the first expansion of the Unicode hieroglyph set. Bear that in mind.

I hope to evolve and improve the app over the next few months so feel free to send feedback via www.egpz.org.

Bob Richmond

Tuesday, 11 October 2016

Unicode plain text proposal status (October 2016)

Summary

Plain text hieroglyphic writing in Unicode is currently on hold while some technical points are investigated. These are use of EGYPTIAN HIEROGLYPH LIGATURE JOINER, extensions for rare forms of writing and extensions for vertical text (the initial proposal was focused on the forms of horizontal writing that account for the vast majority of hieroglyphic in print and first generation digital formats).

This means the earliest that hieroglyphic writing will be released as part of the Unicode Standard is Unicode 11 (2018), a year after previously planned for Unicode 10. This delay unfortunately means it won't coincide with the 150th anniversary of the first print publication using a hieroglyphic typeface (mentioned in Some remarks about Unicode Hieroglyphic fonts).

This is a nuisance but in practical terms there is no reason to hold up work on building an ecosystem for Unicode hieroglyphic writing. It simply means it will be necessary to use an approach such as the web font referenced in Unicode Hieroglyphs in web browsers: Web Fonts as the basis of fonts and tools, accepting some limitations in what can be done until the Unicode standard is updated and implemented by web browsers, system software, and applications such as word processors.


Discussions

This Summer featured much discussion of the Proposal to encode three control characters for Egyptian Hieroglyphs (L2/16-018R) at the Informatique et Égyptologie - Cambridge - 2016 meeting in July. And afterwards. In early August, several of us from the I&E meeting participated in a telephone discussion with members of the Unicode Technical Committee (UTC).

There were also discussions about expanding the repertoire of Unicode hieroglyphs. In practical terms, this is the main obstacle to fully encoding a range of ancient sources one might expect to be represented in a plain text writing system. Repertoire is not entirely unconnected with control characters but the two can proceed separately in the standardisation process so I'll treat this topic another time.

The purpose of the proposed three control characters is to enable Hieroglyphic writing in Unicode (the current situation is 1071 basic hieroglyph characters were incorporated in the standard in 2009 but there is no way to form quadrats so there is no authentic writing system as such). Most participants were in agreement with the principle of enabling the writing system. However, the Thesaurus Linguae Aegyptiae (TLA) and Ramses corpsus projects have objected to moving forward with the three until additional features are provided.

The reason these extensions were not proposed for the first release was to focus on the vast majority of modern hieroglyphic in typeset books and digital formats which use horizontal writing and do not need additions to enable digital encoding.

Interest was expressed in extending the scope of  L2/16-018R to deal with vertical writing and the related 'tall quadrat' orthography (used in some horizontal writings). Some are of the opinion it is important this is done for the first release of support for the writing system rather than as a second stage. I've described two extended control characters, EGYPTIAN HIEROGLYPH HORIZONTAL GROUP JOINER and EGYPTIAN HIEROGLYPH HORIZONTAL GROUP JOINER I've been using for vertical text evaluation in a discussion document An Extension to the three control characters for Egyptian Hieroglyphs and some additional remarks (L2/16-214).

Examples of several instances of rare quadrat arrangements were noted that cannot be represented elegantly or unambiguously using L2/16-018R. Analysis so far suggests these account for order 0.01% (sic) of the digitised corpus but may be more common in certain ancient contexts.

Additional controls can be added to deal with rare quadrats but the issue needs to be better characterised and agreed by Egyptologists before deciding what to do. As with the basic 3 characters, data needs to be studied and evaluated before submitting a formal proposal.

Discussions in July yielded a consensus with TLA and Ramses projects on implementation of two of the three characters namely EGYPTIAN HIEROGLYPH HORIZONTAL JOINER and EGYPTIAN HIEROGLYPH VERTICAL JOINER, published as L2/16-227.

M-J Nederhof presented a discussion document L2/16-177 at the I&E meeting based on adapting his RES scheme as an alternative approach to control characters for Unicode quadrat sequences without using the horizontal or vertical joiners. This was followed by a revised document L2/16-210 with addendum L2/16-233 which outline two alternative versions and notations of his system.

There are many alternative ways one might define quadrat sequences using various levels of complexity but there would need to be convincing evidence to drop the vertical and horizontal joiners and/or require complex or hard to read sequences for simple quadrats. It is obviously important that any proposed alternatives are capable of implementation in current technology. 

Discussions continue on the Egyptian Hieroglyphs in the UCS mailing list (see archives at http://evertype.com/pipermail/egyptian_evertype.com/). Egyptologists and others with an interest in the topic are encouraged to join and participate in or follow the list.

Status of the L2/16-018R proposal

L2/16-018R was published in January 2016 as a revision to the original May 2015 publication L2/15-123. No objections had been received by UTC during May-January so the proposal was put out to international ballot as a UTC recommendation in January 2016. Comments were received by UTC in April 2016 ( L2/16-090, my reply at L2/16-104) where specific objections were made to the EGYPTIAN HIEROGLYPH LIGATURE JOINER.

Following discussions outlined above, L2/16-018R is on hold until it is determined what additional features are required to obtain consensus. I suspect the earliest this can be reviewed by UTC is January 2017.

Over the next few months it would be really useful if comments, requirements or objections about any additions can be made in a timely fashion to UTC in future to avoid further unnecessary delays.

Bob Richmond

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