# GFS Didot's Type1 italic word-initial theta (θ→ϑ) is missing

## Update 2

I contacted the maintainer about this issue, who was quick to respond with a fix. It should be in CTAN shortly.

## Original question 0

The Type1 version of GFS Didot has a feature that turns theta (θ) into the script variant (ϑ) when it occurs at the beginning of a word. This does not work for normal weight italic. By default, udidot uses another font, GFS Olga, for normal italics, which always uses the script variant that in addition looks quite different.

A similar question uses a workaround which works well for all other styles, but for m/it nothing shows up at all, which is very suspicious.

The OpenType version from the same package can display both versions for all weights and shapes, so the questions are:

• why does the OpenType version not do this automatically? (in the MWE script versions are hard-coded)

• why is whatever mechanism the Type1 version uses to determine word-initial form – which seems to be hard-coded into the font itself – not applying for m/it? Could the font itself be malformed? (and would that be reasonably fixable?)

## LuaLaTeX / OpenType :

\documentclass{article}
\usepackage{fontspec}
\setmainfont    [ItalicFont={GFS Didot Italic},
BoldFont={GFS Didot Bold},
BoldItalicFont={GFS Didot BoldItalic},
]{GFS Didot}
\usepackage{polyglossia}
\setmainlanguage{greek}

\begin{document}

{ϑθ} \textit{ϑθ} \textbf{ϑθ} \textbf{\textit{ϑθ}}

\end{document}


## pdfLaTeX / Type1 :

\documentclass{article}

\usepackage[T1,LGR]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[greek]{babel}

\usepackage{microtype}
\DisableLigatures{}

\DeclareFontFamily{LGR}{udidot-no-olga}{}
\DeclareFontShape{LGR}{udidot-no-olga}{m}{n}  {<-> gdidotrg6a}{}
\DeclareFontShape{LGR}{udidot-no-olga}{m}{it} {<-> gdidoti6a}{}
\DeclareFontShape{LGR}{udidot-no-olga}{bx}{n} {<-> gdidotb6a}{}
\DeclareFontShape{LGR}{udidot-no-olga}{bx}{it}{<-> gdidotbi6a}{}

\catcode\^^L=11

\renewcommand*{\rmdefault}{udidot-no-olga}

\begin{document}

{\texttheta\texttheta}
\textit{\texttheta\texttheta}
\textbf{\texttheta\texttheta}
\textit{\textbf{\texttheta\texttheta}}

{θθ} \textit{θθ} \textbf{θθ} \textit{\textbf{θθ}}

{^^L^^L} \textit{^^L^^L} \textbf{^^L^^L} \textit{\textbf{^^L^^L}}

{\fontencoding{T1}\selectfont fi ffi fl ffl}

\end{document}


## Update 1 about math fonts

In an attempt to avoid ligature problems causing wrong/no symbols I used the raw glyph numbers in math fonts, which does not show the script theta for m/it either. Does this mean that the glyph is simply missing from the font?

\documentclass{article}
\usepackage[LGR]{fontenc}

\DeclareFontFamily{LGR}{udidot-no-olga}{}
\DeclareFontShape {LGR}{udidot-no-olga}{m}{n}  {<-> gdidotrg6a}{}
\DeclareFontShape {LGR}{udidot-no-olga}{m}{it} {<-> gdidoti6a}{}
\DeclareFontShape {LGR}{udidot-no-olga}{b}{n}  {<-> gdidotb6a}{}
\DeclareFontShape {LGR}{udidot-no-olga}{b}{it} {<-> gdidotbi6a}{}

\DeclareMathVersion{upright}
\DeclareMathVersion{boldupright}

\DeclareSymbolFont{greekmath}             {LGR}{udidot-no-olga}{m}{it}
\SetSymbolFont    {greekmath}{bold}       {LGR}{udidot-no-olga}{b}{it}
\SetSymbolFont    {greekmath}{upright}    {LGR}{udidot-no-olga}{m}{n}
\SetSymbolFont    {greekmath}{boldupright}{LGR}{udidot-no-olga}{b}{n}

\DeclareMathSymbol{\theta}{\mathord}{greekmath}{"6A}
\DeclareMathSymbol{\vartheta}{\mathord}{greekmath}{"0C}

\begin{document}
\mathversion{upright}$$\theta - \vartheta$$
\mathversion{normal}$$\theta - \vartheta$$
\mathversion{boldupright}$$\theta - \vartheta$$
\mathversion{bold}$$\theta - \vartheta$$
\end{document}

• The OpenType GFS Didot font has no init feature. Nov 19 '17 at 17:27

To begin with, the OpenType version of GFS Didot has no init (word initial contextual) feature, so getting the variant theta at the beginning of the word is not supported.

For the Type 1 fonts, the key is in the TFM files. With

tftopl gdidotrg6a.tfm


we get

(BOUNDARYCHAR O 1)
(LIGTABLE
(LABEL BOUNDARYCHAR)
(LIG C j O 14)
(STOP)
(LABEL O 0)
(/LIG C j O 14)
(LIG O 55 O 177)
(STOP)


which means that the font has a boundary character set and a ligature between the boundary character and j (that is, the standard theta) which replaces it with the variant theta at slot octal 14. Also the emdash (at slot 0) has a ligature with the standard theta, that prints the emdash followed by the variant theta.

The font file for italic, gdidoti6a.tfm, has the boundary character set, but no ligatures like for the upright font. A bug.

• Is there any way to override the .tfm? How can ligatures still be in effect after \DisableLigatures{}`? Nov 19 '17 at 19:32
• @svenper I don't think you can disable such a ligature. But do you want to disable the variant theta? Nov 19 '17 at 20:57
• @svenper Do you really want to disable all ligatures and kerning?
– cfr
Nov 20 '17 at 1:53
• @egreg I would like the option of which theta to use, though I suspected this was a bug so wanted to check first. I intend to use the thetas as hacked-in math symbols if that opens any possibilities. Nov 20 '17 at 2:00
• @cfr It's just for the MWE, to see what effect it had. ;) I wanted to make sure I didn't misconfigure it. Nov 20 '17 at 2:02