Forum › How do I...?

Is there a way around this Contextual Chaining Substitution issue?

JonathanMagus
I am using a font that has a lot of Opentype features including Contextual Chaining Substitutions. Prince is handling the typesetting very well, except where the use of a different character is conditional on there being a space in the sequence matched to. These instances work in other software, for example Microsoft Word with Contextual Alternatives enabled, so I am guessing that the basic problem here is that Prince and/or CSS and/or XHTML/HTML5 do not recognise the space character U+0020 at all.

Is there a way around this?

mikeday
Not at the moment, unfortunately. We might need to synthesise a space character at every word boundary, but what about the notional space at the start and end of lines?
JonathanMagus
Thank you for confirming that.

The only workaround I have thought of for this is to mark up the text in appropriate places before converting it with Prince and then calling the required substitutions from a specific style-set within the font, which is not very efficient—and of course means having control of the OpenType font too, which in this case I have. Plus that is doubling up on the Contextual Chaining Substitutions already in it that do work in other applications.

By way of explanation the objective here is a visual patina from an apparent randomness of the type simulating historic printing, including the variable casting of the letter sorts, the effects of ink gain, worn type and paper texture etc., as seen in the uploaded sample.

The same functionality might apply to type imitating handwriting or swashed italics though where randomness and context specific variations are desirable, as well perhaps for contextual scenarios involving particular languages and scripts.

Identifying a space before or after a word would allow a contextual change to be implemented, so I am not sure how important the notional space at the start and end of lines would be. Obviously in a lot of situations another character may be used as an anchor and Prince handles that properly, however, picking up on a space as well allows randomness in frequently repeated words to be introduced.

I accept this may not be a mainstream requirement of course.
  1. Magus1818FrankensteinSample.pdf187.8 kB
mikeday
That does look very cool, we will investigate this issue.