Should all-cap tonos suppression be supported in OpenType?

Gerry Leonidas's page says tonos needs to be suppressed in all-cap setting.
http://leonidas.org/greek-type-design/case-conversion-for-monotonic-greek/

While this itself is not new to me, I haven't actually supported this as an OpenType feature nor have I seen other typeface that supports it. If one needs to, there should be a code in "case" feature and "calt", where you check whether tonos-cap letters precede or follow another capital letter and substitute with tones-less alternates.

Is it necessary to include tones-less alternates, or support at OT level at all? If not, what is the reason?

Comments

  • I do this in all my Greek fonts

    Oh, what an obvious oversight!

    Regarding dieresis insertion, is it something that always happens (i.e. does it not require dictionary to reliably execute)? Also in SBL Greek, the classes that are used for iota dieresis insertion and upsilon one have different set of glyphs. Just by looking at the difference, there seem to be combinations that do not occur or ones whose dieresis insertion should not happen. Is it safe to use the same class for both?

  • Nick Shinn
    Nick Shinn Posts: 2,216
    edited March 2016
    I’ve done this in my Greek fonts too, and for small caps. There was quite a bit of discussion about it in Typophile Build, around 2007.
  • John Hudson
    John Hudson Posts: 3,229
    Also in SBL Greek, the classes that are used for iota dieresis insertion and upsilon one have different set of glyphs. Just by looking at the difference, there seem to be combinations that do not occur or ones whose dieresis insertion should not happen. Is it safe to use the same class for both?

    I do know that there are different diphthongs with iota and upsilon, hence the different context sets. I can't recall if there is an actual risk with using a superset of contexts for both — it's been a while —, but I obviously decided against it in my implementation.
  • Nick,
    Thanks Nick, it's sad Typophile archive cannot be viewed now, if not forever.

    John,
    In SBL Greek, the preceding glyphs that alter Ι to Ϊ are [Ά Έ Ό Ύ] and those that do it to Υ are [Ά Έ Ή Ό Ώ] (to simplify the matter, I only discuss Monotonic. The same vowel difference is present in Polytonic too). In other words, [Ή Ώ] are not considered as Ϊ trigger and [Ύ] isn't a Ϋ trigger. But in my search through a dictionary, pairs like ήι do exist (e.g. Απουλήιος) and they seem to be deliberately not supported. On the other hand, the pair ύυ do not seem to occur and omission of Ύ from Ϋ trigger doesn't seem to change much. At least in Monotonic which is almost 100% of what I do in Greek, it seems fine to use a single set that contains all vowels. How do you think?
  • John Hudson
    John Hudson Posts: 3,229
    But in my search through a dictionary, pairs like ήι do exist (e.g. Απουλήιος) and they seem to be deliberately not supported.

    As far as I recall, ηι is not a diphthong, so there is no need to distinguish the pronunciation by adding the dialytika in all caps because the two letters are always pronounced distinctly.
  • Thanks John. How about the other one ώι that's also unaffected? Several words popped up in my search (e.g. ανώι ηρώισσα κατώι πρώιμα).
  • Additional question that's off the topic: In usual Greek keyboard (certainly in Mac) you cannot type ano teleia. Would it make sense to substitute periodcentered after a word with it?
  • John Hudson
    John Hudson Posts: 3,229
    Thanks John. How about the other one ώι that's also unaffected? Several words popped up in my search (e.g. ανώι ηρώισσα κατώι πρώιμα).

    Again, my recollection is that omega+iota is not a diphthong.

  • John Hudson
    John Hudson Posts: 3,229
    Additional question that's off the topic: In usual Greek keyboard (certainly in Mac) you cannot type ano teleia. Would it make sense to substitute periodcentered after a word with it?

    U+00B7 is frequently used as encoding of ano teleia, but the /periodcentered/ glyph is usually sitting too low for ano teleia, which should align with the top dot of ; and :. So it's helpful to have a Greek <locl> substitution to map U+00B7 to the /anoteleia/ glyph.
  • Again, my recollection is that omega+iota is not a diphthong.
    Thanks for the confirmation. I tried InDesign's all-cap conversion to ώι, and as you said, the dieresis is not added.
    U+00B7 is frequently used as encoding of ano teleia, but the /periodcentered/ glyph is usually sitting too low for ano teleia, which should align with the top dot of ; and :. So it's helpful to have a Greek <locl> substitution to map U+00B7 to the /anoteleia/ glyph.
    Thanks again. I guess it could potentially be substituted to ano teleia against the user's explicit will to use periodcentered, but hopefully the benefit will outweigh the problem.
  • John Hudson
    John Hudson Posts: 3,229
    Yes. I think Gerry has quite sufficiently illustrated the proper appearance of ano teleia, which is higher than that of /periodcentered/.
  • Kent Lew
    Kent Lew Posts: 944
    In usual Greek keyboard (certainly in Mac) you cannot type ano teleia.
    FWIW, the Greek Polytonic keyboard on Mac does input the U+0387 anoteleia codepoint (shift-opt-`).

    But, yes, not the Mac basic Greek keyboard, which only provides U+00B7 periodcentered (opt-q) for ano teleia.
  • Regarding διαλυτικά (dieresis), the general rule is that they occur only for these pairs (and only on the second vowel which is either ι either υ): αι, ει, οι, υι, αυ, ευ, ου

    Ιt occurs when you want to distinguish the two vowels and pronounce them separately. 

    If the word is written in lowercase, and switch to uppercase is fairly easy, since it would be one of these possibilities:

    - The pair is as is (no dieresis or tonos) or the pair has a tonos on the second vowel. In this case you need no dieresis on uppercase.

    i.e. ευχή > ΕΥΧΗ, ποίηση > ΠΟΙΗΣΗ

    - The pair has dieresis, or dieresis-tonos. In this case, only dieresis is needed for the uppercase. 

    i.e. εξαΰλωση > ΕΞΑΫΛΩΣΗ, μυϊκό > ΜΥΪΚΟ

    - The pair has a tonos on the first letter (that means you do not need a dieresis for lowercase) however you need one for uppercase, since tonos will not appear and you should distinguish the two vowels.

    i.e.νεράιδα > ΝΕΡΑΪΔΑ


    I hope this helps.


  • Hi Emilios,
    Regarding dieresis insertion, it seems that there are more (my list below might include Polytonic ones). Could you confirm these are fine to happen automatically?

    άι έι όι ύι become ΑΪ ΕΪ ΟΪ ΥΪ in all-cap
    άυ έυ ήυ όυ ώυ become ΑΫ ΕΫ ΗΫ ΟΫ ΩΫ in all-cap
  • Hello Toshi,

    All the pairs you mention (except ηυ and ωυ) belong to the third category (from the ones I mentioned before) since the tonos is on the first letter, so in all-caps you should have dieresis.

    Now, the pairs ηυ and ωυ (in monotonic Greek, can’t help for polytonic, but I can ask), do not need dieresis, since there is no confusion for the pair – they are not diphthongs.

    To sum up: the only pairs that are considered diphthongs and might need dieresis (in monotonic Greek) are these: αι, ει, οι, υι, αυ, ευ, ου.

  • Nick Shinn
    Nick Shinn Posts: 2,216
    edited March 2016
    Here is the code I used for <calt>.
    Nothing in <case>
    The <smcp> code is slightly more complex, to deal with “titlecase”.

    feature calt { 
    
    lookup ONE {
    sub [Alphatonos Epsilontonos Omicrontonos Omegatonos] Iota' by Iota.alt;  
    sub [Alphatonos Epsilontonos Omicrontonos Omegatonos] Upsilon' by Upsilon.alt;
    } ONE;
    
    lookup TWO {
    sub @UCtonos' @GrCaps by @UCnotonos; 
    sub [@GrCaps Iotadieresis] @UCtonos' by @UCnotonos;
    	sub @GrCaps iotadieresistonos' @GrCaps by Iotadieresis;
    	sub @GrCaps upsilondieresistonos' @GrCaps by Upsilondieresis;
    } TWO;
    
    } calt;

    @GrCaps is all greek capitals.
    @UCtonos is the capitals which have tonos
    @UCnotonos is those same capitals without the tonos

    Iota.alt and Upsilon.alt are identical glyphs to Iotadieresis and Upsilondieresis.
    In retrospect, it would have made more sense to name them Iotadieresis.alt and Upsilondieresis.alt, but I don’t always do things the most logical way. This seems to work OK, though.




  • Kent Lew
    Kent Lew Posts: 944
    Revisiting this topic:

    I was thinking about cap-tonos suppression again, and noting all of the different complex attempts to anticipate contexts, especially for single-word cap-tonos situations. In Brill, John uses two caps when looking over a space to be sure that a cap tonos is in an all-caps context. Toshi, in his suggested code over on the Glyphs forum, uses a number of nonletter lookahead and backtrack sequences to attempt the same.

    I was then also thinking about Gerry’s description of the complexities of Greek case-conversion — in particular, his framing of three “cases.”

    Following on this latter, it seems that the cap tonos is really only displayed in the Initial-case situation.

    So, would it make sense to approach the cap-tonos suppression lookup in the following way?:
    lookup tonosSuppression {
    ignore sub @capTonos' @grkLc;
    sub @capTonos' by @capTonosSuppress;
    } tonosSuppression;

    Is this simplification robust and comprehensive enough?

  • John Hudson
    John Hudson Posts: 3,229
    Practically, that's probably pretty good Kent, but it would fail if title-casing were applied in such a way that a single-letter word such as ή (or) were capitalised. That's not good editorial practice, but is the sort of thing that software title-casing functions will do.

    e.g. Καλό Ή Το Κακό

    I think your proposed code would result in

    Καλό Η Το Κακό
  • Kent Lew
    Kent Lew Posts: 944
    Yes, you’re right. That situation would yield as you show, which I guess is a failure.

    So, that case must be why you look ahead to two caps after the space. Thanks for the example.
  • Kent Lew
    Kent Lew Posts: 944
    Revisiting the related situation of tonos suppression for cap dieresistonos.

    As has been noted, iotadieresistonos and upsilondieresistonos do not have conventional case-mapping to corresponding capital codepoints. In an all-caps setting, the tonos element should be suppressed and the displayed form equivalent to Iotadieresis and Upsilondieresis.

    I have encountered three kinds of case-transformation behavior in different environments:

    1) Intelligent app handling — InDesign, Illustrator, and Firefox, for example, display with these dieresistonos characters the tonos suppressed when capitalized.

    2) Special Casing — Following the Unicode Special Casing rules, apps like Safari and TextWrangler transform these two lowercase into decomposed capitalized sequences, i.e. Iota/Upsilon dieresiscmb acutecmb.

    3) No capitalization — Word for Mac 2011 and Pages, for example, simply do not perform any case transformation for these characters (leaving them mixed lowercase in all-caps).

    As with all case transformation, it is not clear whether any of this is the proper province of the font and the font engineer. But, we’ve been talking here about some tonos suppression, so . . .

    Case 1 needs no intervention.

    Does it make sense to include a couple rules in {ccmp} for Case 2? e.g.:
    feature ccmp {
    sub Iota dieresiscmb acutecmb by Iotadieresis;
    sub Upsilon dieresiscmb acutecmb by Upsilondieresis;
    } ccmp;

    Does it even make any sense to try to address Case 3?

    John, I noticed that in Sitka, you include these lowercase characters in your tonos-suppression target class. One side-effect of those routines, however, is that if the lowercase dieresistonos is the second character in a title-case word, then you get two capital letters beginning an otherwise mixed-case word, e.g. Αΐδας -> ΑΪδας (made-up example, probably not a word).

    Is this just an oversight, or are there no [monotonic] Greek words that begin with one of the relevant pairs of vowels where both are to be pronounced and the second is stressed, so it’s a non-issue?

    Are there words that end in this way, such that a context of caps both before and after would not be sufficient to catch the dieresistonos? e.g. Αλταΐ -> ΑΛΤΑΐ (again, completely made-up example).

    Do we just give up on Case 3 and blame the app?