程式的做法分兩步。先量字:把文字框裡每個不同的字,用 100 像素的粗體新細明體畫在 100 × 100 的白底上,把所有像素的灰階加起來,得到這個字有多黑,0 是全黑、255 是全白。再印圖:圖片縮到 500 像素以內,每個像素算灰階,挑一個黑度最接近、又不比像素更黑的字,一列像素接成一行字,最後存成 Result.txt,叫記事本打開,要把字型大小調到 1 或 3,圖才看得出來。程式裡有一個「對比度」滑桿,把每個字和白色之間的差距放大,預設是 1.5 倍。
預設的字是 12 個:全形空白、「,」「。」、一、十、下、米、田、哲、期、龍、䶵。程式碼裡被註解掉的舊版是手動分級:大於 250 用全形空白,大於 200 用「‧」,往下依序是一、十、米、田、哲、期、龍,最黑用䶵。後來改成自動量。
The program works in two steps. First it measures the characters: every distinct character in the text box is drawn in 100-pixel bold 新細明體 on a 100 × 100 white bitmap, and the greyscale of all its pixels is added up to give how dark it is, 0 being black and 255 white. Then it prints the picture: the image is shrunk to within 500 pixels, every pixel gets a grey value, the character whose darkness is closest, and not darker than the pixel, is chosen, a row of pixels becomes a line of characters, and the result is saved as Result.txt and opened in Notepad, where the font size has to be set to 1 or 3 for the picture to show. A "contrast" slider scales up the gap between each character and white, 1.5 times by default.
The default characters are 12: the full-width space, ",", "。", 一, 十, 下, 米, 田, 哲, 期, 龍 and 䶵. The commented-out older version in the code was a hand-made scale: above 250 a full-width space, above 200 "‧", then 一, 十, 米, 田, 哲, 期, 龍 going down, and 䶵 for the darkest. Later it was replaced by automatic measurement.
