From: Rik Kabel <context@rik.users.panix.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: A better \definesymbol sought
Date: Sun, 22 Jan 2017 22:39:53 -0500 [thread overview]
Message-ID: <d69a3e46-5ea4-59c4-935b-03b65fc6b97e@rik.users.panix.com> (raw)
In-Reply-To: <20170120215443.62bbdfb2@zoo.hsd1.co.comcast.net>
[-- Attachment #1.1: Type: text/plain, Size: 1628 bytes --]
On 2017-01-20 23:54, Alan Braslau wrote:
> On Fri, 20 Jan 2017 22:33:40 -0500
> Rik Kabel <context@rik.users.panix.com> wrote:
>
>> Can anyone suggest a better way to compose such symbols than using
>> the raw TeX commands used here? Is there a more ConTeXt-ish way to do
>> this? Is it possible to get options to center the glyphs from which
>> the symbol is assembled (separate horizontal and vertical, with the
>> ability to offset them)?
>>
>> Is there a ConTeXt way other than \definesymbol to create such
>> combined symbols?
> MetaPost (with textext())?
Thank you for that, Alan. I hadn’t ever used MetaPost before, thinking
it was too complex for my needs. Now I see it may be quite useful.
So, how can I make the inner glyph (‘?’ in the example below)
transparent, so that the background shows through along with anything
else that lives on a lower layer? I’ve seen a method for constructed
shapes, but nothing that I can apply to text glyphs. Undraw doesn’t do it.
\setupbackgrounds
[page]
[background=color,backgroundcolor=yellow]
\definefont
[DVSrB]
[file:DejaVuSerif-Bold.ttf]
\startuseMPgraphic{HeartTest}
picture h;
h := "♥" infont "\truefontname{DejaVuSerif-Bold.ttf}" scaled 20;
picture q;
q := textext("{\DVSrB ?}") scaled 10; % just a different way
q := q shifted - (xpart center q, 12pt) ;
draw h withcolor blue;
undraw q; % this doesn't do it
\stopuseMPgraphic
\starttext
\useMPgraphic{HeartTest}
\stoptext
--
Rik
[-- Attachment #1.2: Type: text/html, Size: 2537 bytes --]
[-- Attachment #2: 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
___________________________________________________________________________________
next prev parent reply other threads:[~2017-01-23 3:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-21 3:33 Rik Kabel
2017-01-21 4:54 ` Alan Braslau
2017-01-23 3:39 ` Rik Kabel [this message]
2017-01-23 5:06 ` Alan Braslau
2017-01-23 19:09 ` Rik Kabel
2017-01-24 3:04 ` Rik
2017-01-24 8:34 ` Hans Hagen
2017-01-24 19:01 ` Rik Kabel
2017-01-25 10:17 ` 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=d69a3e46-5ea4-59c4-935b-03b65fc6b97e@rik.users.panix.com \
--to=context@rik.users.panix.com \
--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).