posts tagged with the keyword ‘text’

2016.01.27

Text

I’ve been using computers for over three decades now, and about two of those decades have been professionally, you know, as part of my job for work. When using a computer I like to get things done, like, fast.

Back when I used Macs in the pre-OS X era I used BBEdit, which doesn’t suck, and along with the Finder of the day, I could do things really fast. I could edit files fast, and I could manage files fast. It was good.

Eventually I moved to Mac OS X, and found jEdit and things were slow at first. I even mentioned that it seemed like I was using a computer with gloves on. Things got faster.

Sometimes I see people use a computer and I get twitchy watching them try to select some bit of text, not starting at the end, or not double or triple clicking, or even just trying to retype some code instead of copying and pasting it.

I wonder if I could teach a class on using computers quickly, at least for dealing with text…

Of course I’ve also learned how to use find/replace, including regex, and tons of terminal tricks to deal with text and files and the like. And there’s still a ton I don’t know! There’s *nix tools that I could probably add to my toolbox to do things even more efficiently.

Anyway, if you feel like you could use a computer faster, you probably could. Really, in the old days we spent time waiting for computers, but if you’re dealing with text, chances are the computer is sitting around waiting for you.

2014.11.28

I needed a single stroke font for some laser cutting. You’d think that would be an easy thing… Well, keep reading.

When laser etching, any font could be used. You can raster etch the type, or “vector etch” the type. Raster etching takes a long time, and vector etching (basically doing a low-power vector “cut”) is fast. If you’re doing 3,000 pieces, the time can make a huge difference!

Regular font

Here’s a normal font in Inkscape. Fonts consist of an outline which is then filled with a color. In this case, the outline of the font is filled with black and you see what you normally see when viewing a font on a computer screen.

Regular font

Here’s the normal font with the fill set to none and the stroke (outline) set to a thin line. You could laser etch this (and some people do) but you’re now outlining the letters instead of just etching them with a single stroke. This is fine, but takes more time. Since going really fast is our goal, this doesn’t work.

At this point, you may be thinking “No problem! Our pals at Evil Mad Scientist Laboratories have us covered with Hershey text, and engraving font!” Indeed, Hershey text is awesome, but not always the right solution. I use Hershey text often, and it’s lovely, but let’s keep exploring…

CamBam font

I found these CamBam fonts, which probably work quite well for a spinning bit that is cutting material, but there’s an issue:

All the fonts are built using a 100% overlap in the font design, which tricks my TrueType font design program into thinking they are really looped TrueType fonts, when they really don’t have an inside and outside loop.

CamBam font

A spinning bit cutting material is quite different than a laser cutting material. If you use this font to laser etch, it will double up, which mean you’re lasering the same thing twice. This takes longer, and cuts your material twice. No good.

You can manually go in and delete the overlaps, but it’s a time-consuming pain, and you’ve got better things to do.

Machine Gothic

I found Machine Tool Gothic, which looks a bit weird when you first select it, but we’ll fix that. Remember that fonts are typically outlines that are filled with a color. That’s what is happening here.

Fixing Machine Gothic

We just need to set the fill to none, and give it a thin stroke. Much better! We’ve nearly got our clean single-stroke engraving font.

Fixing Machine Gothic

Let’s fix the weird lines that connect everything and close the paths. First you’ll want to convert the type to outlines (that’s the “Object to Path” command in Inkscape) and then select the two nodes at each end of the line you want to delete and use the “Delete segment between two non-endpoint nodes” feature to remove the line.

Fixing Machine Gothic

Oh, it’s worth noting that when you convert the type to paths, you lose the ability to edit it as type. More on that later. Here’s the “L” with no extra line connecting everything.

Now, it may look like only certain letters need the extra line deleted, but they all do. Go through each letter to delete the extra lines! If you’re doing a one-off project this may not matter as much, but if we are laser cutting 3,000 pieces, even an extra 5 or 10 seconds per piece will make a huge difference.

Type on a curve

Here’s the real reason I wanted to use an editable typeface rather than the Hershey text extension. With text, you can place it on a path. This means you can curve the text onto a circle or some other shape. We want to make sure we’ve got the text exactly as we want it before removing the extra lines. (Remember that we need to change the editable type into outlines before we remove those extra lines.)

Type on a curve

Don’t forget to remove the circle, or whatever path you used to place your text on.

Type on a curve

Fire up the laser! Here’s our clean and ready to vector-etch single-stroke type.

2011.06.23

I’ve been known to deal with captchas over the years, but today while posting something on Facebook, I got one that made me pause…

captcha

Well that’s new! I’ve never had one with the text flipped upside down before… but in the world of captchas, there’s always room for improvement.

Being a smart-ass literal person, I headed over to fliptext.org to make sure I got it right. I mean, I didn’t want to just type in “they” right-side up, as that wouldn’t be correct. (Right?)

There we go… Confident I successfully entered the words in the captcha, I hit submit.

And it worked.

I wasn’t sure whether to be surprised or satisfied.

But I was left wondering if just typing in “they” right-side up would have worked.

2011.05.10

WordCram

Today in Processing we won’t even show you a sketch, but we will talk about Processing, and sharing, and code.

So part of the fun of doing this “Processing Month” thing has been in sharing my exploration. Make no mistakes, I’m not an expert at Processing, not even close… I’m pretty much a newbie. That’s OK though, because I like to learn as I go.

It seems strange that it’s only been a week since I posted my Overlapping Ovals sketch, because I’ve already learned things since then, and would do it differently today. Lucky for me, a guy named Dan Bernier left a comment. And it was encouraging. And he left a link that pointed me to WordCram.org, which is described as: open-source word clouds for Processing.

So I grabbed WordCram and tested it out. (The results are in the image above.)

After installing the WordCram library, I took a look at the examples, and took the first one (firstnamesUsingWordPresets) and tweaked it just a bit, and fed it my own word list. My list consisted of the tags from this blog, and the number of times they appear. (See the file here.) I did remove any words that were only used once.

If you’re intimidated by Processing, you shouldn’t be… it’s fairly easy to get started, and there are lots of great example sketches out there. If that’s not enough, I hear that some guys in Milwaukee are planning a Processing class to help get other folks up to speed. :)

Stay Tuned!

2010.09.02

I recently worked on a project that required making audio files out of text files, which is something I’ve done before, but haven’t done regularly since 2000 or so when I was making cassette tapes of web pages. There’s a simple way to do this using Mac OS X.

Keyboard System Preferences

Open you System Preferences and go to Keyboard and select the Keyboard Shortcuts pane. Click on Services and scroll down to Text until you see Add to iTunes as a Spoken Track and check that box.

TextEdit

Now open TextEdit and select some text and control-click (or right click depending on your computer input device) and you’ll see a contextual menu item for Add to iTunes as a Spoken Track. Select it.

iTunes

Now jump over to iTunes and you’ll see the track. It’ll be called Text to Speech.

M4A audio file

In iTunes you can highlight your track and select the File menu and then Show in Finder (or just hit command-R) and the Finder will open the folder containing your file. It’s an MPEG-4 Audio file (also known as an AAC file) with an m4a extension.

ITunes can obviously convert the file to an MP3 for you, but if you want another format (like OGG) you can use Audacity. You should be able to do whatever you need to do with it from there, (And that whatever you need to do with it bit was the deciding factor for this specific project.)

I was really hoping to use an existing test-to-speech API on the web to automatically generate the audio. Google has an unofficial Text-To-Speech API (go on, try it.) Seeing as it’s “unofficial” and didn’t work in the way I wanted to use it, and there is an awesome group where people ask about APIs and ToS and no one answers, I skipped it.

AT&T also has a great text to speech demo online, which clearly spells out how you can’t use it, which is quite helpful. (Basically you can’t use it for anything public or commercial, which sucks, but I’m glad they come right out and say it.)

There are other options (almost all commercial) including services like iSpeech, which I may look into. There may be some open source text to speech options, but as to how good they are, or how easy they are to get up and running, that is yet to be seen… or heard, as it were.

(Note: I’ve got a follow-up post coming about Mac OS X Text to Speech via the command line.. stay tuned!)

|


buy the button:

Buy The Button