unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Emacs 28: Specific TTF font gets loaded with font-backend x instead of ftcrhb
Date: Thu, 06 Feb 2020 08:12:06 +0100	[thread overview]
Message-ID: <87v9okyyt5.fsf@gnu.org> (raw)
In-Reply-To: <83y2thezjq.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 05 Feb 2020 19:04:09 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

Hi Eli,

>> > That probably means PragmataPro doesn't support ligatures, at least
>> > not the one for ->.
>> 
>> It does, at least I get an -> arrow glyph in gedit.
>
> Can you show the code you tried to use, and also tell in which version
> of Emacs did you try that?

I've tried it at home maybe two weeks ago with the current master at
that time.  I've just tried anew at work with today's master and the
JetBrains Mono font, and now it works just fine:

--8<---------------cut here---------------start------------->8---
(let ((alist '((33 . ".\\(?:\\(?:==\\|!!\\)\\|[!=]\\)")
               (35 . ".\\(?:###\\|##\\|_(\\|[#(?[_{]\\)")
               (36 . ".\\(?:>\\)")
               (37 . ".\\(?:\\(?:%%\\)\\|%\\)")
               (38 . ".\\(?:\\(?:&&\\)\\|&\\)")
               (42 . ".\\(?:\\(?:\\*\\*/\\)\\|\\(?:\\*[*/]\\)\\|[*/>]\\)")
               (43 . ".\\(?:\\(?:\\+\\+\\)\\|[+>]\\)")
               (45 . ".\\(?:\\(?:-[>-]\\|<<\\|>>\\)\\|[<>}~-]\\)")
               (46 . ".\\(?:\\(?:\\.[.<]\\)\\|[.=-]\\)")
               (47 . ".\\(?:\\(?:\\*\\*\\|//\\|==\\)\\|[*/=>]\\)")
               (48 . ".\\(?:x[a-zA-Z]\\)")
               (58 . ".\\(?:::\\|[:=]\\)")
               (59 . ".\\(?:;;\\|;\\)")
               (60 . ".\\(?:\\(?:!--\\)\\|\\(?:~~\\|->\\|\\$>\\|\\*>\\|\\+>\\|--\\|<[<=-]\\|=[<=>]\\||>\\)\\|[*$+~/<=>|-]\\)")
               (61 . ".\\(?:\\(?:/=\\|:=\\|<<\\|=[=>]\\|>>\\)\\|[<=>~]\\)")
               (62 . ".\\(?:\\(?:=>\\|>[=>-]\\)\\|[=>-]\\)")
               (63 . ".\\(?:\\(\\?\\?\\)\\|[:=?]\\)")
               (91 . ".\\(?:]\\)")
               (92 . ".\\(?:\\(?:\\\\\\\\\\)\\|\\\\\\)")
               (94 . ".\\(?:=\\)")
               (119 . ".\\(?:ww\\)")
               (123 . ".\\(?:-\\)")
               (124 . ".\\(?:\\(?:|[=|]\\)\\|[=>|]\\)")
               (126 . ".\\(?:~>\\|~~\\|[>=@~-]\\)"))))
  (dolist (char-regexp alist)
    (set-char-table-range composition-function-table (car char-regexp)
                          `([,(cdr char-regexp) 0 font-shape-gstring]))))
--8<---------------cut here---------------end--------------->8---

After evaling that, -> becomes an arrow and ~> becomes an arrow with
curvy stroke.  So either there's some issue with PragmataPro or my
computer at home.

>> Ok, I'll tinker with it when I find some spare time.
>
> Feel free to ask any questions or point out unclear areas, we should
> at least make the effort of clarifying the existing docs to the extent
> that we are able.

Do I understand it correctly that "overshooting" with the above rules
has no bad effect, i.e., if there is a composition rule for -> but the
font has no ligature glyph for that, then it just stays the way it is?
So there could be some ligature-minor-mode which just adds all possible
composition rules?  (Just speaking naively, I guess there are several
distinct categories of ligatures which you would want to enable/disable
on a per-mode basis.)

Bye,
Tassilo



  reply	other threads:[~2020-02-06  7:12 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04 11:12 Emacs 28: Specific TTF font gets loaded with font-backend x instead of ftcrhb Tassilo Horn
2020-02-04 12:15 ` Robert Pluim
2020-02-04 12:25   ` Robert Pluim
2020-02-04 12:58     ` Tassilo Horn
2020-02-04 13:54       ` Robert Pluim
2020-02-04 14:21         ` Tassilo Horn
2020-02-04 16:26           ` Robert Pluim
2020-02-04 18:32             ` Tassilo Horn
2020-02-04 20:11               ` Robert Pluim
2020-02-05 16:51                 ` Tassilo Horn
2020-02-04 15:31     ` Eli Zaretskii
2020-02-04 18:43       ` Tassilo Horn
2020-02-04 19:08         ` Eli Zaretskii
2020-02-05 16:44           ` Tassilo Horn
2020-02-05 17:04             ` Eli Zaretskii
2020-02-06  7:12               ` Tassilo Horn [this message]
2020-02-06 18:15                 ` Eli Zaretskii
2020-02-07  9:21                   ` Tassilo Horn
     [not found]                   ` <b271f1084b17a53ee1583d1f8cd92e9ed21cf360.camel@gnu.org>
2020-02-07  9:48                     ` Eli Zaretskii
2020-02-07 10:41                       ` Tassilo Horn
2020-02-07 13:28                         ` Eli Zaretskii
2020-02-08  9:39                           ` Tassilo Horn
2020-02-08  9:52                             ` Tassilo Horn
2020-02-08 10:16                               ` Eli Zaretskii
2020-02-08 10:36                                 ` Eli Zaretskii
2020-02-08 12:29                                   ` Tassilo Horn
2020-02-08 13:50                                     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v9okyyt5.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).