For comparison purposes (between fonts), is there a way to print all available ligatures in a given font? Where do those ligatures reside in the font map?
Asked
Active
Viewed 346 times
6
-
Related/duplicate: http://tex.stackexchange.com/questions/106131/how-do-i-know-which-ligatures-are-used-in-my-document and http://tex.stackexchange.com/questions/106345/which-ligatures-do-the-fonts-used-in-my-document-offer – egreg May 30 '13 at 22:38
-
@egreg Sorry. I had missed http://tex.stackexchange.com/questions/106345/which-ligatures-do-the-fonts-used-in-my-document-offer, which is close enough to my question for the latter to be a duplicate. – jub0bs May 30 '13 at 22:42
1 Answers
6
To find the ligatures available in (say) Computer Modern Roman 10pt
tftopl cmr10
which will show
(LIGTABLE
(LABEL O 40)
(KRN C l R -0.277779)
(KRN C L R -0.319446)
(STOP)
(LABEL C f)
(LIG C i O 14)
(LIG C f O 13)
(LIG C l O 15)
(KRN O 47 R 0.077779)
(KRN O 77 R 0.077779)
(KRN O 41 R 0.077779)
(KRN O 51 R 0.077779)
(KRN O 135 R 0.077779)
(STOP)
(LABEL O 13)
(LIG C i O 16)
(LIG C l O 17)
(KRN O 47 R 0.077779)
(KRN O 77 R 0.077779)
(KRN O 41 R 0.077779)
(KRN O 51 R 0.077779)
(KRN O 135 R 0.077779)
(STOP)
(LABEL O 140)
(LIG O 140 O 134)
(STOP)
(LABEL O 47)
(LIG O 47 O 42)
(KRN O 77 R 0.111112)
(KRN O 41 R 0.111112)
(STOP)
(LABEL O 55)
(LIG O 55 O 173)
(STOP)
(LABEL O 173)
(LIG O 55 O 174)
(STOP)
(LABEL O 41)
(LIG O 140 O 74)
(STOP)
(LABEL O 77)
(LIG O 140 O 76)
(STOP)
(LABEL C k)
(LABEL C v)
(KRN C a R -0.055555)
(LABEL C w)
(KRN C e R -0.027779)
(KRN C a R -0.027779)
(KRN C o R -0.027779)
(KRN C c R -0.027779)
(STOP)
(LABEL C P)
(KRN C A R -0.083334)
(LABEL C y)
(KRN C o R -0.027779)
(KRN C e R -0.027779)
(KRN C a R -0.027779)
(KRN O 56 R -0.083334)
(KRN O 54 R -0.083334)
(STOP)
(LABEL C F)
(LABEL C V)
(LABEL C W)
(KRN C o R -0.083334)
(KRN C e R -0.083334)
(KRN C u R -0.083334)
(KRN C r R -0.083334)
(KRN C a R -0.083334)
(KRN C A R -0.111112)
(LABEL C K)
(LABEL C X)
(KRN C O R -0.027779)
(KRN C C R -0.027779)
(KRN C G R -0.027779)
(KRN C Q R -0.027779)
(STOP)
(LABEL C T)
(KRN C y R -0.027779)
(LABEL C Y)
(KRN C e R -0.083334)
(KRN C o R -0.083334)
(KRN C r R -0.083334)
(KRN C a R -0.083334)
(KRN C A R -0.083334)
(KRN C u R -0.083334)
(STOP)
(LABEL C D)
(LABEL C O)
(KRN C X R -0.027779)
(KRN C W R -0.027779)
(KRN C A R -0.027779)
(KRN C V R -0.027779)
(KRN C Y R -0.027779)
(STOP)
(LABEL C h)
(LABEL C m)
(LABEL C n)
(KRN C t R -0.027779)
(KRN C u R -0.027779)
(KRN C b R -0.027779)
(KRN C y R -0.027779)
(KRN C v R -0.027779)
(KRN C w R -0.027779)
(STOP)
(LABEL C c)
(KRN C h R -0.027779)
(KRN C k R -0.027779)
(STOP)
(LABEL C b)
(LABEL C o)
(LABEL C p)
(KRN C e R 0.027779)
(KRN C o R 0.027779)
(KRN C x R -0.027779)
(KRN C d R 0.027779)
(KRN C c R 0.027779)
(KRN C q R 0.027779)
(LABEL C a)
(KRN C v R -0.027779)
(KRN C j R 0.055555)
(LABEL C t)
(KRN C y R -0.027779)
(LABEL C u)
(KRN C w R -0.027779)
(STOP)
(LABEL C A)
(LABEL C R)
(KRN C t R -0.027779)
(KRN C C R -0.027779)
(KRN C O R -0.027779)
(KRN C G R -0.027779)
(KRN C U R -0.027779)
(KRN C Q R -0.027779)
(LABEL C L)
(KRN C T R -0.083334)
(KRN C Y R -0.083334)
(KRN C V R -0.111112)
(KRN C W R -0.111112)
(STOP)
(LABEL C g)
(KRN C j R 0.027779)
(STOP)
(LABEL C I)
(KRN C I R 0.027779)
(STOP)
)
where for example
(LABEL C f)
(LIG C i O 14)
(LIG C f O 13)
(LIG C l O 15)
tells you that (C)haracter f ligatures with (C)haracters i f and l to produce (O)ctal 14 13 and 15
so for example this command (bash syntax)
(echo "";tftopl cmr10 | egrep " .LIG" | sed -e "s/.*O \([0-7]*\)./ [\\\\char\'\1]/"; echo "\\bye")| pdftex \\relax
produces

David Carlisle
- 757,742
-
I'm not asking for a full solution, but could you give me a hint as to how would you go about printing all of them in an output file? – jub0bs May 30 '13 at 22:31
-
1
-
-
@DavidCarlisle Great! Weird that Spanish punctuation, endash and emdash are considered ligatures! – jub0bs May 30 '13 at 22:49
-
1@Werner Octal 13 is hex B decimal 11 which is is the ff ligature inOT1 encoding then you see later in the table that O 13 ligatures with i or l to make octal 16 and 17 the ffi and ffl ligatures – David Carlisle May 30 '13 at 22:51
-
2@Jubobs the fact that --- makes an emdash and ff makes an ff glyph are the same as far as TeX is concerned, similarly `? making an inverted ? – David Carlisle May 30 '13 at 22:52
-