Jump to content
Sign in to follow this  
karri

Do we need a relative font tgi-driver also?

Recommended Posts

The Lynx font is currently 8 by 8 monospace. For RGP's with more text a better font might be good.

 

Any comments on his one?

 

post-2099-0-54538300-1354087536.png

  • Like 1

Share this post


Link to post
Share on other sites

Is there a possibility to add resource of some sort that allows a dev to create and link his own font file and indicate the resolution (if necessary)? That way we di not have to create our own tgi if we want a different font.

Share this post


Link to post
Share on other sites

I played around with fonts a little more. Here is an Atari style font https://bitbucket.org/karri/atari

 

And a screenshot:

 

post-2099-0-39213800-1356333759_thumb.png

 

For this you can grab the file atari.s from the repository. The call is tgi_atarixy(int x, int y, char *msg)

  • Like 2

Share this post


Link to post
Share on other sites

I just committed an Arial font into https://bitbucket.org/karri/arial

 

It is prettier but uses more pixels.

 

post-2099-0-26095800-1356564112_thumb.png

 

As usually you just need arial.s from the repository to use it.

 

As the size of characters are no longer multiples of 8 you cannot use color index 0 for printing characters as you can with the standard font.

 

So just use tgi_color(COLOR_DARKBROWN) to get the results shown here.

Edited by karri

Share this post


Link to post
Share on other sites

Very useful as always. I think it is very valuable to have just a single .s file for resources. Can your sp65.exe tool also works with .bmp files? Are pcx and bmp significantly different?

I have also created a new font with a second one on the way, but it is using the "old way" with the sprpck.exe tool. I'll refactor it using your new tool and also create .s files. I'll ask the maker of the fonts if it is OK to upload them.

 

BTW, there is no tgi_getbgcolor function, but that might be a nice addition to the lynx lib. ;)

Edited by LX.NET

Share this post


Link to post
Share on other sites

As the size of characters are no longer multiples of 8 you cannot use color index 0 for printing characters as you can with the standard font.

 

So just use tgi_color(COLOR_DARKBROWN) to get the results shown here.

Curious to hear and understand why this is the case? You are using literal 1-bit pixel data. How does the multiples of 8 relate to the color index 0?

Share this post


Link to post
Share on other sites

The literal pixels will always paint the background for every pixel until the end of the byte. If the background is not transparent you end up having a lot of strange areas painted to the right of the character.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...