Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have an OpenType font (.otf) and I need to use it from pdftex. I use an 8 bit input encoding. I am stuck on the greek part with babel. The input I use is the following:

\selectlanguage{polutonikogreek}>~h

Which should output ἦ (U+1F26, GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI).

The glyph ἦ is not in the font, but there is ῏ (U+1FCF, GREEK PSILI AND PERISPOMENI) and η (U+03B7, GREEK SMALL LETTER ETA), so combining these would be fine:

\selectlanguage{polutonikogreek}{\accent92\char104}

looks ok.

The question is now: how to get >~h to make {\accent92\char104}?

Note: the greek fonts that I know make a ligature of >~h to get the desired output.

share|improve this question
1  
The Greek fonts available in LGR encoding normally have a glyph for that combination in position 0xAE. If not you should make a virtual font that builds the accented character and defines the ligature. Or say \newunicodechar{ἦ}{\accent92\char104} (with the newunicodechar package) and UTF-8 as encoding, with many limitations: for example the input >~h will not work. –  egreg Sep 17 '12 at 10:56
    
The problem with the virtual font seems that I have to do that with every possible ligature (max. 256). I might do that, but only if there is no other way.... –  topskip Sep 17 '12 at 11:01
    
You can copy the ligature table from one of the available virtual fonts; for instance vftovp gartemisiarg6a will produce something that could be useful to you for shortening the work. Maybe the Greek Font Society has some fontinst trickery already available. –  egreg Sep 17 '12 at 11:21
add comment

1 Answer

up vote 2 down vote accepted

I use otftotfm to generate the tfm files from the OpenType font. I have created a custom encoding file that includes lines like these:

% LIGKERN uni0313 uni1FC0 =: uni1FCF
% LIGKERN uni0313 tonos =: uni1FCE
% LIGKERN uni0313 uni1FEF =: uni1FCD
% LIGKERN uni0313 alpha =: uni1F00
% LIGKERN uni0313 epsilon =: uni1F10
% LIGKERN uni0313 eta =: uni1F20
% LIGKERN uni0313 rho =: uni1FE4
% LIGKERN uni0313 omicron =: uni1F40
% LIGKERN uni0313 omega =: uni1F60
% LIGKERN uni0313 iota =: uni1F30
% LIGKERN uni0313 upsilon =: uni1F50

and

% POSITION uni1FCF 180 00 -300
% POSITION uni1FCE 200 00 -300
% POSITION uni1FCD 200 00 -300

These are instructions to otftotfm to add virtual fonts with ligatures and MOVERIGHT commands.

This is not perfect yet, but the best way in terms of reproducibility (I am scripting the font conversion process). There are still some issues with accent placement. More will follow here.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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