Forum Bugs

positioning of combining diacritics on accented characters in italics

pieter.lamers
I have a problem rendering ā̰ (and others) where 'ā' is used as a unicode char with a subscript tilde added below. Chrome renders it correctly with my font (Minion 3) but PrinceXML has the tilde shifted to the right halfway the next character. Note that the tilde is correctly placed under 'a' without a bar. Also, changing the ā to a + ̄ + tilde fixes the positioning. so the tilde works fine when stacking on an ascii a but not on an already accented char. Is this a known issue? Is this something that can be fixed?
  1. accented-char-with-tilde.png1.8 kB
mikeday
It probably relates to Unicode normalisation. There are up to three ways to write a character with two accent marks in Unicode:

three characters: base + mark1 + mark2
two characters: [base precomposed with mark1] + mark2
one character: [base precomposed with mark1 and mark2]

Different fonts support different combinations of these via ligatures and mark positioning. Some fonts even support all three but make them look slightly different in an attempt to be helpful!

Firefox and Chrome take slightly different approaches to normalising the text before shaping it with the font, while Prince currently does not perform any normalisation, so whatever text you have provided will be shaped with the selected font.
pieter.lamers
Thanks Mike. I've converted all problematic combinations from your second form to the first and that version is stacking correctly. It does mean that I have to use a dotless i instead of a regular i. But I guess I would need to complain with Adobe here, or fix the font myself.
mikeday
I forgot to mention that you could use the prince-text-replace property for this conversion if it isn't too unwieldy, or JavaScript would also be an option. Unfortunately there is still some variation between fonts that makes it difficult to automatically get the optimal output in every case, but in the future Prince will probably do some level of Unicode normalisation automatically.