[metapost] Designing Brahmi DDHA
Shriramana Sharma
samjnaa at gmail.com
Tue Jul 31 11:34:47 CEST 2012
Hello list. I have previously posted about my work on palaeographic
Indic scripts. I'm right now tackling the grandmother of them all --
Brahmi. Since Brahmi is largely like stick figures (with all due
respect to King Ashoka) I didn't have the patience to do it the Meta*
way yet. I clipped glyphs from Senart's Les Inscriptions de Piyadasi
and drew straight lines on top of them. The few simple curves were not
an issue, but when I came to DDHA I was stumped because it was the
only highly-curved glyph and my Inkscape-designed glyph did not look
good at all. (I still have my suspicions about its age but Indoskript
says it's from BCE 252 so, well...)
So I had the idea of getting the nodes from Inkscape and making MPost
draw a "smooth" curve instead and I have to say I am most pleased with
the results. :-) Thank you all whose work has gone into MPost (and the
other tools I used)! :-)
Those interested might like to investigate the attached files.
BTW because Inkscape has y values increasing downwards but Mpost has
them increasing upwards, the final glyph is upside down. (I had to be
careful with using the directions up/down inside the .mp file because
of this.) Looking at the MPost manual there doesn't seem to be any
built-in transform to do "flip vertical" on a path as is found in
popular vector-drawing applications.
I am thinking of something like:
def flipvertical ( path p )
begingroup ;
numeric pleft, pright, phalfheight ;
phalfheight = ( ypart llcorner p + ypart urcorner p ) / 2 ;
pleft = xpart llcorner p ;
pright = xpart urcorner p ;
p := p reflectedabout ( ( pleft, phalfheight ), ( pright, phalfheight ) ) ;
endgroup ;
enddef ;
But I am not sure whether the above will work correctly. I think I
cannot create a transform out of this because a transform must be
defined even for single points but flip horizontal/vertical are valid
only for paths with more than one points. Can anyone please help me
how to implement a flipvertical?
Thanks!
--
Shriramana Sharma
-------------- next part --------------
A non-text attachment was scrubbed...
Name: brahmi-ddha.zip
Type: application/zip
Size: 4564 bytes
Desc: not available
URL: <http://tug.org/pipermail/metapost/attachments/20120731/64428267/attachment.zip>
More information about the metapost
mailing list