ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Csikos Bela <bcsikos425@freemail.hu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: how to insert symbols into document?
Date: Thu, 23 Apr 2015 16:26:24 +0200 (CEST)	[thread overview]
Message-ID: <freemail.20150423162624.89078.1@fmxmldata08.freemail.hu> (raw)
In-Reply-To: <C363452E-E204-46E0-A45A-CA0A6021B21C@gmail.com>

Wolfgang Schuster írta:
>
>> Am 18.04.2015 um 13:21 schrieb Csikos Bela:
>> 
>>> When you need characters like the mentioned losenge you should better look for a font
>>> which contains it and create a new typeface for it or set a fallback font which add the
>>> characters to the main font of your document.
>> 
>> Before answering I wanted to find out how to make this fallback: Using a given font
>> and fall back to only one (or a few) specific characters in another font. For example
>> using Tex Gyre Pagella and fall back to Dejavu's black diamond, but not to any other
>> characters.
>> 
>> To learn how to do this, in the last few days I read most of (if not all) the related pages on
>> the wiki site, and browsed the indicated pdf documents too. Unfortunately I find the wiki
>> pages confusing, and I couldn't find out how to solve the problem yet, but I did not want
>> to wait longer with the answer. I will study further the docs.
>
>\definefallbackfamily [documentfont] [rm] [DejaVu Serif] [range=0x25C6]
>\definefontfamily     [documentfont] [rm] [TeX Gyre Pagella]
>\definefontfamily     [documentfont] [tt] [Latin Modern Mono] [features=none]
>\definefontfamily     [documentfont] [mm] [TeX Gyre Pagella Math]
>
>\setupbodyfont[documentfont]
>
>% \setupsymbolset[text]
>%
>% Using the predefined symbol for "blackdiamond" doesn’t work
>% because context tests if the symbol exists in the text font
>% before it displays it but we take it from the fallback font
>% and therefore nothing is shown. To avoid this you can define
>% your own symbol or just put the character in your document
>% without the \symbol command.
>
>\definesymbol[blackdiamond][◆]
>
>\starttext
>
>direct input: ◆
>
>\type{\symbol[blacktriangle]}: \symbol[blackdiamond]
>
>\stoptext

Thank you very much. Both approaches work on my system.

bcsikos
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2015-04-23 14:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-12 23:29 Csikos Bela
2015-04-13  4:15 ` Otared Kavian
2015-04-13 11:14   ` Csikos Bela
2015-04-13 12:04     ` Otared Kavian
2015-04-13 20:51 ` Wolfgang Schuster
2015-04-18 11:21   ` Csikos Bela
2015-04-18 11:43     ` Wolfgang Schuster
2015-04-23 14:26       ` Csikos Bela [this message]
2015-04-18 11:51     ` Hans Hagen
2015-04-18 14:09       ` Wolfgang Schuster
2015-04-18 14:53         ` Hans Hagen

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=freemail.20150423162624.89078.1@fmxmldata08.freemail.hu \
    --to=bcsikos425@freemail.hu \
    --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).