ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Rik Kabel <context@rik.users.panix.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: A better \definesymbol sought
Date: Fri, 20 Jan 2017 22:33:40 -0500	[thread overview]
Message-ID: <348a2b7f-e3ff-ce93-e0e9-ca14b9440306@rik.users.panix.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1551 bytes --]

ConTeXters,

I have been using \definesymbol for a while, and for most purposes it 
suffices. However, there is one thing that it does not do that perhaps 
it should.

What it does not do is offer the option to center one glyph over another 
(horizontally and/or vertically) when it should be centered. Rather, it 
leaves the work to a process of tuning the horizontal and vertical 
levers (kern and raise here) to get something that is close, but rarely 
perfect.

I also see some problems with the horizontal spacing around the new 
symbol, but that may be a function of the underlying glyphs here.

The following example shows what I mean

    \definefont
       [Inits]
       [dejavusans]
    \usesymbols[mvs]
    \define\SqSteel{%
       \tfc
       \symbol[martinvogel 2][SquareSteel]
    }
    \define\RedSansA{%
       \tfx
       \Inits{\red A}
    }
    \definesymbol
       [MyMark]
       [\SqSteel\kern-.87em{\raise.38ex\hbox{\RedSansA}}]
    \define\Test{Some text \symbol[MyMark] some more text.\par}

    \starttext
    \Test
    \setupbodyfont[8pt]
    \Test
    \setupbodyfont[18pt]
    \Test
    \scale[factor=40]{\Test}
    \stoptext

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?

-- 
Rik


[-- Attachment #1.2: Type: text/html, Size: 2355 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
___________________________________________________________________________________

             reply	other threads:[~2017-01-21  3:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-21  3:33 Rik Kabel [this message]
2017-01-21  4:54 ` Alan Braslau
2017-01-23  3:39   ` Rik Kabel
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=348a2b7f-e3ff-ce93-e0e9-ca14b9440306@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).