Jump to content
IGNORED

How To Use A Font From Grom2GramFont


Recommended Posts

Hello, everyone!

 

I know what Grom2GramFomt does and how it does it. Very cool stuff. I'm just not clear on how to use it.

 

I've received some feedback about a project I'm working on, and using the "Digital" font from Grom2GramFont would be an ideal choice. I've read over the post that started with adding color and then created multiple font styles. What's not clear to me is how to call for the "Digital" (or any other font) with code in IntyBASIC. What do I type to make the test use a font from this file?

 

I considered that Grom2GramFont might need to be part of the INCLUDE statements. I think that since it is BASIC code, though, if I did that it would run the ROM that cycles through the fonts rather than just calling for one of them.

 

How do I make the magic happen?

 

Thanks!
Blaine

Link to comment
Share on other sites

I don't think you want to use Grom2GramFont. That program takes the built-in fonts from GROM, manipulates them to create italics and other variations, and copies them into GRAM.

 

I believe that what you are looking for is to create your own version of a font. This is not too hard, but I do not think there is a simple example for it in the IntyBASIC contributions library.

 

You will need to do the following:

  • Define your fonts as graphics cards. You can use BITMAP for this.
  • Load your fonts into GRAM by sets (IntyBASIC does not support loading GRAM with more than 16 cards at a time) during initialization.
  • Create a custom PRINT function that will take a string and print it using the GRAM characters instead of the built in ones in GROM.

If you load your fonts into GRAM in the same order as they appear in an ASCII table, then you can use a simple translation function between your string characters and GRAM cards.

 

Perhaps someone can provide some ready code for this.

 

-dZ.

Link to comment
Share on other sites

  • 3 weeks later...

Depending on how much text you have, you might not want to use that tool. That tool takes a GROM character and writes it to GRAM. One use case I can imagine for that is using a color number higher than 7 (to get gray and pastels) for text.

 

However, if you know the words you want to have in your game, and they are not going to be the built-in ROM text using a color from 0-7 (because if they are you can just use PRINT), you might want to consider Inty Letterpress (at https://intvprime.com/work/). Inty Letterpress is a Windows tool that uses a local filesystem directory of TrueType Fonts (ie not the ones in Windows), to type text on a 159x96 pixel "canvas" and then save the image to a .bmp. From there, you can use your favorite image editor to manipulate the image/text to a pixel multiple of 8, import with IntyColor, and have text that you can place on the screen.

 

You can see it in action on Youtube -

 

The Youtube is the closest thing to a full manual that you can find. Hopefully you'll find it intuitive. It does need an update, but it basically works.

 

I have a lot of text in a thing I am working on, and use my text editor to create all of the text and font specs, run the tool and "generate all" and have the text for the game, in graphics. You can see the text file (XML) used as the data store:

 

post-31694-0-86342500-1546619824_thumb.jpg

 

The advantages

  1. Easy to keep track of all intended text for the game (there is a lot of text)
  2. Easy to keep track of the typeface used (TTFs are in filesystem and not Windows)
    1. Intellivision viewable fonts are "tiny" and tend to look bad in a modern OS.
    2. Fonts used in modern OS GUIs are waaaaay too big to be used on an Inty.
  3. Easy to pack more letters in a pixel boundary (write the text-out then "pixel push" until things fit, or re-phrase and re-gen)
  4. Easy to use higher-numbered foreground colors because it's GRAM "text"

The disadvantages

  1. A lot of overhead for printing a few simple strings to the screen.
  2. Not scriptable, requires a full Windows GUI (on the backlog for next version).

 

 

HTH.

 

 

 

 

 

Hello, everyone!

 

I know what Grom2GramFomt does and how it does it. Very cool stuff. I'm just not clear on how to use it.

 

I've received some feedback about a project I'm working on, and using the "Digital" font from Grom2GramFont would be an ideal choice. I've read over the post that started with adding color and then created multiple font styles. What's not clear to me is how to call for the "Digital" (or any other font) with code in IntyBASIC. What do I type to make the test use a font from this file?

 

I considered that Grom2GramFont might need to be part of the INCLUDE statements. I think that since it is BASIC code, though, if I did that it would run the ROM that cycles through the fonts rather than just calling for one of them.

 

How do I make the magic happen?

 

Thanks!
Blaine

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...