Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
This project is ready for use. (3 May 2019)

Having previously complained about GRAPHX only supporting 8x8 fonts, I've finally gotten around to writing a better library for more complex text, called FontLibC. This new library supports variable-width fonts up to 24 pixels wide (it made for a nice inner-loop optimization) and 127 pixel high. Here's a sample, in two different fonts, showing additional vertical spacing enabled and colored text:


Currently supported features:
  • Compatible with, and indeed requires, GRAPHX's 8-bit mode
  • Glyphs up to 24 pixels wide
  • Fonts up to 127 pixels high
  • Foreground and background colors are different than GRAPHX's
  • Transparent background supported (not the same as GRAPHX's transparent color index!)
  • Provides a reasonable compromise between speed and powerful features:
    • Customizable control codes, including newline.
    • String drawing stops on reaching an unrecognized control code and you can get the address it stopped at using fontlib_GetLastCharacterRead().
    • Internal text window, allowing text to be automatically confined to a portion of the screen.
    • You can define an additional code point to use as a stop code. For example, you can set space as the stop code and then use fontlib_GetStringWidth() to figure out if the next word will fit on the current line.
    • You can configure additional blank space to print above and below each line of text. Extra spacing helps improve readability in large blocks of text.
    • Tip: You can force the glyph at code point 0 to print by passing 0 directly to fontlib_DrawGlyph().
  • Supports finding fonts in font packs---appvars that contain multiple related fonts---based on size and style parameters.
Check out the wiki for even more information.

You can start testing out FontLibC right now by getting it from GitHub.

Feedback Wanted
The executable says "program hasn't been downloaded much and may be dangerous".
ShinyGardevoir wrote:
The executable says "program hasn't been downloaded much and may be dangerous".


That's probably because it hasn't been downloaded much..
ShinyGardevoir wrote:
The executable says "program hasn't been downloaded much and may be dangerous".
Yes, it's literally saying the program is new and hasn't been verified as being safe. You're welcome to download the source yourself and build the program yourself if you don't trust me. But I'm not spending a couple hundred dollars for a signing certificate to make that message go away.
Quote:
up to 24 pixels wide (it made for a nice inner-loop optimization) and 127 pixel high

complains about wanting 128x128 character glyphs and makes FontLibC-2000
Nice work Smile
I've finally finished all major features and documentation! FontLibC is ready for use in your projects. Check out the wiki for more information.
  
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 GMT - 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