From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: MetaPost integration: default parameters
Date: Sat, 14 Nov 2009 01:20:58 +0100 [thread overview]
Message-ID: <6faad9f00911131620v5b066fe6t90d653becc2d34@mail.gmail.com> (raw)
In-Reply-To: <E24E4ABC-54CC-49CD-BB3F-F3140B97DCC1@mpq.mpg.de>
On Fri, Nov 13, 2009 at 17:53, Oliver Buerschaper wrote:
>
> Also, is there a way to directly get the glyph outlines of, say,
> $\bigotimes$ in MetaPost code and use it to derive some length unit from it?
Yes, but this only works for Type1 fonts, not for OpenType.
The example below is a literal copy from metapost manual (created by Taco).
You first search in the source for that glyph:
\definemathsymbol [bigotimes] [op] [ex] ["4E] % this equals 78 in
decimal notation
and then you need either name or number of glyph + name of font.
fontmapfile "=lm-math.map";
beginfig(1);
picture q;
path p;
interim ahlength := 12bp;
interim ahangle := 25;
q := glyph 78 of "lmex10" scaled .2;
% q := glyph "circlemultiplytext" of "lmex10" scaled .2;
% cheat by looking at lm-mathex.enc
for item within q:
p := pathpart item;
drawarrow p withcolor (.6,.9,.6)
withpen pencircle scaled 1.5;
for j=0 upto length p:
pickup pencircle scaled .7;
draw (point j of p -- precontrol j of p)
dashed evenly withcolor blue;
draw (point j of p -- postcontrol j of p)
dashed evenly withcolor blue;
pickup pencircle scaled 3;
draw precontrol j of p withcolor red;
draw postcontrol j of p withcolor red;
pickup pencircle scaled 2;
draw point j of p withcolor black;
endfor
endfor
endfig;
end.
Mojca
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2009-11-14 0:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-13 16:53 Oliver Buerschaper
2009-11-14 0:20 ` Mojca Miklavec [this message]
2009-11-22 15:53 ` Oliver Buerschaper
2009-11-22 16:01 ` Mojca Miklavec
2009-11-22 19:16 ` Oliver Buerschaper
2009-11-22 20:15 ` luigi scarso
2009-11-22 20:33 ` Wolfgang Schuster
2009-11-22 20:53 ` luigi scarso
2009-11-22 21:16 ` Hans Hagen
2009-11-23 9:17 ` Mojca Miklavec
2009-11-23 9:47 ` Hans Hagen
2009-11-23 9:56 ` luigi scarso
2009-11-23 11:56 ` luigi scarso
2009-11-24 20:05 ` MetaPost broken mkiv latest minimals Alan BRASLAU
2009-11-24 20:20 ` luigi scarso
2009-11-24 20:30 ` Alan BRASLAU
2009-11-24 20:21 ` Hans Hagen
2009-11-24 20:29 ` Mojca Miklavec
2009-11-24 20:49 ` Hans Hagen
2009-11-24 21:51 ` Alan BRASLAU
2009-11-24 22:08 ` luigi scarso
2009-11-24 22:22 ` Taco Hoekwater
2009-11-23 7:17 ` MetaPost integration: default parameters Taco Hoekwater
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=6faad9f00911131620v5b066fe6t90d653becc2d34@mail.gmail.com \
--to=mojca.miklavec.lists@gmail.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).