Forums > Jitter

writing single-pixel fonts to jit.lcd?

January 19, 2008 | 1:30 am

I am working on an light-matrix system, and I am looking to write to
that using jit.lcd->jit.spill->out.
So far so good, only I can’t find the proper fonts to write ultra-small
stuff to jit.lcd, which is 16×16.
I can get "kinda"-small, but would prefer something in the
"single-pixel"-wide area (which would be like 3 point, I guess) – are
there any preferable fonts to use?

Also (and this bit is a bit embarrasing for me, I must say) I haven’t
found an easy way to scroll text using just jit.lcd. I would prefer not
having to resort to jit.rota or similar madness (which I usually do, but
I digress).
Would it be a case of: moveto xy, text, clear, moveto x2y2, etc?

‘oh, and this is for the continuation of this project:
http://www.youtube.com/watch?v=90EV0ovMzj0
thanks,
Andreas.



Dan
January 19, 2008 | 1:41 am

Try Silkscreen — it’s tiny and free. http://www.kottke.org/plus/type/silkscreen/

The video looks great!


January 19, 2008 | 1:46 am

On Jan 18, 2008, at 5:30 PM, Andreas Wetterberg wrote:

> Also (and this bit is a bit embarrasing for me, I must say) I
> haven’t found an easy way to scroll text using just jit.lcd. I
> would prefer not having to resort to jit.rota or similar madness
> (which I usually do, but I digress).
> Would it be a case of: moveto xy, text, clear, moveto x2y2, etc?

I might suggest checking out the c74:/java/help/StockWatch.help
example. There’s a "StringScroller" java class which you might even
be able to just use "out of the box".

-Joshua


January 19, 2008 | 2:03 am

Joshua Kit Clayton skrev:
>
> On Jan 18, 2008, at 5:30 PM, Andreas Wetterberg wrote:
>
>> Also (and this bit is a bit embarrasing for me, I must say) I haven’t
>> found an easy way to scroll text using just jit.lcd. I would prefer
>> not having to resort to jit.rota or similar madness (which I usually
>> do, but I digress).
>> Would it be a case of: moveto xy, text, clear, moveto x2y2, etc?
>
> I might suggest checking out the c74:/java/help/StockWatch.help
> example. There’s a "StringScroller" java class which you might even be
> able to just use "out of the box".
Awesome!

I am struggling to write directly to the lcd, since font and size setup
is a bit peculiar to me, I really dig the stockwatch, though.


January 19, 2008 | 2:12 am

Dan Winckler skrev:
> Try Silkscreen — it’s tiny and free.
> http://www.kottke.org/plus/type/silkscreen/
>
> The video looks great!
thanks!

Can you tell me how to select it in jit.lcd though? I don’t know which
font ID to use, and it isnt quite clear what the "specific" font name is
- the font file is called slkscr.ttf….

Thanks,
Andreas.



Dan
January 19, 2008 | 3:02 am

Don’t know offhand, sorry. if for some reason you can’t use it, you could roll your own font by drawing a series of dots, which would get you down to 5×5 pixels.


January 19, 2008 | 1:15 pm


January 19, 2008 | 8:34 pm

karl-otto von oertzen skrev:
> does this help a little ?
Wow, it helped HEAPS!

I have a font called "small fonts", that works wonders at low settings –
even readable at point-size 6, whereas silkscreen didn’t really cut it
at that size (anti-aliasing? It looked like it.)

Anyway, here is (more or less) a fully functional low-res scroller,
using "Small Fonts" – again, thank you all for the help:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N counter 1 16 -40;
#X flags 0 0;
#P newobj 558 257 76 9109513 counter 1 16 -40;
#P newex 558 234 28 9109513 sel 0;
#N counter 0 1;
#X flags 0 0;
#P newobj 558 210 66 9109513 counter 0 1;
#P newex 321 193 79 9109513 prepend set write;
#P newex 321 172 48 9109513 route text;
#P user textedit 321 147 446 169 32896 139 9 THANK YOU;
#P message 295 358 97 9109513 font "Small Fonts" $1;
#P number 533 310 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 487 310 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 3;
#P message 395 264 41 9109513 font "Small Fonts" 6;
#P window linecount 1;
#P hidden newex 395 215 48 9109513 loadbang;
#P hidden message 533 264 14 9109513 6;
#P hidden message 487 264 14 9109513 5;
#P hidden newex 395 236 148 9109513 t b b b b;
#P window linecount 3;
#P hidden message 437 264 49 9109513 frgb 0 0 0 , brgb 100 100 100;
#P window linecount 1;
#P newex 533 327 33 9109513 !- 16;
#P newex 450 352 84 9109513 pack moveto 0 0;
#P message 303 264 93 9109513 write THANK YOU;
#P user jit.pwindow 274 411 202 202 0 1 0 0 1 0;
#P number 225 289 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 153 289 66 9109513 tosymbol;
#P newex 153 316 110 9109513 pak font "Small Fonts" 6;
#P toggle 321 93 15 0;
#P newex 275 235 66 9109513 t b b b l clear;
#P newex 321 111 52 9109513 metro 33;
#P newex 275 386 99 9109513 jit.lcd 4 char 16 16;
#P user ubumenu 116 265 104 9109513 0 1 1 0;
#X add System;
#X add Terminal;
#X add Fixedsys;
#X add Roman;
#X add Script;
#X add Modern;
#X add "Small Fonts";
#X add "MS Serif";
#X add WST_Czec;
#X add WST_Engl;
#X add WST_Fren;
#X add WST_Germ;
#X add WST_Ital;
#X add WST_Span;
#X add WST_Swed;
#X add Courier;
#X add "MS Sans Serif";
#X add "MS Dialog";
#X add "MS Dialog Light";
#X add "MS SystemEx";
#X add Marlett;
#X add Arial;
#X add "Arial CE";
#X add "Arial CYR";
#X add "Arial Greek";
#X add "Arial TUR";
#X add "Arial Baltic";
#X add "Courier New";
#X add "Courier New CE";
#X add "Courier New CYR";
#X add "Courier New Greek";
#X add "Courier New TUR";
#X add "Courier New Baltic";
#X add "Lucida Console";
#X add "Lucida Sans Unicode";
#X add "Times New Roman";
#X add "Times New Roman CE";
#X add "Times New Roman CYR";
#X add "Times New Roman Greek";
#X add "Times New Roman TUR";
#X add "Times New Roman Baltic";
#X add Wingdings;
#X add Symbol;
#X add Verdana;
#X add "Arial Black";
#X add "Comic Sans MS";
#X add Impact;
#X add Georgia;
#X add "Franklin Gothic Medium";
#X add "Palatino Linotype";
#X add Tahoma;
#X add "Trebuchet MS";
#X add Webdings;
#X add "Estrangelo Edessa";
#X add Gautami;
#X add Latha;
#X add Mangal;
#X add "MV Boli";
#X add Raavi;
#X add Shruti;
#X add Tunga;
#X add Sylfaen;
#X add "Microsoft Sans Serif";
#X add AngsanaUPC;
#X add "Angsana New";
#X add BrowalliaUPC;
#X add "Browallia New";
#X add CordiaUPC;
#X add "Cordia New";
#X add DilleniaUPC;
#X add EucrosiaUPC;
#X add FreesiaUPC;
#X add IrisUPC;
#X add JasmineUPC;
#X add KodchiangUPC;
#X add LilyUPC;
#X add Aharoni;
#X add David;
#X add "David Transparent";
#X add FrankRuehl;
#X add "Levenim MT";
#X add Miriam;
#X add "Miriam Transparent";
#X add "Miriam Fixed";
#X add "Fixed Miriam Transparent";
#X add Narkisim;
#X add Rod;
#X add "Rod Transparent";
#X add "Traditional Arabic";
#X add "Arabic Transparent";
#X add Andalus;
#X add "Simplified Arabic";
#X add "Simplified Arabic Fixed";
#X add Kartika;
#X add Vrinda;
#X add "Bradley Hand ITC";
#X add "Freestyle Script";
#X add "French Script MT";
#X add "Juice ITC";
#X add "Kristen ITC";
#X add "Lucida Handwriting";
#X add Mistral;
#X add Papyrus;
#X add Pristina;
#X add "Tempus Sans ITC";
#X add "Wingdings 2";
#X add "Wingdings 3";
#X add "Bookshelf Symbol 7";
#X add "MS Reference Sans Serif";
#X add "MS Reference Specialty";
#X add "Studio Manager Big Font";
#X add "Studio Manager Dot Font 1";
#X add "Studio Manager ChFont";
#X add "Studio Manager Dot Font 3";
#X add OpenSymbol;
#X add Sydnie;
#X add "Bitstream Vera Sans Mono";
#X add "Bitstream Vera Serif";
#X add "Bitstream Vera Sans";
#X add "Lucida Sans";
#X add Silkscreen;
#X add "Silkscreen Expanded";
#X prefix_set 0 0 0;
#P button 116 214 15 0;
#P newex 116 239 41 9109513 fontlist;
#B color 5;
#P number 295 340 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P fasten 5 0 6 0 326 144 280 144;
#P connect 5 0 24 0;
#P fasten 5 0 27 0 326 144 563 144;
#P connect 2 0 1 0;
#P connect 1 0 3 0;
#P connect 3 1 9 0;
#P fasten 9 0 8 1 158 311 208 311;
#P fasten 10 0 8 2 230 310 258 310;
#P fasten 8 0 4 0 158 350 280 350;
#P fasten 23 0 4 0 300 381 280 381;
#P fasten 6 3 4 0 322 298 280 298;
#P fasten 6 4 4 0 336 298 280 298;
#P fasten 6 0 4 0 280 320 280 320;
#P fasten 20 0 4 0 400 381 280 381;
#P fasten 12 0 4 0 308 298 280 298;
#P fasten 13 0 4 0 455 381 280 381;
#P hidden fasten 15 0 4 0 442 317 280 317;
#P connect 4 0 11 0;
#P connect 0 0 23 0;
#P fasten 26 0 12 0 326 224 308 224;
#P connect 6 2 12 0;
#P connect 7 0 5 0;
#P connect 24 0 25 0;
#P connect 25 0 26 0;
#P hidden connect 19 0 16 0;
#P connect 16 0 20 0;
#P hidden connect 16 1 15 0;
#P fasten 6 1 13 0 294 335 455 335;
#P hidden connect 16 2 17 0;
#P connect 29 0 21 0;
#P connect 17 0 21 0;
#P connect 21 0 13 1;
#P fasten 14 0 13 2 538 349 529 349;
#P hidden connect 16 3 18 0;
#P connect 18 0 22 0;
#P connect 22 0 14 0;
#P connect 27 0 28 0;
#P connect 28 0 29 0;
#P window clipboard copycount 30;


January 19, 2008 | 10:58 pm

glad it works,
you may check http://www.dafont.com/bitmap.php for small pixel fonts, its true that smal fonts works pretty well.
did u try jit.gl.text2d , yu can et some pretty some readable results. but i am sure that s not what you are after as it be no use for your lemurian love :) …..

Quote: Wetterberg wrote on Sat, 19 January 2008 21:34
—————————————————-
> karl-otto von oertzen skrev:
> > does this help a little ?
> Wow, it helped HEAPS!
>
> I have a font called "small fonts", that works wonders at low settings –
> even readable at point-size 6, whereas silkscreen didn’t really cut it
> at that size (anti-aliasing? It looked like it.)
>
> Anyway, here is (more or less) a fully functional low-res scroller,
> using "Small Fonts" – again, thank you all for the help:
>


Viewing 9 posts - 1 through 9 (of 9 total)