2

I've noticed that in Chrome (and also Word), certain combining diacritics display to the right of the character they apply to instead of covering it or being on top of/below it. For example on this page, for me all of the symbols are to the right of the letter 'o' when they should be horizontally centered on the 'o'.

If you look at the official Unicode chart for this block, it's clear that this is the wrong behavior. So why does Chrome display them incorrectly when it displays other diacritics correctly?

1 Answer 1

6

There are three main reasons why diacritics specified using combining marks may be misplaced:

  1. Some programs, such as old versions of Word, do not implement diacritic marks properly. They should place the marks in a manner that pays attention to the metrics of the base character, e.g. a diacritic above “A” should appear higher than the same diacritic above “a”, but some programs simplistically just superimpose a diacritic glyph over the base character glyph.
  2. If the base character and the combining diacritic marks are from different fonts, they often fail to fit. This typically causes minor displacements. For example, if you open Word, set font to Times New Roman, type a letter, then the U+20D0 COMBINING LEFT HARPOON ABOVE character (e.g. by entering 20d0 AltX), you get the diacritic in another font, because Times New Roman (like most fonts) hasn’t got it.
  3. Some combining diacritic marks are incorrectly implemented in fonts. This is the case e.g. for U+20D0 in surprisingly many fonts, including Arial Unicode MS, which is probably where your browser takes it from.

Many of the diacritic marks appearing in the page mentioned have incorrect implementations. For example, U+20D0 in Arial Unicode is defined in font metrics (in the font file itself) so that it has considerable advance width, as opposite to zero as diacritics should normally have. In effect, it has been implemented as if it were a normal spacing character. This also applies to Asana Math, Cambria Math, and Sun Ext-A, so either font implementors copied each other’s mistakes or this mistake is based on some shared misunderstanding of the identity of the character. It may also be intentional design, see below.

So what can you do? In a word processor or in a publishing program, select a suitable font. This may affect your choice of the basic font, since normally diacritic marks should be taken from the same font as the base characters. Suitable choices seem to be DejaVu Sans, GNU Freefont fonts, Latin Modern Math, STIX, Symbola, XITS. However, the choices may be further restricted: the harpoon diacritics are normally used in mathematical notations, and mathematical expressions should usually be presented using a serif font. On a web page, you can write a list of alternative fonts in a font-family declaration, using just acceptable fonts, but then the problem is that most users won’t have any of them in their systems, so you might end up with using a suitable free font as a downloadable font (web font).

As a user, you can change your browser’s default font settings so that the selected font contains the characters needed. This may have serious implications, since it affects all text for which pages do not set font. Moreover, no single font can meet all the needs, so you might need to change the setting according to the type of pages you are viewing. When I set the default font to STIX, the sample page looks OK to me for the combining harpoons, but not to all other diacritics there.

There’s something else you can do when using Word 2007 or newer. Using the powerful Equation Tools (poorly documented, but see my e-book Writing Mathematical Expressions), you can construct an expression with a base character and a diacritic placed above it much like you can use exponents, fractions, integrals etc. in two-dimensional mathematical notation. The following screenshot shows first an o with harpoon in Cambria Math in italic (actually “fake italic”), then the same constructed using Equation Tools, where the same font is used!

enter image description here

The point here is that Equation Tools take care of positioning characters. It does not hurt then that the harpoon is a spacing character; it’s then better that it is. In fact, it is possible that some fonts intentionally implement it that way so that it works in contexts like this.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .