event-horizon wrote:The same problem occurs with the Georgia font which is readily available on Linux.
For Georgia (at least the Georgia version in my system, 5.59) the ligatures you are looking for are defined as "Discretionary Ligatures" and not as "Default Ligatures" in the font file and are therefore disabled by default. You can request them using
fontspec's "[Ligatures=Discretionary]" option:
Code: Select all
% !TEX xelatex
\documentclass[12pt]{article}
\usepackage{fontspec}
\setmainfont[Ligatures=Discretionary]{Georgia}
\begin{document}
34 first flood effect
\end{document}
event-horizon wrote:
It is unclear if the ligature characters are being used in the PDF generated by *LaTeX.
I did a simple experiment. I selected the characters fi and fl (highlighting them in preparation for a copy/paste). With the XeLaTeX versions of the PDFs, I was able to individually select 'f', 'i', and 'l'. With the LibreOffice versions, I wasn't able to. I could only select fi (together as one) and fl (again, together as one). There was no way to select the individual letters.
To rule out XeLaTeX, I used pdfLaTeX with Times font. Same result.
I then went to the basics, Computer Modern font with LaTeX -> dvi. The dvi file was using the ligatures (could only select the ligature, not the individual letters). This was true of Times (\usepackage{times}) as well. But the moment I ran dvipdf, the ligatures disappeared, i.e., the individual letters could be selected.
XeLaTeX has an option to produce xdvi, but there is no viewer available for it, so I am unable to test this with XeLaTeX.
This points to the PDF conversion as the problem. The DVI and PDF viewer (okular) is able to distinguish. But the PDF file produced doesn't use the ligature for some reason.
You are interpreting this incorrectly. PDF files contain a mapping back from glyphs to the text they represent. Current pdfLaTeX versions (and also most other TeX engines) provide correct mappings there, so for example a "ffi" ligature is mapped back to the three letters "f" "f" and "i". Both okular and evince recognize such situations as ligatures and therefore allow to select the ligatures partially (You might notice that all parts have exactly the same width, even if this doesn't fit to the visual appearance of the glyph.) These mappings are important e.g. to enable proper copy and paste even if ligatures are present.
Your Libreoffice file on the other hand doesn't set this mapping correctly and instead maps the whole ligature to to a single private use codepoint. Therefore the viewer has no chance to realize that it is a ligature and doesn't allow to select it's parts. (Often copy and paste does something weird too)
I tried to view the dvi file with another viewer: evince. This viewer produced garbage at the ligatures. However, when I viewed the PDF converted from dvi, evince was showing the characters correctly. Further evidence that the ligatures are being converted to their constituent letters by the PDF converter.
Thanks.
What you are observing is that these mappings are not present in the DVI file (The DVI format does not support these), but your DVI to PDF converter inserts them while embedding the font. This does not mean that the ligatures get broken up in the PDF file.