Arabic accents and space bug in Safari

Salam and Hi,

This bug shows in Safari in all my arabic fonts made with Glyphs, and shows in other arabic fonts even from professional foundries (even on fonts made with FontLab), when accents on the last letter of a word eats the space between that word and the next word… it is all over the place but some fonts got it solved somehow…

Why is it happening and what’s the right way to solve it?

Another bug: I am substituting space by space.001 for a narrower space between arabic words (sub @arabic space’ @arabic by space.001) and it is not working in safari but working in Chrome… any idea why?

Both bugs are showing in the screenshots in Safari but not showing in Chrome.

Safari:

Chrome:

Not all engines allow substituting the space, because it is not necessarily inserted as a glyph. So OT features cannot access it in this case. I am afraid text rendering in Safari is one of these cases.

What Rainer says. Some engines use its own space, completely disregarding the space inside the fonts. It is therefore recommended to AVOID using space in OpenType context.

@mekkablue @Tosche
OK forget the space now (I can kern with space instead), what about the other bug! Accents on end of words eats the space between the word and the next word like the safari picture, the first two words in the second line…

I tried what i can think of, putting 0 LSP + 0 width + negative RSP on marks, didn’t work, putting negative LSP + 0 width + 0 RSP on marks, also didn’t work… It is a Safari problem probably but many arabic fonts did overcome or workaround this problem, and many didn’t probably because the designer didn’t test in Safari.

Can you send me a font that works and your font?

@GeorgSeifert Sent

@GeorgSeifert @Tosche @mekkablue

As a matter of fact, this (accents removes space) bug is affecting probably every arabic font made with Glyphs in Safari, here is a shot of the famous Cairo font (made in Glyphs) in Safari 9.1 with the same bug:

But as i said earlier, some fonts did manage to solve it and are perfect in Safari.

الحمد لله!

@GeorgSeifert
Solved, Contacted Abdulsamee Salam (@abdofonts) who got it solved few years ago (in my AbdoMaster font) and he provided this work-around:

1- Substitute every mark with itself + an empty zero-width glyph (that is also set to be a Mark) like:
sub fatha-ar by fatha-ar ghosty-ar;
#do it for all accents, a line per each


2- Make sure that IgnoreMarks flag does NOT apply on the above code.

Working perfectly, الحمد لله

Thanks for the code.

The spacing problem is only a problem in Safari 9, it is fixed in Safari 11. (not sure about version 10).

Not Safari 9 only, but every version of Safari since 2010 when Arabic web fonts were supported… including iOS Safari… Even until now it is affecting a very large user base…

I didn’t mean to brush off the bug. Was just for information that one needs to test in an old enough version.