4

I'm trying to use Minion Pro Italic font, specifically I would like to use the italic "g" with an open tail - instead of the default two-story version.

I found that it is defined as an alternate Cyrillic character "uni0434.ital". I tried to add [Style=Italic] and different alternate values, different script and language options, but it always tells me that the feature is not available, and shows the default "0434 character instead.

Is there some way to use this character? Thanks a lot.

5
  • 1
    You need to find which (stylistic set) feature it is mapped to. Adobe’s documentation of the font should cover that. Oct 17, 2013 at 10:01
  • It is listed in adobe.com/type/browser/pdfs/1719.pdf as "Alternate Cyrillic lowercase". Could you help on which option I should use?
    – user38423
    Oct 18, 2013 at 1:14
  • This is not a single storey g, but a localised Serbian д. So as such it can’t be used as an alternate g in straight forward way (some macro hackery can do it, but copying from/searching the resulting PDF will give you the Cyrillic character). If I were you, I’d modify the font using e.g. FontForge and make it a stylistic alternate of g with proper glyph name. Oct 18, 2013 at 4:47
  • I see it's actually been used for fonts like MinionMath... Beyond the discussion of whether it is a proper "g", I'm now more concerned about how to access a similar alternative character in a font. Could you give me a hint?
    – user38423
    Oct 20, 2013 at 21:56
  • You can check the mappings in FontForge or a similar program, and see which ones support it. If it’s localized for Serbian, it might possibly be [Script=Cyrillic, Language=Serbian].
    – Davislor
    Jan 5, 2021 at 21:53

2 Answers 2

2

LuaLaTeX can add virtual features to Open Type fonts. Since only glyphs are exchanged (not characters), find and copy should still work as expected in PDF viewers. I didn‘t test that, though.

% !TEX TS-program = LuaLaTeX
\begin{filecontents}{test.fea}
languagesystem DFLT dflt;
languagesystem latn dflt;

feature test {
  sub g by uni0434.ital;
} test;
\end{filecontents}
\documentclass{minimal}
\usepackage{fontspec}
\setmainfont[FeatureFile=test.fea,RawFeature=+test;]{Minion Pro}
\begin{document}
g \textit{g} \textbf{g \textit{g}} \textsc{g}
\end{document}
3
  • Text extraction in PDF is typically based on glyph name, so it will not work as expected here. This can be fixed, but it is not trivial. Feb 12, 2014 at 23:13
  • I assume How do I customize a LuaLaTeX CMap describes the procedure. Nevertheless, in my humble opinion find and copy in PDFs really shouldn’t deal with glyphs but characters.
    – Crissov
    Feb 13, 2014 at 13:04
  • Changing CMap would work only if that glyph is not used anywhere else in the document for its intended usage. What should have been done is not always the same as what is being done now. Feb 13, 2014 at 23:31
0

The glyph you are looking for has no Unicode codepoint assigned in the font, but you can get it through the glyph ID, which in this case is 1843 (at least in my particular version of Minion Pro, this may be different in other versions). The command is \XeTeXglyph1843.

You can see the ID for example by using FontBook on a Mac (tooltip on mouseover).

Example:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Minion Pro Italic}

\begin{document}

\Huge
G – g – \XeTeXglyph1843

\end{document}

Result:

enter image description here

However, as others have mentioned, this is not really a Latin g. There is actually a Unicode codepoint in the shape that you want, it is 'LATIN SMALL LETTER SCRIPT G' (U+0261). But Minion Pro does not have a glyph for this codepoint, so you are simply out of luck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.