14 Replies Latest reply: Apr 6, 2012 10:58 AM by CarlosCanto RSS

    Karel Martens glyphs font ;-)

    [Jongware] CommunityMVP

      Here is a small teaser image -- I would gladly upload the font itself but somehow I cannot log on to my site ...

       

      Screen Shot 2012-04-04 at 12.46.14 AM.png

       

      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!

        • 1. Re: Karel Martens glyphs font ;-)
          Monika Gause CommunityMVP

          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

          • 2. Re: Karel Martens glyphs font ;-)
            [Jongware] CommunityMVP

            Thanks, Monika! I've got to do something while the InDesign forum is down ...

             

            I'll keep an eye on my site and upload the font as soon as Normal Services are restored.

            • 3. Re: Karel Martens glyphs font ;-)
              [Jongware] CommunityMVP

              .. Scripting Illustrator is a frustrating business .. it took me about an hour to write a script to create this -- click image to see full size, or squint to recognize Your Friendly Neighbourhood Jongware!

               

              Screen Shot 2012-04-04 at 10.29.34 PM.png

               

              (Alas, my site is still locked. Still can't upload the font.)

              • 4. Re: Karel Martens glyphs font ;-)
                Monika Gause CommunityMVP

                I love your stuff!

                • 5. Re: Karel Martens glyphs font ;-)
                  [Jongware] CommunityMVP

                  .. the Illustrator icon Martenized ..

                   

                  Screen Shot 2012-04-04 at 10.44.28 PM.png

                   

                  (Boy is Javascript buggy & crashy on Illustrator! Has it always bin like that!?)

                  • 6. Re: Karel Martens glyphs font ;-)
                    CarlosCanto CommunityMVP

                    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

                    • 7. Re: Karel Martens glyphs font ;-)
                      Larry G. Schneider CommunityMVP

                      I assume that this is an attempt to reveal the man behind the mask? The evil genius with all the fun stuff. And I have to agree with Carlos, AI scripting is really lame.

                      • 8. Re: Karel Martens glyphs font ;-)
                        [Jongware] CommunityMVP

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

                        • 9. Re: Karel Martens glyphs font ;-)
                          emil emil Community Member

                          Great work!

                          kudos for sharing it

                          • 10. Re: Karel Martens glyphs font ;-)
                            CarlosCanto CommunityMVP

                            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.

                            • 11. Re: Karel Martens glyphs font ;-)
                              CarlosCanto CommunityMVP

                              ...I give up, I can't add regular "Webdings" to a ScriptUI statictext

                              • 12. Re: Karel Martens glyphs font ;-)
                                Muppet Mark Community Member

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

                                • 13. Re: Karel Martens glyphs font ;-)
                                  [Jongware] CommunityMVP

                                  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.

                                   

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

                                  • 14. Re: Karel Martens glyphs font ;-)
                                    CarlosCanto CommunityMVP

                                    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