12

"EB Garamond" font combines ʿ character and the preceding letter. Consider following document:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{EB Garamond}
\begin{document}

   aʿ bʿ cʿ dʿ eʿ fʿ gʿ hʿ iʿ jʿ kʿ lʿ mʿ nʿ oʿ pʿ qʿ rʿ sʿ tʿ uʿ vʿ wʿ xʿ yʿ zʿ

\end{document}

enter image description here

How can I prevent combing ʿ (MODIFIER LETTER LEFT HALF RING) and the preceding letter? (In above images, only b,d,i,j are rendered correct.)

Update After testing more than thirty, this is the only font has this issue. Unfortunately this is only suitable form for a paper that contains a lot of Unicode glyphs. ◕︵◕

Real Dreams
  • 8,298
  • 12
  • 56
  • 78
  • do you mean globally with a fontspec setting (I can't help with that) or locally a\kern0ptʿ would work/ – David Carlisle Apr 11 '13 at 11:13
  • 1
    The character ʿ is U+02BF "MODIFIER LETTER LEFT HALF RING" so that's the expected behavior if the font has the information for modifying the preceding letter. – egreg Apr 11 '13 at 11:56
  • @egreg It is not COMBINING LEFT HALF RING ABOVE – Real Dreams Apr 11 '13 at 14:37
  • @PHPst My impression is that "combining" means that the combination is equivalent to a unique code point (U+00E1 decomposes as U+0061 U+0301), while "modifier" doesn't correspond to a code point. There is no "latin small letter a with left half ring above" in Unicode. – egreg Apr 11 '13 at 16:32
  • 2
    @egreg MODIFIER LETTERs are not intended to combines with other characters, they are intended to modify pronunciation of other letter. Perhaps there is some thing wrong with the font, it's in Alpha phase. – Real Dreams Apr 11 '13 at 17:05
  • @DavidCarlisle Thanks, I was looking for a global solution, but your code can solve the issue for my current file. – Real Dreams Apr 11 '13 at 17:33
  • First and foremost this would be a bug in the font, so I’d first try to report it to the author :) – خالد حسني Apr 11 '13 at 19:18
  • @egreg this is a common misunderstanding even among font designers. The naming choice is not very lucky referring to a special use of the 'modifiers'. You can compare their use in linguistics to sub- and superscripts used as indices etc. in maths. They can even stand alone like U+02BF in transcriptions for arabic ʿayn. – georgd Apr 13 '13 at 12:07

4 Answers4

9

I’m sorry, this was an oversight and has been fixed in v0.015b which I just uploaded to https://bitbucket.org/georgd/eb-garamond/downloads

georgd
  • 888
  • Please make sure to remove the old font. TeXLive ships v0.015 otf files in fonts/opentype/public/ebgaramond – georgd Apr 12 '13 at 07:52
  • BTW do you plan to add a bold face font to the package too? Thanks – Real Dreams Apr 12 '13 at 08:29
  • The anchor isn’t there any longer in EBG12-Re, so if you still see this behaviour the old file must be somewhere (cached?). I still have to remove the anchor from the italic font (where it has to be redesigned also).

    I plan to begin work on bold fonts later this year.

    – georgd Apr 12 '13 at 08:45
  • Oh, The issue is that LaTeX do not let choose font that their name contain digits. \setmainfont{EB Garamond 12} Why you append 08 and 12 to font's name? – Real Dreams Apr 12 '13 at 09:06
  • 3
    The number tells you about the design-size. Fontspec will choose automatically the correct font according to the font-size (i.e. below 10pt it will use EBG08). In your case this is not appropriate, because EBG08 doesn’t contain the modifying glyphs yet. You can either say \setmainfont{EB Garamond 12 Regular} or better \setmainfont[OpticalSize=12]{EB Garamond} – georgd Apr 12 '13 at 10:25
7

As a perhaps temporary local fix in cases where it is needed you can put a kern before the character to hide it from the preceding letter.

  a\kern0ptʿ

would not combine.

David Carlisle
  • 757,742
7

A XeTeX only “solution” would be the use of map files, create a file half-ring.map that tells XeTeX to insert a hair space before any modifier half ring in typesets:

LHSName "Modifier Half Ring"
RHSName "UNICODE"
pass(Unicode)

U+02BF <> U+200A U+02BF;

Then compile it with teckit_compile (should be included with TeX Live), and modify your font command to be \setmainfont[Mapping=half-ring]{EB Garamond}.

Note that XeTeX currently can only apply one mapping file per font, so if you use other mapping files (or Ligature=TeX font option), you will have to replicate that mapping in the above file.

5

If you’re ok with switching tu LuaLaTeX, Mico’s upcoming selnolig package (on GitHub) is your friend. It is actually intended to globally avoid unintended ligatures, but can be used for this as well. It won’t change anything else if you load it without a language option:

\documentclass{article}
\usepackage{fontspec}
    \setmainfont{EB Garamond}

\usepackage{selnolig}
    \nolig{ʿ}{|ʿ}
\begin{document}

   aʿ bʿ cʿ dʿ eʿ fʿ gʿ hʿ iʿ jʿ kʿ lʿ mʿ nʿ oʿ pʿ qʿ rʿ sʿ tʿ uʿ vʿ wʿ xʿ yʿ zʿ

\end{document}

output

For some more background on selnolig, have a look at New package, selnolig, that automates suppression of typographic ligatures.

Looking at the problem from a different angle: I don’t know anything about this specific Unicode character, but if EB Garamond really does something wrong here and it is the only font doing so, you should file a bug report at its development site.

doncherry
  • 54,637