Convert text string to custom letters from blocks

Convert text string to custom letters from blocks

rhgrafix
Enthusiast Enthusiast
3,769 Views
42 Replies
Message 1 of 43

Convert text string to custom letters from blocks

rhgrafix
Enthusiast
Enthusiast

Does anyone know of a macro to convert text strings to premade blocks of a home made font? Like A. Werning's 3dtext but much simpler as 2d. Thanks!

0 Likes
Accepted solutions (1)
3,770 Views
42 Replies
Replies (42)
Message 2 of 43

Kent1Cooper
Consultant
Consultant

We used to have a program called LetterEase, many years ago [talking DOS days], that used dedicated specialized .shx fonts, had Block versions of all the characters in them, and could do that kind of thing [among other interesting things like kerning, using invisible spacing-adjustment special characters and a comparison of adjacent characters].  I don't know whether it's still out there, I don't have it any more after many software and hardware upgrades, and if I did, it likely wouldn't be compatible with newer operating systems, etc.

 

I assume what you're asking is to Insert a Block in place of each character in a text string, and in the same place and size and orientation where that character falls in the text -- is that right?  If it should be possible to figure out a way to do that, what are the Block names like, and where are their insertion points relative to their drawn elements?  Maybe a first character replacing Left-justified Text could use the Text object's insertion point, but beyond that [especially when it comes to Mtext], finding insertion points is probably the big challenge.

Kent Cooper, AIA
0 Likes
Message 3 of 43

ronjonp
Advisor
Advisor

THIS could maybe be a start for you.

0 Likes
Message 4 of 43

pendean
Community Legend
Community Legend
@ronjonp OP wants exploded text drawn as closed Plines (or blocks) I believe.
Try the LISP they are referring to (I did not, it may or may not still work) https://cadtips.cadalyst.com/create-text/3d-text?q=create-text/3d-text&print=1
0 Likes
Message 5 of 43

ronjonp
Advisor
Advisor

@pendean  If that's the case then Sean's T2G should do the trick ( for part of the problem ). You can't pick the text in the drawing but it creates awesome outlines of text characters.

0 Likes
Message 6 of 43

Sea-Haven
Mentor
Mentor

You posted over at cadtutor as well, and in the same vauge way, need more info. 

 

T2G sounds like what you want.

 

 

 

 

 

 

0 Likes
Message 7 of 43

rhgrafix
Enthusiast
Enthusiast

That's a nice macro but I have specific blocks made, each letter is a block, a home made font made of polylines, I'm looking for something that will read a text string and just put each block in place of each letter, kerning (spacing) is not real important, I can use ortho and adjust them a bit. The closest thing I've seen is A. Werning's 3dtext:

https://cadtips.cadalyst.com/create-text/3d-text

except I don't need them extruded and don't need it to be able to edit converted text.

Thanks.

0 Likes
Message 8 of 43

rhgrafix
Enthusiast
Enthusiast
That won't work, has to be my blocks, thanks.
0 Likes
Message 9 of 43

rhgrafix
Enthusiast
Enthusiast
You understand what I'm needing but yes, it would have to be more modern
code. Thanks.
0 Likes
Message 10 of 43

rhgrafix
Enthusiast
Enthusiast

All that does is convert an existing font to polylines, I have a special font that I need to use.

0 Likes
Message 11 of 43

rhgrafix
Enthusiast
Enthusiast

It's not vague at all, and you seem to be assuming that all the same people visit both forums, its not so. I don't know what your image was, it's blank. Are you more into policing than helping?

0 Likes
Message 12 of 43

Sea-Haven
Mentor
Mentor

The image appeared for me when I posted. 

 

If you can work out how to make True type fonts then it will all happen automatically. There was a package with hundreds of symbols each symbol was a single character representing a sign and it respected the text spacing. There was 8 different styles, So typing abcdefg.. would produce this as its TTF can use in word and excel as well.

 

Which is what you want !

 

screenshot332.png

 

0 Likes
Message 13 of 43

Kent1Cooper
Consultant
Consultant

@rhgrafix wrote:
You understand what I'm needing ....

Then as a start, and to start to answer certain questions, try BlockChart-Rows.lsp, available >here<.  If you have a folder with all those Blocks and only those Blocks in it, the BC command defined in that routine will put them all in, in rows, ensuring they don't overlap.  See comments in that thread and at the top of the file.

 

The questions are things like:

 

Do you want [as I would assume] the Blocks to not overlap, as that command will place them?  Or do you want each Block to fall at the position of its letter in the source Text string, regardless of overlap?  [I suspect the latter would be much harder to work out.]

 

Are the Blocks all of similar size, in the way that characters within a font are, or is scaling something that needs to be taken into account?

 

What are the Block names like, and what is their relationship to the characters in a source Text string?  Can the characters' ASCII codes be used to relate to the Block names?  Would changing the Block names [for instance, so that they are the ASCII code numbers] be a possibility?

Kent Cooper, AIA
0 Likes
Message 14 of 43

DentonYoder
Enthusiast
Enthusiast

It sounds like you are just trying to type text...

Set the font to your block font.

Type Dtext, pick where it goes and size / orientation

type a

b

c

d

e

.

.

.

Is that what you want?

0 Likes
Message 15 of 43

rhgrafix
Enthusiast
Enthusiast

That would work if I could only spell one word: "abcdefg...". This is turning into something I didn't expect. I'm going to download a free font creator and do it that way, I had no idea it was this hard to replace letters with custom font letters, am I really the first in the world to need this? Unbelievable!!

0 Likes
Message 16 of 43

ronjonp
Advisor
Advisor

Can you provide a drawing with before and after? Albeit I have not followed this whole thread super close, what you are explaining now is not even close to what I thought you wanted.

 

Individual characters set to custom fonts in MTEXT. 🤔

ronjonp_0-1612908450680.png

 

 

0 Likes
Message 17 of 43

DentonYoder
Enthusiast
Enthusiast

Are you just trying to create your own font?  The compile command will convert an shp file into an shx font.  I think I remember a program from ~ 30 years ago where you would draw a group of boxes 100 x 100, and draw your characters in each box.  But I don't remember the name.

0 Likes
Message 18 of 43

Kent1Cooper
Consultant
Consultant

@rhgrafix wrote:

.... This is turning into something I didn't expect. I'm going to download a free font creator and do it that way, I had no idea it was this hard to replace letters with custom font letters, am I really the first in the world to need this? Unbelievable!!


It may not be so hard to replace them with custom font letters, but that's not what you asked for -- it's your desire to replace them with Blocks that makes it so challenging.  Text content and Blocks are just hugely different kinds of things.

Kent Cooper, AIA
0 Likes
Message 19 of 43

Sea-Haven
Mentor
Mentor

As I posted Ausfonts has hundreds of characters and using TTF so you type A and a stop sign appears. Which is basically what is wanted.

 

Ok type abcd and 4 blocks appear not that hard you would just have a cond that looks at each character, as part of the cond would have a width factor 

(cond

((= char "a")(setq bname "Blocka" wid 1.12))

 

And then insert and apply the next start point based on the width. Obviously will not match text width.

 

For ausfonts its part of the font definition. Some of the signs are like 4xwidth. One drawback with say TTF is you must supply the TTF if forwarding to someone who may edit the drawing.

 

 

 

 

0 Likes
Message 20 of 43

rhgrafix
Enthusiast
Enthusiast
I explained in detail 3 times.
0 Likes