Skip to main content
Jongware
Community Expert
Community Expert
Sep 12, 2010 11:51 PM UTC
Question

[Ann] A Monoline Text Drawing Script

Spurred into action by an ongoing discussion at Typophile: Technical Q: Monoline fonts, I decided to have a go at writing a Javascript. I'm pretty pleased with the result; perhaps it's of interest for the technical illustration drawers among you!

Enjoy.


Here is a link to the script I wrote for Illustrator CS4 (it might or might not work for any other version): monolinetext.v1.0.zip. It's a Javascript for Illustrator, and you can put it into the regular Illustrator Scripts folder to see it appear in the "Scripts" menu, or somewhere else (and you'd have to browse for it each time).

It shows a little tiny dialog (on which I spend most of the time) where you can enter a size in "points" (relative to the 29 units high Hershey characters) and enter some text. Use Shift+Enter to insert a 'Hard Return', or enter as much text as you want. The text is then drawn out in monoline characters in the center of the screen.

The script is intelligent, in that you can change a previously drawn text by simply selecting it and running the script. Note, however, that stuff like manual scaling and changed attributes (stroke width, color) will be lost. If that's important to you, I might look into it ...

It only supports a small subset of the Hershey Simplex set -- just ASCII, space up to tilde. (And it draws traditional K shapes.)

    This topic is closed to new replies. Start a new post to keep the conversation going.

    36 replies

    Participant
    Oct 14, 2015 4:24 PM UTC

    Thank you so much for posting this! This will save me a great deal of time with the current project I'm working on.  Much appreciated!

    Translate
    Inspiring
    Jul 15, 2015 12:01 PM UTC

    Hello  [Jongware]‌

    Thank you very much for this script:)

    I would like to ask if it is possible to add extended roman characters for Spanish or Turkish in your script?

    If you don't have a time would you please show couple of examples to add your script for extended characters?

    As I understand we should add Hershey C-Style coordinates arrays in your script like;

    Array(23,24,// Ascii 126
    Array(3, 6, 3, 8, 4,11, 6,12, 8,12,10,11,14, 8,16, 7,18, 7,20, 8,21,10,-1,-1, 3, 8, 4,10, 6,11, 8,11,10,10,14, 7,16, 6,18, 6,20, 7,21,10,21,12 ) )

    But how to find those arrays in c-style, I have downloaded "The full Hershey set for Roman Characters" but could not understand it ;

    613 19CaGMG[ RGQJNLMOMQNRQR[ RRQUNWMZM\N]Q][

      614 11I\MMM[ RMQPNRMUMWNXQX[

      615 18I\QMONMPLSLUMXOZQ[T[VZXXYUYSXPVNTMQM

      616 18H[LMLb RLPNNPMSMUNWPXSXUWXUZS[P[NZLX

      617 18I\XMXb RXPVNTMQMONMPLSLUMXOZQ[T[VZXX

      618  9KXOMO[ ROSPPRNTMWM

      619 18J[XPWNTMQMNNMPNRPSUTWUXWXXWZT[Q[NZMX

    Thank you and

    Best Regards.

    Translate
    Monika Gause
    Community Expert
    Community Expert
    Jul 15, 2015 12:19 PM UTC

    Maybe try if the fonts here contain the glyphs you need: OneLineFonts, The source for single line fonts

    Translate
    bw9398
    Participant
    Dec 3, 2014 5:39 AM UTC

    Thank you so much Jongware!!!

    Translate
    fabianmoronzirfas
    Known Participant
    Dec 9, 2012 1:34 PM UTC

    Works fine in AICS6 Mac OSX 10.8.2

    Thanks a lot jongware.

    Translate
    Monika Gause
    Community Expert
    Community Expert
    Sep 13, 2010 4:56 PM UTC

    Thanks for sharing!

    Translate
    Larry G. Schneider
    Community Expert
    Community Expert
    Sep 13, 2010 5:06 PM UTC

    Jongware,

    I've tried the link and it keeps coming back with a cannot find report. Seems that the "p" is getting left off the .zip extension in the link. Can you post the URL directly. Thanks

    Larry

    Translate
    Jongware
    Community Expert
    JongwareCommunity ExpertAuthor
    Community Expert
    Sep 13, 2010 7:45 PM UTC

    ?? That's the second time this month it happens to me. I'm beginning to seriously doubt my keyboard-a-bilities. Surely it's not Jive, jivving things up ...?

    http://www.jongware.com/binaries/monolinetext.v1.0.zip

    That name again, http://www.jongware.com/binaries/monolinetext.v1.0.zip.

    Translate