Do you want to see custom font support for the CE in ICE programs?
Yes
 66%  [ 12 ]
No
 11%  [ 2 ]
I'm undecided, I either don't use ICE or don't have a CE
 22%  [ 4 ]
Total Votes : 18

I’m thinking of making a custom font for the CE, using sprites and placed in a program, which you can “include” by using the AsmComp( token. As of now, I’ll have A-Z, a-z, 0-9. I want to get those done before I move on to other characters. I’ll probably use a BG color that can just be set as a transparent color, I’ll have to see what I can come up with. All the sprites are 10x10, converted with ConvPNG.

EDIT: Transparent color is 254, text color is 7, iirc


Ideas, suggestions, etc.? Post then below!

(I’ll be working on this after school lets out, btw)



An example of usage:
NOTE I should have said this before, but this font is for use in ICE programs, text scaling can be achieved by scaling sprites, although that would be kinda hard, considering that my font prgm will have ~60 pointers (1/character)... It's still in the concept phase... We'll just see how the ball rolls!


Code:
PROGRAM:EXSRC
[i]CFONTEX
AsmComp(CFONT
Begin
Sprite(S,0,0
Sprite(M,10,0
Sprite(EIGHT,20,0
Sprite(FOUR,30,0
Sprite(C,40,0
Sprite(E,50,0
Sprite(EXL,60,0
Sprite(PLUS,70,0
Sprite(I,80,0
Sprite(C,90,0
Sprite(E,100,0
//prints "SM84CE!+ICE"
...
det(1 //End, gfx_End(); for all you C peeps :P


I admit... most of this is based on the TI-83 font...

Don't you think that typing out all those "Sprite("s and coordinates is a bit tedious? You should try to make it easier, but with ICE, I don't know how. beckadamtheinentor made a few libraries that work the same way, and you should ask him if he has any ideas. (Of course, ask PT_ as well!) Good luck!

Also, det(1 is "End", if you type the stuff out.Keeping things consistent! *hides
jcgter777 wrote:
Don't you think that typing out all those "Sprite("s and coordinates is a bit tedious? You should try to make it easier, but with ICE, ...


I agree, but you could just use SC or OS 5.3 and copy & paste the "Sprite(" or "det(57,", which is what I did when I typed out my example code. You'd actually take the time to do this if you wanted custom fonts...
Knowing the coordinates is also difficult, and you have to keep adjusting to get them right since they're sprites. Also, what if you wanted to type a paragraph? Would you have to copy paste a ton of "Sprite"'s, a ton of blank spaces, and other things? All of those "Sprite("'s and whatnot would take up a ton of space. It's just not efficient. You should just ask PT_ to implement different fonts in the compiler itself, since this would be very hard to use. If you manage to find a way to make this easier, that'll be a great achievement in ICE! (Tell PT_ to add external plug-ins to ICE. And then make this a plug-in)
Why don't you create an actual font with SetCustomFontData( ? That is much faster than displaying sprites all the time, and saves much space. If you don't understand that command, you can always ask me.
Oh yeah... That exists Razz

How, exactly does it work? I'll probably need a LOT of documentation...

***SM84CE hides
My real motivation for this was for headers, not for people to type an ENTIRE paragraph... If you're doing this, you must REALLY like my custom font, or you're just crazy... I also wanted to make this so I could support chars that need ICE's putChar to be displayed, and some chars that aren't available in a string, like

θ°π→ʟ… etc. (and anything else you guys feel like adding on, I'm done with uppercase letters and θ)

And for the coordinates: You'll be checking placement of normal text anyway, and not must math is needed (I specifically made all font chars 10X10 [so more like a monospace font] for that reason, so centering would be <math>((10*num_of_chars)-320)/2</math> would be the X coordinate of the 1st char, all the rest would just increase by 10. The Y would remain constant, so storing it to a variable before would help)
SM84CE wrote:
How, exactly does it work? I'll probably need a LOT of documentation...

Each character is 8x8 pixels, meaning we need 8 bytes per character (top row = 1 byte, second row = 2nd byte etc). Then put everything after each other and pass it to SetCustomFontData, and voila. If you still don't understand, just ask me, I know everything ICE-related. Rolling Eyes
well NO DOH! you made the dang thing Razz

so a 0 could be:

11111111
10000001
10000011
10011101
10111001
11000001
10000001
11111111


What's the order of the characters? Can my font have ° or …? That's the reason why I started this...

or do I need to convert to hex? If so, I'll whip up a batch converter in BASIC (DEC to hex/bin, etc, and maybe upload it to the archives)

I'll probably just go on with my sprite-based font too, bc I want to see how it comes out. And when I upload it, I'll add some sort of warning that says that this should only be used with headers as it needs a lot of copy/pasting, etc.
SM84CE wrote:
well NO DOH! you made the dang thing Razz

so a 0 could be:

11111111
10000001
10000011
10011101
10111001
11000001
10000001
11111111


What's the order of the characters? Can my font have ° or …? That's the reason why I started this...

or do I need to convert to hex? If so, I'll whip up a batch converter in BASIC (DEC to hex/bin, etc, and maybe upload it to the archives)

I'll probably just go on with my sprite-based font too, bc I want to see how it comes out. And when I upload it, I'll add some sort of warning that says that this should only be used with headers as it needs a lot of copy/pasting, etc.


The order of the characters in ICE is pretty much just standard ascii.

The first 32 character codes are control codes (they are still able to be displayed though), so you might be able to put some look-alikes to os characters in those. Idk if the last 128 characters are part of the ICE character font though, so you might be able to have even more, without causing compatibility issues with other fonts.
So don't change the look of the main codes (32-126) too much Razz the rest should be fine to make look however you want.
I've decided, for ease of use and minimization of compiled prgm size, to make the fonts into separate programs, or "packages". I currently have ALPHA (A-z, theta, a-z), NUM (0-9, doh), and Special (anything else). I'll probably add MATH (all of the math symbols, etc.). I made the ini files flexible (they convert ALL PNG's inside the folder), so adding packages/ other modifications shouldn't be too hard. I also made a batch file to do it all, so I'm prepared for community suggested mods!
*bump* is this still being worked on?
johnbchron wrote:
*bump* is this still being worked on?

There's no point because SetCustomFontData() exits.
oh nevermind i must not have understood.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement