Gnus development mailing list
 help / color / mirror / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: "Björn Bidar" <bjorn.bidar@thaodan.de>
Cc: ding@gnus.org
Subject: Re: Inserting UTF-8 icons into Gnus format-strings using all the icons
Date: Mon, 27 Mar 2023 11:51:43 +0200	[thread overview]
Message-ID: <874jq6o72o.fsf@gmail.com> (raw)
In-Reply-To: <87o7og1c16.fsf@thaodan.de> (=?utf-8?Q?=22Bj=C3=B6rn?= Bidar"'s message of "Sun, 26 Mar 2023 05:28:37 +0300")

>>>>> On Sun, 26 Mar 2023 05:28:37 +0300, Björn Bidar <bjorn.bidar@thaodan.de> said:

    Björn> Hey,

    Björn> I'm inserting UTF-8 icons into Gnus format-strings namely the example
    Björn> down below:
    Björn> (setq gnus-topic-line-format (concat "%i[ "
    Björn>                                      (propertize ;(all-the-icons-faicon "folder-open")
    Björn>                                       (all-the-icons-material "folder")
    Björn>                                       'display '(raise 0.0))
    Björn>                                      " %(%{%n -- %A%}%) ]%v\n"))

    Björn> The icons are inserting using the material icons font family that all
    Björn> the icons ships.

    Björn> How can I insert the icon into the format string while keeping the font
    Björn> family attribute?

I guess you might be able to propertize the string with an appropriate
'face' property, but it might be better to do something like:

(set-fontset-font t #xE158 "Material Icons" nil 'prepend)

which tells emacs which font to use for that codepoint.

Robert
-- 


      reply	other threads:[~2023-03-27  9:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-26  2:28 Björn Bidar
2023-03-27  9:51 ` Robert Pluim [this message]

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

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

  git send-email \
    --in-reply-to=874jq6o72o.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=bjorn.bidar@thaodan.de \
    --cc=ding@gnus.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 NNTP newsgroup(s).