tonsky / tonsky/FiraCode

Duplicated glyphs (except last one) in clipboard when copying ligatures from PDF file (lualatex)

Open
#1,482 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Clojure
Stars
82k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

Hello, I wrote a question on tex.stackexchange.com. As was pointed out in comments, this appears to be a bug with Fira Code font. If I were to write something like \texttt{===} or \texttt{<|} in LaTeX (with Fira Code selected as teletype font), generate PDF file with lualatex and copy ligatures from PDF file then in clipboard there will be ====== and <<| respectively. It doesn't happen with non-monospace fonts and with other monospace fonts either. What can cause such a strange glyph duplication?

\documentclass{article}
\usepackage{fontspec}
\setmonofont{Fira Code}
\begin{document}
\texttt{===} \texttt{<|}
\end{document}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the minimal LaTeX document in the issue and compile it with lualatex using Fira Code. Copy the displayed ligatures from the generated PDF and compare the clipboard text for === and <| with other monospace fonts. Done means the duplication is explained and the affected Fira Code behavior is corrected or clearly ruled out.

Written by the indexing model from the issue text.

Assessment

Tech stack
latex
Domain
design
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.