ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mari Voipio <mari.voipio@iki.fi>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Font Awesome (again)
Date: Thu, 1 Nov 2018 13:04:01 +0200	[thread overview]
Message-ID: <CAGbDsP3yTHM0y=943E5HutV9_30FTmdKAVN0LPy2Q343Os==mg@mail.gmail.com> (raw)
In-Reply-To: <251b608d-0e5d-87db-f29c-de49afe03c7f@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4022 bytes --]

Hi,

I'm trying to get Font Awesome 5 to work for me, but it only almost does.

Wolfgang's code works and I get a nice list of symbols for all three
variations, so ConTeXt obviously finds the font. But when I try to use
a single symbol, ConTeXt prints the symbol name instead of the symbol.
There must be something I'm overlooking, but I don't know what. Wiki
wasn't very helpful, although we do have an entry on symbols (Font
Awesome, on the other hand, isn't mentioned anywhere on the wiki).

I tried with \symbol[fontawesome-regular][credit-card] (at the end of
my file) and a few variants thereof, but couldn't get the symbol. What
am I doing wrong? What have I missed?

TIA,
Mari
On Sun, Oct 7, 2018 at 4:45 PM Wolfgang Schuster
<wolfgang.schuster.lists@gmail.com> wrote:
>
>
>
> Aditya Mahajan schrieb am 07.10.18 um 15:26:
> > Hi,
> >
> > There is a FontAwesome.otf file that is distributed with ConTeXt
> > minimals. Does anyone know what version (4 or 5) of the font it is? I
> > am asking because the names of the symbols used in the font do not
> > match those on the font-awesome website. For example, using
> >
> > \showsymbolset[fontawesome]
>
> The distribution includes version 4.7.
>
> > I get that the symbol for "utensils"
> > (https://fontawesome.com/icons/utensils?style=solid) is actually
> > mapped to "food" in ConTeXt. Since the names of the symbols are now
> > taken from the font, my guess is that the distribution has an old
> > version of the font (also because it is a single font rather than three).
> >
> > Would it make sense to update the fonts in the distribution? If not,
> > then simply remove the old version of the fonts?
> >
> > Also, don't we need to update the symb-imp-fontawesome.mkiv file to
> > work with the new symbols. Font awesome has split the fonts into three
> > (https://fontawesome.com/how-to-use/on-the-desktop/setup/getting-started):
> >
> > Solid, Regular, and Brands. (There are also pro version of the fonts).
> > The simplest way to use them will be to have three symbolsets
> > (fontawesome, fontawesome-solid, and fontawesome-brands), where the
> > names are taken from the fonts.
> >
> > In the meanwhile, Hraban has painstakenly written out the mappings by
> > hand, but the automatic mapping might be simpler (and more future proof).
> > https://github.com/fiee/ConTeXt/blob/master/symbols/symb-awesome5.mkiv
>
> While I have no problem replacing the old symbols you can support both
> when you use new set names for the new version (even for the regular style).
>
>
> \definefontsynonym [FontAwesomeBrands]
> [file:fontawesome5brandsregular400.otf]
> \definefontsynonym [FontAwesomeRegular]
> [file:fontawesome5freeregular400.otf]
> \definefontsynonym [FontAwesomeSolid] [file:fontawesome5freesolid900.otf]
>
> \startsymbolset [fontawesome-brands] [font=FontAwesomeBrands]
>    % Font Awesome Brands
> \stopsymbolset
>
> \startsymbolset [fontawesome-regular] [font=FontAwesomeRegular]
>    % Font Awesome Regular
> \stopsymbolset
>
> \startsymbolset [fontawesome-solid] [font=FontAwesomeSolid]
>    % Font Awesome Solid
> \stopsymbolset
>
> \starttext
>
> \startnamedsection [title] [title={Font Awesome Brands}]
>    \showsymbolset [fontawesome-brands]
> \stopnamedsection
>
> \startnamedsection [title] [title={Font Awesome Regular}]
>    \showsymbolset [fontawesome-regular]
> \stopnamedsection
>
> \startnamedsection [title] [title={Font Awesome Solid}]
>    \showsymbolset [fontawesome-solid]
> \stopnamedsection
>
> \stoptext
>
>
> Wolfgang
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

[-- Attachment #2: font_awesome_wolfgang.tex --]
[-- Type: application/octet-stream, Size: 996 bytes --]


\definefontsynonym [FontAwesomeBrands]
[file:fontawesome5brandsregular400.otf]
\definefontsynonym [FontAwesomeRegular]
[file:fontawesome5freeregular400.otf]
\definefontsynonym [FontAwesomeSolid] [file:fontawesome5freesolid900.otf]

\startsymbolset [fontawesome-brands] [font=FontAwesomeBrands]
   % Font Awesome Brands
\stopsymbolset

\startsymbolset [fontawesome-regular] [font=FontAwesomeRegular]
   % Font Awesome Regular
\stopsymbolset

\startsymbolset [fontawesome-solid] [font=FontAwesomeSolid]
   % Font Awesome Solid
\stopsymbolset

\starttext

\startnamedsection [title] [title={Font Awesome Brands}]
   \showsymbolset [fontawesome-brands]
\stopnamedsection

\startnamedsection [title] [title={Font Awesome Regular}]
   \showsymbolset [fontawesome-regular]
\stopnamedsection

\startnamedsection [title] [title={Font Awesome Solid}]
   \showsymbolset [fontawesome-solid]
\stopnamedsection



\symbol[fontawesome-regular][credit-card]


\stoptext


[-- Attachment #3: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2018-11-01 11:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-07 13:26 Aditya Mahajan
2018-10-07 13:43 ` Wolfgang Schuster
2018-10-07 14:19   ` Hans Hagen
2018-10-07 15:25     ` Alan Braslau
2018-10-07 15:58       ` Hans Hagen
2018-10-07 15:39   ` Aditya Mahajan
2018-10-07 15:56     ` Hans Hagen
2018-11-01 11:04   ` Mari Voipio [this message]
2018-11-01 11:45     ` Wolfgang Schuster
     [not found]       ` <CAGbDsP0RRaF06=cxQ5rnkWK9vwABdcbfmTOVUHLGhD3DBHDhTg@mail.gmail.com>
2018-11-01 12:58         ` Wolfgang Schuster
2018-11-05  7:29           ` Mari Voipio
2018-10-07 16:29 ` Ulrike Fischer
2018-10-07 19:39   ` Aditya Mahajan

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='CAGbDsP3yTHM0y=943E5HutV9_30FTmdKAVN0LPy2Q343Os==mg@mail.gmail.com' \
    --to=mari.voipio@iki.fi \
    --cc=ntg-context@ntg.nl \
    /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).