Skip to main content
Jongware
Community Expert
Community Expert
September 12, 2010
Question

[Ann] A Monoline Text Drawing Script

  • September 12, 2010
  • 15 replies
  • 56038 views

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 has been closed for replies.

    15 replies

    Participant
    October 14, 2015

    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!

    Inspiring
    July 15, 2015

    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.

    Monika Gause
    Community Expert
    Community Expert
    July 15, 2015

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

    bw9398
    Participant
    December 3, 2014

    Thank you so much Jongware!!!

    fabianmoronzirfas
    Known Participant
    December 9, 2012

    Works fine in AICS6 Mac OSX 10.8.2

    Thanks a lot jongware.

    Monika Gause
    Community Expert
    Community Expert
    September 13, 2010

    Thanks for sharing!

    Larry G. Schneider
    Community Expert
    Community Expert
    September 13, 2010

    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

    Jongware
    Community Expert
    JongwareCommunity ExpertAuthor
    Community Expert
    September 13, 2010

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