Interesting kerning behavior in macOS applications

Just did proof kerning and accidentally typed a Cyrillic letter in a Latin context. I was suprised and found out that kerning don't work between different scripts in some applications on macOS. Looks like macOS text shaping engine (?) splits text into blocks between scripts, and these blocks do not interact with each other.

TextEdit, Safari, Firefox, Chrome show the same result as in the image below, and just Adobe applications applied kerning as expected in all three cases. The font on the image shared classes between Latin and Cyrillic characters with the same shape.

Testers call this a negative scenario testing that is, something that the user most likely won't do, and in a normal situation, the user will not mix different scripts within the same word. But I would be glad if someone could shed some light on whether this is considered normal behavior of the text engine, and what are the cases where different scripts can be mixed in one word?

Comments

  • Text is split into runs before shaping, and one such run boundary is in between different scripts. Adobe’s apps do some additional processing (e.g. “optical” kerning) which also works across scripts.

    See this previous topic for details: https://typedrawers.com/discussion/comment/24606
  • @Florian Pircher thank you for the link, Bahman explain it very clearly.
  • John HudsonJohn Hudson Posts: 2,955
    what are the cases where different scripts can be mixed in one word?
    There are a few real world cases, mostly involving historical orthographies not in current use. Some of the Latin alphabets introduced for Turkic languages in the Soviet Union in the 1920s (and shortly thereafter replaced by Cyrillic ones) used a letter that looks like Cyrillic ь. Since Unicode has not encoded this letter with the property script=Latin, and looks unlikely to so do, the recommendation for transcribing any documents in that shortlived orthography is to use the Cyrillic character. And yes, this means that glyph processing runs will break on either side of that character, and no kerning or other OTL interaction between that Cyrillic character and adjacent Latin characters will be possible.
  • Thanks @John Hudson
    Since Unicode has not encoded this letter with the property script=Latin, and looks unlikely to so do, the recommendation for transcribing any documents in that shortlived orthography is to use the Cyrillic character.
    It looks like the practice of using the hyphen instead of the minus.

    One more example is not a typographic but it is from a social media where people use characters from other script to hide some words from robots/filters. For example, Ukrainian word кoмaxа – I replaced here the Cyrillic letters o, a and x with Latin ones. Even though the word looks the same visually, but the robots cannot read it.
    It's pretty close to the Leet slang where some letters are replaced by numbers or punctuation: m4d, sk1llz, r00t, 4n07h3r (this is just example out of topic because numbers and punctuation are usually shared with different scripts).
    But again, these cases are pretty rare and I don't think that designers will do it seriously.
  • Mark SimonsonMark Simonson Posts: 1,652
    edited August 2022
    I don't think Adobe apps are doing it with optical kerning. I tested "Ta Tа Та" (middle pair mixes Latin and Cyrillic) in TextEdit, InDesign (kerning set to "metrics") and FontGoggles with my Proxima Nova, which mixes both Latin and Cyrillic characters in its kerning classes, so they may kern together in any combination. And they do in both Adobe apps and FontGoggles. But not in TextEdit. I think this is because of differences how OT layout is handled in the shaping engine, and each of these uses a different one.
  • You're comparing apples and oranges. FontGoggles is not a text layout engine, and does not perform run segmentation like a text layout engine would; it just passes the string wholesale to the shaping engine, which takes the first non-generic character in the string and uses that as the script for the whole run.

    Amongst layout engines, Adobe is the outlier.

  • Nick ShinnNick Shinn Posts: 2,131

  • Khaled HosnyKhaled Hosny Posts: 289
    edited November 2022
    You're comparing apples and oranges. FontGoggles is not a text layout engine, and does not perform run segmentation like a text layout engine would; it just passes the string wholesale to the shaping engine, which takes the first non-generic character in the string and uses that as the script for the whole run.

    FontGoggles does in fact do both bidi and script segmentation, and it has options to skip segmentation but it is not the default (unless one is using a very early version that didn’t do this).
  • Nick ShinnNick Shinn Posts: 2,131
    Sorry, I just noticed that my Euphoria post was made in the wrong thread!
    (It was about non-Latin characters appearing in latin script.)
Sign In or Register to comment.