ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* A better \definesymbol sought
@ 2017-01-21  3:33 Rik Kabel
  2017-01-21  4:54 ` Alan Braslau
  0 siblings, 1 reply; 9+ messages in thread
From: Rik Kabel @ 2017-01-21  3:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-01-25 10:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-21  3:33 A better \definesymbol sought Rik Kabel
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

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).