From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Dotted characters
Date: Tue, 16 Aug 2016 09:54:26 +0200 [thread overview]
Message-ID: <f68f8c7f-46fe-a640-7ff6-7023d98372bd@wxs.nl> (raw)
In-Reply-To: <0FCC6C71-7BD9-49C3-9FEC-784DF4BD9175@elvenkind.com>
[-- Attachment #1: Type: text/plain, Size: 2375 bytes --]
On 8/16/2016 9:43 AM, Taco Hoekwater wrote:
> Hi Lukáš,
>
>> On 16 Aug 2016, at 09:17, Procházka Lukáš Ing. <LPr@pontex.cz
>> <mailto:LPr@pontex.cz>> wrote:
>>
>> Hello,
>>
>> I'm preparing a child copybook.
>> I'd like to write a uppercased letter "as is" followed by its shape
>> drawn with dots - something like
>>
>> /\ .
>> / \ . .
>> /____\ .....
>> / \ . .
>>
>> I guess that some MP "trick(s)" might be used;
>> also, a "simple" font should be used to be drawn dotted, which uses
>> "single drawings" to draw each line of the character.
>
> Most anything can be programmed, but in this case the task is very
> difficult.
>
> Modern fonts always use filled paths instead of stroke lines, so an “A”
> consists of two paths: the outer shape and the middle triange are separate:
> _
> / \
> / \ /\
> / _ \ /__\
> /_/ \_\
>
> there is no easy way to convert that into a dotted line that matches the
> ‘black parts’ of the glyph shape. Perhaps you could use two regular
> fonts: one sans-serif and one with dotted lines? There are some free
> fonts with dotted lines that can be found on the web, e.g.
> here: http://www.fontspace.com/category/dotted-line
>
> Another option would be draw the ‘normal’ uppercase letter directly as a
> metapost path. In that case it would be rather simple to create a
> generic dotted path from that using ‘setdash’. However, without manual
> work, it will not look as good as pre-drawn font, because for a ‘nice’
> dotted path you need to make sure that the dots in the crossbar of an
> ‘A’ line up nicely with the dots in the diagonal outer strokes, which is
> quite hard to do.
the best one can expect without too much work is
\startMPpage
draw outlinetext.f
("A")
() ;
currentpicture := currentpicture shifted (-bbwidth currentpicture,0) ;
draw outlinetext.d
("A")
(withpen pencircle scaled 1/10
dashed withdots scaled 1/20) ;
\stopMPpage
see attached
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
[-- Attachment #2: temp.pdf --]
[-- Type: application/applefile, Size: 3782 bytes --]
[-- Attachment #3: temp.tex --]
[-- Type: application/x-tex, Size: 266 bytes --]
[-- Attachment #4: Type: text/plain, Size: 485 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2016-08-16 7:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-16 7:17 Procházka Lukáš Ing.
2016-08-16 7:43 ` Taco Hoekwater
2016-08-16 7:54 ` Hans Hagen [this message]
2016-08-16 8:25 ` Procházka Lukáš Ing.
2016-08-16 8:24 ` Procházka Lukáš Ing.
2016-08-20 12:03 ` Lukáš Procházka
2016-08-20 12:35 ` Wolfgang Schuster
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=f68f8c7f-46fe-a640-7ff6-7023d98372bd@wxs.nl \
--to=pragma@wxs.nl \
--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).