[Ann] A Monoline Text Drawing Script

LEGEND ,
Sep 12, 2010 Sep 12, 2010

Copy link to clipboard

Copied

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

monolinetext.png

Views

39.0K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Sep 13, 2010 Sep 13, 2010

Copy link to clipboard

Copied

Thanks for sharing!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Sep 13, 2010 Sep 13, 2010

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 13, 2010 Sep 13, 2010

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Sep 13, 2010 Sep 13, 2010

Copy link to clipboard

Copied

Thanks Again, Jongware


Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 09, 2012 Dec 09, 2012

Copy link to clipboard

Copied

Works fine in AICS6 Mac OSX 10.8.2

Thanks a lot jongware.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 02, 2014 Dec 02, 2014

Copy link to clipboard

Copied

Thank you so much Jongware!!!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 15, 2015 Jul 15, 2015

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 15, 2015 Jul 15, 2015

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 15, 2015 Jul 15, 2015

Copy link to clipboard

Copied

It's been a while, I cannot recall if I wrote a program to convert the original data format to 'regular' coordinates, or just used one of the C style definitions that float around the web. The format is not extremely difficult to parse, but yes: it takes some tinkering. You can find samples for decoding at http://paulbourke.net/dataformats/hershey/

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 14, 2015 Oct 14, 2015

Copy link to clipboard

Copied

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!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 18, 2018 Jan 18, 2018

Copy link to clipboard

Copied

Download link seems to be broken

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jan 18, 2018 Jan 18, 2018

Copy link to clipboard

Copied

Seems like a rascal stole a "p".

Copy the link in the initial post and add a "p" at the end of the line. Then the download link should work.

Or use this one:

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 03, 2018 Jun 03, 2018

Copy link to clipboard

Copied

When I try this in Adobe Illustrator CC, I get this error message:

Screen Shot 2018-06-03 at 9.04.14 AM.png

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 03, 2018 Jun 03, 2018

Copy link to clipboard

Copied

is the layer locked?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 03, 2018 Jun 03, 2018

Copy link to clipboard

Copied

No. I even tried a new layer and received the same message.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 04, 2018 Jun 04, 2018

Copy link to clipboard

Copied

I just tried and hey, even 8 years after writing it and ~6 versions of Illustrator later ...

This strongly suggests the problem lies at your end.

Remember, we are not able to look over your shoulder! There must be something in your document, setup, preferences, or computer that prohibits the script from running normally. As @Ray says above, the only way I can get that error message if I deliberately lock the current working layer.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 02, 2018 Jul 02, 2018

Copy link to clipboard

Copied

FWIW, I bumped into the same problem. The trouble seems to be a glitch in how the the script and the current version of AI get along. It looks like the script always places its output in the topmost layer, regardless of which layer is the "currently active" layer, If the topmost layer is not visible, the error you reported happens.

Hope this helps.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 02, 2018 Jul 02, 2018

Copy link to clipboard

Copied

I confirmdlehne 's results.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 14, 2019 Jan 14, 2019

Copy link to clipboard

Copied

Hi there,

I just downloaded the script and it works when creating new text. I can't, however, seem to get it to change text that I have already created. Is there something more that I need to do outside of selecting it, then going to file>scripts and then selecting the script? When I do this, it still opens the box and waits for me to input the text.

Please excuse my naivete as I had no idea scripts were a thing prior to a google search for a single stroke typeface that led me here.

Thanks in advance!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 14, 2019 Jan 14, 2019

Copy link to clipboard

Copied

Sorry, you can't change the text you've created. It's just vector paths

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 14, 2019 Jan 14, 2019

Copy link to clipboard

Copied

Are you saying that if they were vectors I would be able to do it? Because I tested that out by creating an outline of the text and I can't seem to get that to work either.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 14, 2019 Jan 14, 2019

Copy link to clipboard

Copied

Maybe we are misunderstanding each other.

This is how the script works when you run it: 

1. Open input field

2. Wait for text input and the hit on ok

3. Create vector paths from the text that was entered

There is no option to update text or use text created as "real text" in AI.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 15, 2019 Jan 15, 2019

Copy link to clipboard

Copied

vicmackbirth  wrote

I just downloaded the script and it works when creating new text. I can't, however, seem to get it to change text that I have already created. Is there something more that I need to do outside of selecting it, then going to file>scripts and then selecting the script? When I do this, it still opens the box and waits for me to input the text.

I just tested to make sure this script still works under the latest Illustrator. As far as I can see, it does:

-- and you still can change text that you entered with it before, but only if you did not do anything to it. This includes, for example, ungrouping it followed by grouping it again -- even though it looks like you end up with the same object again, as far as this script is concerned you don't.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 02, 2019 Feb 02, 2019

Copy link to clipboard

Copied

Hello Jongware,

Thank you very much for the script.

I'm using it with a pen plotter and I was wondering if there is a way to make the spacing depending on the pen thickness parameter.

I understood in the single characters where I should eventually make the changes once seen the Hershey Vector font, and

I was thinking about having the pen thickness as an input from me (as it is the font size).

I tried to make a couple attempts but I'm always experiencing errors... I'm a real newbie in scripting so I'm sure it's just my fault I'm not making it and there should be a way to do it.

Have you ever thought of it? Do you think there is a way to implement it?

Thank you so much

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines