Japanese Katakana OpenSCAD Bitmap Fonts Module
13
Likes
278
Downloads
481
Views
Published on July 20, 2011
Derived from
OpenSCAD Bitmap Fonts Module
by tbuser
Description
Have Japanese katakana written on your things!
Instructions
You can find more details/pictures here: myshumi.net/2011/07/20/japanese-bitmap-for-openscad/
The same way as with tbuser's original bitmap, you save it in the same folder as your OpenSCAD project and include . You just gotta insert the following lines into your project:
include
block_size = 2;
height = 2;
chars = ["ra","bu"];
char_count = 2;
8bit_str(chars, char_count, block_size, height);
The block size is the size of each bit forming the letter, in mm. Remember each letter has 8x8 of them ;) The height is the thickness of the letters in the perpendicular direction and the char_count is the total number of characters you're writing. The line with 8bit_str is your object, you can rotate, translate and do anything you want with it in the middle of your design.
Now, the chars... OpenSCAD doesn't seem to support Japanese characters, so I made the input as romaji (Roman alphabet - this one right now). Katakana is syllabic, so most "chars" will have 2 letters. You can find a table of the char you can write to get each katakana in the link above.
Certain syllables require 2 katakanas, like cha, nya, ja... So to write rya (リャ) for example, you use ri + little ya: "ri","lya". If you write "rya" it won't come up, so be careful! Also notice that you can choose how to write some characters, shi (シ) can be "si", "ci", "shi" or "sh" (the options are mostly based on the way you'd type katakana on a keyboard).
Oh, and I've kept the capital letters and other symbols from tbuser's original bitmap.scad, I've only deleted the small letters because they overlap some romaji I'm using, so if you want to mix some alphabet in, use caps.
And finally, I've also made a file for writing vertically, since it's very common in Japanese. Actually I use it in English as well, but Japanese requires more than just swapping x and y coordinates. In vertical katakana, the nobasu line which makes syllables long is vertical, and the position of the tiny ya, yo, yu, etc. are a bit higher, so I made these changes as well.
You can see some examples of words you can write on my blog, and I might be able to help you write other stuff, just leave a comment here :)
The thumbnail picture has メーカーボット (meekaabotto, i.e. makerbot) written on it :)
The same way as with tbuser's original bitmap, you save it in the same folder as your OpenSCAD project and include . You just gotta insert the following lines into your project:
include
block_size = 2;
height = 2;
chars = ["ra","bu"];
char_count = 2;
8bit_str(chars, char_count, block_size, height);
The block size is the size of each bit forming the letter, in mm. Remember each letter has 8x8 of them ;) The height is the thickness of the letters in the perpendicular direction and the char_count is the total number of characters you're writing. The line with 8bit_str is your object, you can rotate, translate and do anything you want with it in the middle of your design.
Now, the chars... OpenSCAD doesn't seem to support Japanese characters, so I made the input as romaji (Roman alphabet - this one right now). Katakana is syllabic, so most "chars" will have 2 letters. You can find a table of the char you can write to get each katakana in the link above.
Certain syllables require 2 katakanas, like cha, nya, ja... So to write rya (リャ) for example, you use ri + little ya: "ri","lya". If you write "rya" it won't come up, so be careful! Also notice that you can choose how to write some characters, shi (シ) can be "si", "ci", "shi" or "sh" (the options are mostly based on the way you'd type katakana on a keyboard).
Oh, and I've kept the capital letters and other symbols from tbuser's original bitmap.scad, I've only deleted the small letters because they overlap some romaji I'm using, so if you want to mix some alphabet in, use caps.
And finally, I've also made a file for writing vertically, since it's very common in Japanese. Actually I use it in English as well, but Japanese requires more than just swapping x and y coordinates. In vertical katakana, the nobasu line which makes syllables long is vertical, and the position of the tiny ya, yo, yu, etc. are a bit higher, so I made these changes as well.
You can see some examples of words you can write on my blog, and I might be able to help you write other stuff, just leave a comment here :)
The thumbnail picture has メーカーボット (meekaabotto, i.e. makerbot) written on it :)
You must be logged in to post a comment.
Kepler
on
July 20, 2011
said:
May I suggest you use http://www.thingiverse.com/thi... to make the sign even nicer and avoid having to paint it?
chapulina
on
July 20, 2011
said:
Cool, I should try using Inkscape someday, maybe I can make some nice looking kanji 8-)
I'll try printing out some letters here separated from holes to see how they fit together, just increasing the block size a bit should do the trick for the holes :) The sad thing is I only have black and white plastic, so it won't turn out as interesting as my painted ones... Thanks for the tip!
License
Japanese Katakana OpenSCAD Bitmap Fonts Module by chapulina is licensed under the Attribution - Non-Commercial - Share Alike license.

So I try your example code but I get a parse error in line 2... help!
Never mind.. got it.