![]() |
#1 |
Coding fuzzball
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 16
Karma: 38918
Join Date: May 2012
Device: Kindle Touch
|
[Kindle Touch] Text output demo
Hi,
I've started making the first steps towards the terminal emulator I'd like to write :3 This is a demo of text output, also showing the bitmap font I created for it. The program shows some text, and counts the number of times you have touched the screen. You can do a full-refresh of the screen by releasing a touch in the top left, and you can exit the program by releasing a touch in the top right of the screen. I have been compiling with: tccmake main -lpthread Using the tcc package from Geekmaster's simple guide to tcc: https://www.mobileread.com/forums/sho...d.php?t=175834 Enjoy :3 Joppy Furr |
![]() |
![]() |
![]() |
#2 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Interesting... I was working on my terminal emulator code again last night too... Competition is good because it stimulates improvement, then later we can borrow the best of each other's ideas for more improvements.
![]() EDIT: I am a little curious though, why did you "create" your OWN bitmap font, when there are so many good public domain bitmap fonts that you can just copy/paste? And, for a table as large as a character map, why did you only store ONE BIT per byte? I am also curious just how you were able to create that many characters containing that many pixels, and type them all into a C program accurately in such a short amount of time... What tools did you use to create a font so quickly that is indeed completely your own with no credit to share with others? If you really wanted your font pixels packed just one bit per byte and you do not have problems with giving others credit for their work, couldn't you just write a quick little C program or script to unpack a public domain font and output your bit table to stick into your program? Last edited by geekmaster; 05-18-2012 at 04:09 PM. |
![]() |
![]() |
![]() |
#3 | |
Coding fuzzball
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 16
Karma: 38918
Join Date: May 2012
Device: Kindle Touch
|
Quote:
As far as using only one bit per byte, I wasn't thinking of that at the time. Perhpas I'll get around to improving that eventually, but now that I have text showing, the next things I'd like to work on are a keyboard, which I've made a start on, and then implementing the terminal itself. Once I have the basics working, then I'll go through and tidy it up, adding extra features as I do. I have a working font now, so will probably leave that alone until later. But once I've got the terminal working, I may eventually add support for opening a font file and UTF-8. |
|
![]() |
![]() |
![]() |
#4 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
The rules that I follow are 1) make it work, 2) make it small, 3) make it fast. Step 2 is where you pack your font bits. ![]() For free liberally licensed fonts, check out the Vera fonts. For vector fonts, check out the Hershey fonts. Also, for C programs, a great simple GUI method is IMGUI: http://sol.gfxile.net/imgui/ Or, if you want a more "professional" GUI that is C compatible, but event driven (to save battery), check out IUP from the lua creators. Last edited by geekmaster; 05-19-2012 at 02:24 AM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kindle Touch select text, copy paste? | Zimmy | Amazon Kindle | 3 | 02-18-2012 08:45 AM |
Kindle Touch - Using text-to-speech to pronounce individual words | nosfera2 | Kindle Developer's Corner | 0 | 02-10-2012 11:59 AM |
Kindle Touch Won't Share Text from Personal Documents? | daletsteele | Amazon Kindle | 0 | 12-27-2011 11:53 PM |
Demo: Jetbook mini official demo | bookwarm | Ectaco jetBook | 36 | 09-21-2010 12:18 PM |
Minority Report multi-touch screen demo | Alexander Turcic | Lounge | 0 | 02-19-2006 09:06 AM |