Here is a small teaser image -- I would gladly upload the font itself but somehow I cannot log on to my site ...
This is done with a font I created, based on the glyphic images by renowned Dutch graphic designer Karel Martens -- and I can think of lots of nice things to do with this! It should be possible, for example, to write a script that samples CMYK colors from an image in Illustrator, and draws four glyphs on top of each other, in each of these colors. This should not be too hard to do; the glyphs are under space and A..Z, in a somewhat later-is-darker order. Instant graphic art!
Awesome, I love this. And I have just seen the kind of graphic for it: http://angedockt.files.wordpress.com/2012/02/orchester-3-0-cover.jpg?w =702
now...do you see what we have to go thru? Illustrator is the CS adopted child, and illustrator scripting is...let's see...how can we describe it...the abandoned child?
great stuff as usual...can you share the script also?
and, can you place your glyphs in a ScriptUI dialog?
thanks Friendly Neighborhood
Carlos, the script is extremely simple. (Even then it took me way too long to *just get it to work*!)
I convert a picture to an object mosaic, ungroup the blocks, then select the result and read out the CMYK values for each individual block. The script selects an appropriate glyph for each of the CMYK values (rounded to work with the 27 available ones), and draws them on top of each other in full CMYK primary colors.
For some reason Illustrator does not like it when you feed (for example) 40 x 40 = 1,600 individual rectangles, and crashes & burns halfway through -- so I had to run the script about 8 times on large chunks instead.
I'm sure a good Illustrator scripter can work around these issues -- or even use Scriptographer -- but it still requires the Martens font I created ... (I just checked: my site is still locked. Shall I just mail you the font, so you can play with it?)
and, can you place your glyphs in a ScriptUI dialog?
It is a regular Opentype font, you can install it in your system the usual way and use it anywhere you like! So that's a Yes, because all system fonts can be used in ScriptUI dialogs.
(It's a funny thing, though, that I cannot program this particular trick to work with InDesign! That's because in ID there is simply no way *at all* to get access to 'the bits' of an imported image. Oh well.)
Hi Jong, there's no hurry....I'll wait like everyone else, I just wanted to have a peek at your script, never done anything with rasters.
I'm sure a good Illustrator scripter can work around these issues --
it's wise not to say how good one is, let others judge that...and yes you're good enough, more than good.
I tried once to place regular Webdings in a Dialog and it didn't let me....but I was giving it a Unicode string...it didn't occur to me to use a regular character and change to font to Webdings...I'll give it another try.
Jong, I did some thing similar to this way back ( CS1/CS2 ) using AppleScript… I read the image data straight out of Photoshop stuffed it in a large list ( array ) I could utilize that with AI or ID… I've never rewritten it in ESTK as there where a couple of similar scripts about… Jet has one along these lines too… For sure its dooable with ID but like you say you may need to get the data elsewhere ( I've not looked at whats available in ID terms for this ).
Carlos, I tried two dozen different fonts, and got "various" results -- most of the normal fonts work, but not all!
Peter Kahrel's ScriptUI guide has this to say about the font name:
For the font name you must use the font's PostScript name, which is not necessarily the same as the menu name used in InDesign's or PhotoShop's interface. If setting a font throws an error, chances are that that font's PostScript name is not the same as its menu name. For example, the PostScript name of the Gill Sans family is GillSans.
For the font name you must use the font's PostScript name, which is not
necessarily the same as the menu name used in InDesign's or PhotoShop's
interface. If setting a font throws an error, chances are that that font's PostScript
name is not the same as its menu name. For example, the PostScript name of
the Gill Sans family is GillSans.
but it does not work with Webdings, Wingdings, or Lithos Pro Black! I guess this is just a fault in ScriptUI itself.
(I can't check right now but in theory my Martens font should work ...)
Jongware, that's right, I tried different fonts too and some work, some don't. I didn't know about the postScript name. I checked PS and it has a TextFont.postScriptName, ID also has a font.postScriptName property. And as you already guessed....Illustrator does not have such property.
so for the Webdings font (the one I was originally interested in) I went to PS, retrieved the postScriptname and Style, used that in Illustrator and....same results...did not work.
this works perfectly in PS, but not in illustrator, and surprisingly it does not work in ID either.
var w = new Window("dialog"); var s = w.add("statictext", undefined, "0123"); s.graphics.font = ScriptUI.newFont ("Webdings", "regular" , 12) w.show();
oh, and sorry for hijacking your thread.
Message was edited by: CarlosCanto
Europe, Middle East and Africa