[Cuis] Fixed-Width Font

Juan Vuletich juan at jvuletich.org
Sat Jul 25 16:31:18 CDT 2015


Hi Dan,

The format saved by image writer is not (currently) supported in Cuis, 
Squeak, etc. Maybe there is a command line option to tell imageMagick to 
use a more standard bmp format. Or you can just save in png. I opened 
them in Windows Paint, clicked on 'save' and then Cuis was able to read 
them.

Your xTables in the txt files are indeed wrong. For Courier12, the width 
of the bmp file is around 1500 pixels. And in the xTable you have 
entries calling pixels around x=2600. Impossible. Take a look at the bmp 
you generated count the width used by each glyph. It is 7 pixels wide. 
Your xTable is multiples of 12...

After fixing this 2 issues, I run your stuff and indeed it starts to 
run. It looks like a bit more work is needed in the xTable, though.

Cheers,
Juan Vuletich

On 7/24/2015 5:20 PM, Dan Norton wrote:
>
> Encouraged by this, I have tried cobbling a fixed-width StrikeFont 
> from Courier New which comes with Windows7. At this point, if some 
> kind of fixed-width smudges would appear then it would be progress. 
> Here's where I am:
>
> The immediate problem is an error: 'Unsupported format. Try 
> "Graphics-Files-Additional.pck.st".' which arises when ImageReadWriter 
> class>>formFromStream: examines the .bmp file.
>
> Higher in the context, Form class>>fromBinaryStream: has firstByte = 
> 66 which I mention because of the way the .bmp file was made. Here is 
> the process I used, from the bottom up:
>
> ImageMagick freeware produces the glyphs but with something stubbornly 
> prepended. The command line is:
>            convert -font \windows\fonts\cour.ttf -pointsize 12 
> label:@characters.txt courier12.bmp
>
> Using NotePad, save characters.txt with encoding: UTF-8.
>
> Paste the character string onto a NotePad
>
> Copy the character string.
>
> In a Cuis workspace print:
>            str := String new writeStream.
>            (32 to: 255) do: [ :n | str nextPut: n asCharacter]
>            str contents.
>
> Code package and files allegedly for courier strike fonts are attached 
> if you're interested.
>
>  - Dan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jvuletich.org/pipermail/cuis_jvuletich.org/attachments/20150725/797d695b/attachment-0004.html>


More information about the Cuis mailing list