2

The question I pose in this post concerns the correspondence between the .otf features and the settings of the LaTeX code. Because, in reality, I seem to find that this parallelism is imperfect.

(Lua)LaTeX with Fontspec and Babel allows you to choose among several options: 1) monotonic modern Greek, 2) polytonic modern Greek, 3) ancient (polytonic) greek. In fact we know that polytonic Greek is not ancient Greek. In this case the code I can use is the following:

\usepackage[italian]{babel}
\babelprovide[import]{ancientgreek}
\babelprovide[import]{polytonicgreek}
\babelprovide[import]{greek}

But I should set up appropriate scripts in the font. Now, also by consulting for example this list: https://docs.microsoft.com/en-us/typography/opentype/spec/languagetags I can't find specific tags related to ancient Greek. Infact the OTL language system tags for Greek are only:

Greek   'ELL'
Polytonic Greek 'PGR'

Now, I can match the ELL tag to modern monotonic Greek and the tag PGR to modern polytonic Greek.

Actually, I can also use PRG and polytonicgreek to write diacritics correctly for ancient Greek, but at this point I have to give up the correct hyphenation patterns.

What I am asking is if there is a way or a trick to properly generate the parallelism between the otf characteristics and the Latex settings for ancient Greek.

Thank you

PostScriptum

The problem becomes typographically evident in those fonts (from Adobe Garamond Premiere Pro to EBGaramond) which have slightly different (obviously acute) accents for monotonic and polytonic.

The monotonic uses its accents correctly because there is a match between the .otf tags and the LaTeX code.

The polytonic, in the same way, correctly uses its accents because there is again a correspondence between the .otf tags and the LaTeX code.

Ancient Greek instead mixes the accents, because it takes the grave accents obviously from the polytonic, but the acute ones from the monotonic and this generates a typographic inhomogeneity.

An imperfect solution is to always use polytonicgreek and never ancientgreek: thus the accents are homogeneous even for ancient Greek, but in this way the hyphenation patterns are loaded for modern Greek and not for ancient Greek.

\documentclass{article}
\usepackage{fontspec}
\usepackage[italian]{babel}
\babelprovide[import]{ancientgreek}
\babelprovide[import]{polytonicgreek}
\babelprovide[import]{greek}
\babelfont[ancientgreek]{rm}{SimonciniGaramondPro}
\babelfont[polytonicgreek]{rm}{SimonciniGaramondPro}
\babelfont[greek]{rm}{SimonciniGaramondPro}

\begin{document}

\selectlanguage{ancientgreek}

Ancient Greek

ὰ ὲ ὴ ὶ ὸ ὺ ὼ

ά έ ή ί ό ύ ώ

\selectlanguage{polytonicgreek}

Polytonic Greek

ὰ ὲ ὴ ὶ ὸ ὺ ὼ

ά έ ή ί ό ύ ώ

\selectlanguage{greek}

(Monotonic) Greek

ά έ ή ί ό ύ ώ

\end{document}

enter image description here

5
  • 1
    Your question is unclear. What does “I have to give up the correct hyphenation patterns” exactly mean. In a quick test the hyphenation rules are correctly selected in my system. Please, edit your question and add a M(non)WE. Commented May 17, 2020 at 15:02
  • Just edited with the addition of the code and an image
    – user41063
    Commented May 17, 2020 at 15:52
  • I see. Before posting an answer I'd like to make some tests. Do you know of any other font with different accents? I've only got the Std version of SimonciniGaramond (without Greek). Commented May 17, 2020 at 16:36
  • Some fonts into Adobe FontFolio 11.1 as Minion Pro. I am looking forward to further checks
    – user41063
    Commented May 17, 2020 at 17:08
  • In the FreeSerif too, which, as EBGaramond, is a free font
    – user41063
    Commented May 17, 2020 at 17:54

1 Answer 1

4

Fontspec doesn't have special support for handling the "OpenType language" "Ancient Greek" which babel tries to use here, so it falls back to the default language. Instead you can tell babel to use "Polytonic Greek" as fontspec Language specifier by using the language= babel option when loading the language:

(The example code is a bit more complicated because I don't have a good testfont, so the test is using the construction from Tags for polytonic Greek with babel instead)

\documentclass{article}
% Emulate some font supporting polytonic greek as in https://tex.stackexchange.com/questions/542882/tags-for-polytonic-greek-with-babel
\directlua {
fonts.handlers.otf.addfeature{
  name = "tonosoxia",
  features = {grek = {pgr = true}}, 
  type = "substitution",
  data = {
    Alphatonos = 0x1FBB,
    Epsilontonos = 0x1FC9,
    Etatonos = 0x1FCB,
    Iotatonos = 0x1FDB,
    Omicrontonos = 0x1FF9,
    Omegatonos = 0x1FFB,
    Upsilontonos = 0x1FEB,
    alphatonos = 0x1F71,
    epsilontonos = 0x1F73,
    etatonos = 0x1F75,
    iotatonos = 0x1F77,
    iotadieresistonos = 0x1FD3,
    omicrontonos = 0x1F79,
    omegatonos = 0x1F7D,
    upsilontonos = 0x1F7B,
    upsilondieresistonos = 0x1FE3,
  },
}
}

\usepackage{fontspec}
\usepackage[italian]{babel}
\babelprovide[import]{polytonicgreek}
\babelprovide[import,language=Polytonic Greek]{ancientgreek}% <--- !!! This is the important line
\babelprovide[import]{greek}
\babelfont[polytonicgreek]{rm}[RawFeature=tonosoxia]{EB Garamond}
\babelfont[ancientgreek]{rm}[RawFeature=tonosoxia]{EB Garamond}
\babelfont[greek]{rm}[RawFeature=tonosoxia]{EB Garamond}

\begin{document}

\selectlanguage{polytonicgreek}

Polytonic Greek

ὰ ὲ ὴ ὶ ὸ ὺ ὼ

ά έ ή ί ό ύ ώ

\selectlanguage{ancientgreek}

Ancient Greek

ὰ ὲ ὴ ὶ ὸ ὺ ὼ

ά έ ή ί ό ύ ώ

\selectlanguage{greek}

(Monotonic) Greek

ά έ ή ί ό ύ ώ

\end{document}

enter image description here

6
  • Let me please make further tests, but at the first one it seems to work!
    – user41063
    Commented May 17, 2020 at 17:16
  • 1
    Well, this was the solution I was thinking of 🙂. Commented May 17, 2020 at 17:29
  • Infact now in the log file I read (extract): UTF-8 Hyphenation patterns for uni-accent (monotonic) Modern Greek UTF-8 Hyphenation patterns for Ancient Greek UTF-8 Hyphenation patterns for multi-accent (polytonic) Modern Greek
    – user41063
    Commented May 17, 2020 at 17:56
  • You write: Fontspec doesn't have special support for handling the "OpenType language" "Ancient Greek" which babel tries to use here. Does it make sense to hope for coordination between fontspec and babel? In any case, thank you for your help
    – user41063
    Commented May 17, 2020 at 18:01
  • 1
    @JavierBezos I don't know anything about greek, but I get the impression that it might make sense to make this the default behavior for ancientgreek in babel. Commented May 17, 2020 at 18:02

You must log in to answer this question.

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