Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Unicode tokens?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Unicode tokens?


Chronological Thread 
  • From: Ralf Jung <jung AT mpi-sws.org>
  • To: coq-club AT inria.fr, Clément Pit-Claudel <cpitclaudel AT gmail.com>
  • Subject: Re: [Coq-Club] Unicode tokens?
  • Date: Sun, 12 Mar 2017 13:04:24 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jung AT mpi-sws.org; spf=Pass smtp.mailfrom=jung AT mpi-sws.org; spf=None smtp.helo=postmaster AT hera.mpi-klsb.mpg.de
  • Ironport-phdr: 9a23:dvdmwh88wbYjJ/9uRHKM819IXTAuvvDOBiVQ1KB31OgcTK2v8tzYMVDF4r011RmSDNidtqgP0LeempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9ZDeZwVFiCC9bL9sIxm7owXcvdQKjIV/Lao81gHHqWZSdeRMwmNoK1OTnxLi6cq14ZVu7Sdete8/+sBZSan1cLg2QrJeDDQ9LmA6/9brugXZTQuO/XQTTGMbmQdVDgff7RH6WpDxsjbmtud4xSKXM9H6QawyVD+/9KpgVgPmhzkbOD446GHXi9J/jKRHoBK6uhdzx5fYbJyJOPZie6/Qe9QVS3ZBUMtPTiBNG56xYJESAOQdIelYsZTyqlQTphe6BQSgGObjxzlVjXH0wKI6yfwsHxzY0gwuH9wAs3rao9v6O6gQTe+7w7LFzSnBYv5MxTvx9IbFfxInrPqRXbxwa83RyUw3Gg3ZlFqQrYLlNC6R2OQQtWib4PdrWOWti246rQFxrSOixsI0ionIn44V0V7F9T5jzIYyP924R1d2bNi5G5VesCGaMpF5QsIkQ2xwtyY6y6EGuZ6mfCcR0pgo2xnfa/mff4iH5BLjSfydITBihHJqfr+0mhW88VC4x+HhWMS51ExGojdBn9XWq3wBzRPe58yfRvZ+8UqtwyuD2gHT5+1ePEw5mrfXJ4Q8zrIsipYet1nIEDXsl0XslqCWc10p+ui25OTjZbXrvp+cOJFuig7kKKgun9S/AeUhPggNW2ib4v+z2Kfm/U3hT7VGlOA5nbfBvJDbI8QUuLK5DhdI3ost7xuzFSqq3dACkXUaNl5IdxaKg5DsO17UIfD4Cfm/g06rkDdu3/3GPKDhApPCLnXYlbfhZbd951dHyAs91tBT/ZVUCqsOIP7rQE/+qMTYDgMlMwyz2+voFNJ91poHVW2TBq+ZLbjdvEST5uMvJumMfJUatCz8K/gj/f7ujGU2lUUTfamzjtMrbyWzGe0jKEGEa1LthM0AGCEEpE52Z+hrjVCETQlrZmr3dKY1+z02DMryBp/CWoupiaGN0SOTEZhfZ2QAAVeJRyTGbYKBDs0FbCzaANJnnXRQV6WnRKckzRDrrxDhjb19IbyHqWUjqZv/2Y0ttKXonhYo+GkxUpyQ

Hi,

>> (I jumped to the conclusion that this is because of some Emacs
>> specific fonts because I've seen this behavior only in Emacs, nowhere
>> else).
>
> This is due to Emacs respecting the incorrect metrics of certain TeX fonts
> (other applications typically ignore them); see
> https://github.com/cpitclaudel/company-coq/issues/15 and
> https://lists.gnu.org/archive/html/bug-gnu-emacs/2015-05/msg00696.html for
> more details.
>
> Emacs 25 includes a workaround for this issue. In Emacs 24, installing
> better fonts should work.

This also helps with emacs 24:

;; Fonts
(dolist (ft (fontset-list))
; Main font
(set-fontset-font ft 'unicode (font-spec :name "Monospace"))
; Fallback font
; Appending to the 'unicode list makes emacs unbearably slow.
(set-fontset-font ft nil (font-spec :name "DejaVu Sans Mono"))
)
; Fallback-fallback font
; If we 'append this to all fontsets, it picks Symbola even for some
cases where DejaVu could
; be used. Adding it only to the "t" table makes it Do The Right Thing (TM).
(set-fontset-font t nil (font-spec :name "Symbola"))

I have my "Monospace" font set up to be "Fira Sans Mono". The above
contortion makes it so that emacs uses Unicode symbols from that font if
available, then falls back to DejaVu Sans Mono, and then to Symbola.
Unfortunately, the behavior of these emacs fontset-lists is entirely
non-intuitive, so I arrived at the above through genetic programming
(random mutation until things look the way they should -- *and* don't
cause performance issues). It's likely I am doing weird things above.
But at least it's working, and not picking the bad TeX fonts.

Kind regards,
Ralf



Archive powered by MHonArc 2.6.18.

Top of Page