Text to .bmp

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Text to .bmp

Post by fmw42 »

Try using Wordpad and not Notepad and select UTF-8 no BOM, if it has it.
246246
Posts: 190
Joined: 2015-07-06T07:38:22-07:00
Authentication code: 1151

Re: Text to .bmp

Post by 246246 »

dnorton wrote:Took the new lines out, saved it from NotePad with encoding: ANSI, ran your convert and got what appears to be the desired glyphs, that is *without* anything prepended. Now I'll try to make a strike font out of it.
If your charset range is limited to 0x0000 - 0x00FF, that would be OK.

[EDIT]
At a quick check IM works fine whether the input text is latin-1 or UTF-8 without BOM.
dnorton wrote: Tried successively removing characters at the front until I lopped off the blank (ascii 32) but the prepended thing stubbornly remains. My Form class>>fromBinaryStream: has firstByte = 66.
I don't understand what kind of loop are you trying to do, but
dnorton wrote:I'm building a strike font to include not only ascii 32 to 127 but also extended ascii 128 to 155. These are printable characters (maybe not all in courier) but in some other monospaced font. I need the glyphs for these characters. The technique will be applied to other fonts beside courier.
Probably you would like to create a printable character list directly analyzing from the ttf font. It is too complex and not the topic of ImageMagick, but freetype2 will be your help. FT_Get_Char_Index returns 0 for ‘missing glyph’. See http://www.freetype.org/freetype2/docs/ ... Char_Index
Last edited by 246246 on 2015-07-24T21:35:24-07:00, edited 2 times in total.
246246
Posts: 190
Joined: 2015-07-06T07:38:22-07:00
Authentication code: 1151

Re: Text to .bmp

Post by 246246 »

snibgo wrote:There may be something funny in your text file. With a file that contains ASCII 32 to 256, plus a new-line every 32 characters (file http://snibgo.com/imforums/ALPHABET.TXT )
Your ALPHABET.TXT binary seems to be broken at 0x91 0x92 0x93 0x94. :D
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Text to .bmp

Post by snibgo »

So it is. Thanks.
snibgo's IM pages: im.snibgo.com
Post Reply