Book formatting and typography
Why Ligatures (fi, fl, ffi) Break Search Functions in Certain PDF Viewers
A bug report filed against Firefox, still open on Mozilla’s tracker in November 2026, has a precise title: “Printing to a PDF file generates ligature characters for ff, fi, fl, ffi, ffl in the ToUnicode CMap.” The reporter, Vincent Lefevre, argued that the characters Firefox was writing into its PDFs “exist purely for typographic reasons” and therefore “should not be used in the ToUnicode CMap.”1 A Mozilla engineer, Jonathan Kew, replied that the mapping is generated by the cairo graphics library from the font’s own character map, so Firefox does not directly control it, and that the behavior reproduces with fonts such as DejaVu Serif and Noto Sans.2 The exchange is a small technical dispute, but it identifies exactly where ligatures break PDF search: not in the appearance of the page, but in the hidden table that tells a PDF viewer which letters each shape on the page represents.
This article explains how that table works, describes three documented ways in which ligatures defeat it, and sets out how an author can test a book’s PDF before sending it to readers, reviewers, or libraries. It relies on the OpenType specification, the Unicode Consortium’s guidance, bug reports from Mozilla and OpenOffice, discussions on the Unicode, W3C, and XeTeX mailing lists, a technical overview from NASA’s Jet Propulsion Laboratory, and accessibility testing documentation from Deque. One limit should be stated at the outset: no source consulted for this article tests a range of current PDF viewers systematically, so the evidence identifies mechanisms and documented cases rather than a ranking of which viewers fail.
A ligature changes the glyph, not the text
A typographic ligature is a single shape that replaces two or three letters whose separate forms would collide. In many serif typefaces, the hook of an f runs into the dot of a following i, and the fi ligature solves the collision by merging them. Microsoft’s OpenType specification defines the standard ligatures feature, tagged liga, as one that “Replaces a sequence of glyphs with a single glyph which is preferred for typographic purposes,” and gives the example “The glyph for ffl replaces the sequence of glyphs f f l.”3 Its interface recommendation is that the feature “serves a critical function in some contexts and should be active by default.”4 Professional layout programs follow that recommendation, so most typeset books contain ligatures whether or not the author asked for them.
The Unicode Consortium treats ligatures as a property of fonts, not of text. Its FAQ on ligatures states that “Ligaturing is a behavior encoded in fonts,” and that “Ordinary typographic ligatures should be represented by letter sequences and handled by fonts.”5 Unicode does contain a handful of ligature characters, including fi and fl, in a block called Alphabetic Presentation Forms, but the FAQ explains that “For historical reasons, a substantial number of presentation forms were encoded in Unicode as compatibility characters,” and that “Their use is discouraged.”6 It is direct about data files: “Use of presentation forms is not recommended because it does not guarantee data integrity and interoperability.”7
In a word-processing file or an ebook, this division of labor works without difficulty. The file stores the letters f and i, the font draws them as one shape, and search, spell-checking, and screen readers all see the letters. A PDF is different, because of how it stores text.
A PDF stores glyphs and relies on a separate map to recover letters
A PDF page is, at bottom, a set of instructions to draw particular glyphs from particular fonts at particular positions. Andrew Cunningham, writing on the Unicode mailing list in March 2016, summarized the consequence: “My understanding is that PDF files contain a sequence of glyphs,” and “A PDF file will contain a ToUnicode mapping between glyphs and codepoints.”8 He added that the mapping “is either a 1-1 mapping or a 1-many mapping.”9 A ligature requires the second kind. Andrew Kirkpatrick of Adobe, writing to the W3C’s Web Accessibility Initiative list in January 2016, gave the example directly: “if you take an fi ligature character, that would be a single glyph, but would map to two Unicode code points.”10
Everything a viewer does with text depends on that map. Search compares the reader’s query against the characters recovered through it; copy and paste places those characters on the clipboard; screen readers speak them; indexing services read them. Tim Allison of NASA’s Jet Propulsion Laboratory, in a 2022 overview of text extraction from PDFs, described the stakes: “Extracting electronic text from PDFs is a notorious challenge for those who have worked closely with the file format,” and “missing ToUnicode mappings, and missing or corrupted font files can wreak havoc on text extraction.”11 Because “Text extraction is a critical precursor component of information retrieval systems,” he wrote, “When text extraction fails, users cannot find the documents or content they need.”12
A ligature therefore introduces a point of failure that ordinary letters do not. For a plain letter, the software that creates the PDF needs only a one-to-one entry. For a ligature, it must know which sequence of letters the single glyph stands for and write a one-to-many entry. The documented failures fall into three groups.
The first failure: the map drops or garbles part of the ligature
The clearest case is a bug in OpenOffice’s PDF export, reported on 27 November 2009. The ToUnicode table that OpenOffice wrote for a ligature recorded only its first letter. The reporter explained that “the second letter of the ligature is effectively dropped from the file,” so that the word “description,” set with a ligature, became “descripton” when extracted from the PDF.13 Copying text produced the wrong result, and screen-reader users were affected.14 A developer traced the cause to code that “did not handle one-glyph-to-many-character mappings,” because the layout code stored only the first character of each glyph.15 A fix for left-to-right text was closed on 15 June 2010, with right-to-left ligatures moved to a separate issue.16
In a document affected this way, a reader searching for “description” finds nothing, even though the word is plainly visible on the page. The PDF looks perfect; its text layer is wrong. This failure does not depend on the viewer. Every viewer that reads the ToUnicode table recovers the same damaged text, so it is a defect in the PDF itself rather than in the program used to open it.
The second failure: the map points to a ligature character instead of letters
The Firefox bug described at the opening shows a subtler problem. There, the map is complete, but it maps the fi glyph to the single Unicode presentation form for fi, in the range U+FB00 to U+FB04, rather than to the two letters f and i.17 Lefevre’s objection rested on the Unicode position that those characters are compatibility forms whose use is discouraged.1819
Whether this breaks search depends on the viewer. A viewer that converts compatibility characters to their ordinary letter equivalents before matching will find “first” whether the PDF stores “fi” or the ligature character. A viewer that compares characters literally will not, because the query contains two characters and the text contains one. This is the most plausible meaning of the catalogue title’s phrase “certain PDF viewers,” and it is consistent with the Unicode FAQ’s warning that presentation forms do not “guarantee data integrity and interoperability.”20 The sources consulted here do not, however, document which current viewers normalize and which do not, and the article does not attempt to name them.
The Firefox report also shows how far the cause can lie from the author’s control. Kew’s explanation was that the mapping comes from the font’s character map, processed by a graphics library, and that a full fix would require passing the original text through the rendering stack, where the relevant data structure holds only glyph IDs and positions, with “no record of the actual text.”21 As of November 2026, the bug’s status is NEW and unassigned, with an open question to the reporter about whether a related fix has resolved it.22
The third failure: some ligatures have no Unicode equivalent at all
Unicode encodes only a few Latin ligatures as characters. A font may contain many more, such as ct, st, fj, or Th, and these have no single Unicode character to map to. If the software creating the PDF does not write a one-to-many entry for them, nothing correct remains to fall back on. A 2010 thread on the XeTeX mailing list recorded this case in a question by Paul Foley: “The”fty”, “ct” and “fj” ligatures aren’t in Unicode,” and the PDF viewer could not search or copy them.23
The 2016 Unicode list thread mentioned above concerned a ti ligature that appeared as the character Ɵ when text was copied out of a PDF.24 Participants found that the results differed by program. Copying from Preview on a Mac replaced the ligature with a space. Pasting into Word and into another text editor produced the same wrong character. Doug Ewell established that the ligature had been encoded as U+10019F, a private-use code point, which was truncated to U+019F (Ɵ) when pasted.25 Cunningham suggested that the source of the problem “could be either the font or the font subsetting and embedding performed when the PDF is generated,” while stating that he was not certain.26
This case illustrates the viewer-dependent side of the problem clearly. The same PDF produced a space in one program and a stray Latin letter in others. A search for a word containing “ti” would fail in both, but for different reasons, and a reader would see different symptoms depending on the software in use.
ActualText can supply the correct letters when the map cannot
PDF has a second mechanism for recording what text a set of glyphs represents. The ActualText property can be attached to a span of content to state its textual equivalent directly, independently of the font’s map. Kirkpatrick’s 2016 message stated that the major PDF viewers “recognize and process ActualText,” and that he believed the Google indexer also respects it.27 He also warned that ActualText “is NEVER EVER EVER used to represent the results of OCR,” which, he wrote, “would be a violation of the standard.”28
For an author, ActualText is mostly something that good PDF-creation software adds automatically, not something to apply by hand. Its existence matters because it means a ligature that a font cannot map correctly can still be made searchable, and because a tagged, accessible PDF produced by a professional layout program is more likely to carry correct text than a PDF produced by printing to a virtual printer.
Accessibility checkers flag the same problem
Accessibility testing tools look for broken character mapping because it affects assistive technology as well as search. Deque’s rule for PDF documents, “Ensures that Unicode mapping requirements are met,” lists PDF/UA among its guidelines and explains that “Incorrect or missing unicode mapping can cause issues in how characters are rendered in a document.”29 Its recommended prevention is to work at the source: “An easy fix is to use OpenType fonts that use Unicode character encoding in your source file.”30 For a finished PDF, it describes a check in Adobe Acrobat Pro’s Preflight tool, run from the Print Production tools with the Acrobat Pro DC 2015 profiles, in which the Font section includes a check titled “Text cannot be mapped to Unicode.”31
The OpenOffice report makes the same connection from the other direction, noting that the ligature bug affected screen-reader users before a maintainer reclassified it as “simply a broken PDF export.”32 A book PDF that fails search will usually also fail a screen reader, and for the same reason.
Testing a book PDF takes a few minutes
The print file sent to a printer does not need a working text layer, because the press reproduces glyphs, not characters. The question arises for every other PDF an author distributes: review copies, advance reader copies, PDFs sold directly, files supplied to libraries or academic repositories, and accessible editions. For these, a short test will reveal whether ligatures have damaged the text.
First, find words in the book that are likely to contain ligatures, such as “first,” “office,” “flight,” “affect,” and “difficult.” Search for each in the PDF in at least two viewers, for example a desktop reader and a web browser’s built-in viewer, because the second failure described above is viewer-dependent.
Second, copy a paragraph containing several such words and paste it into a plain-text editor. Missing letters, stray symbols, spaces in the middle of words, or unfamiliar single characters where “fi” or “fl” should be all indicate a mapping problem.
Third, if Acrobat Pro is available, run the Preflight check for text that cannot be mapped to Unicode.33
If the test fails, the remedies run from least to most disruptive. Re-export the PDF from the layout program’s own PDF export rather than through a print-to-PDF driver, since the Firefox and OpenOffice cases both involved the PDF-generating code rather than the layout.3435 Try a different font, preferably an OpenType font with Unicode encoding.36 Turn off discretionary ligatures, which have no Unicode equivalents, for the distribution PDF.37 As a last resort, turn off standard ligatures in the distribution PDF while keeping them in the print file, accepting the typographic cost described in the OpenType specification’s recommendation that they be active by default.38
What remains uncertain is how often current viewers still fail on correctly mapped presentation forms. The bug reports and mailing-list threads that document the problem date from 2009 to 2023, and software has changed since; the Firefox report itself now asks whether a later fix has resolved its case.39 A survey of current viewers would settle the question. Until one exists, the dependable approach is to test the actual file in the viewers that its readers are likely to use.
Related articles on selfpublishingtool.com
- Why Copy-Pasting from PDFs Corrupts Your Manuscript’s Formatting
- Understanding Font Embedding in Print PDFs
- Hunting Gremlins: Invisible Unicode Characters That Break Typesetting Software
- Why Smart Quotes Turn into Question Marks During File Conversions
- Why Open-Source Fonts Sometimes Fail Commercial Print Preflight Checks
Platform rules, fees and laws change. Facts in this guide are dated to when they were checked; confirm current terms with the platform or authority before relying on them. Nothing here is legal, tax or financial advice.