Loadfont limit

Previous topic - Next topic

S. P. Gardebiter

It would be cool to load more than 8 fonts into GLBasic O:
My program is able to output colored text but only 8 colors is a bit of a restriction. Is there anyway the limit could be increased to 16 or something?
~ Cave Story rules! ~

Moru

I did some changes to the font library by PeeJay, you have unlimited fonts and colors. No need to load more than one font, you can change colors on every character if you would like to. See my homepage below.

Schranz0r

You can use polyvector to do that?!
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

Kitty Hello


S. P. Gardebiter

#4
@Gernot: Really? o: It says "LOADFONT datei$, num# // num#: 0 - 7" in the GUI. Or is the "7"  a mistake? o: In the helpfile it says "LOADFONT bmp$, num%" btw.

@Schranzor: I know but writing an own function for this stuff seems to be kind of an hassle when I only need two or three colors more than 8. Or is there an easy to do it? O:

@Moru: Thanks. I kind of stay away from libaries that aren't official though because of copyright/licensing stuff, sorry D:
~ Cave Story rules! ~

Moru

Aw, the library is made to be used, you have all the source right there, nothing hidden.

Kitty Hello

There's no license issue with source code on our forums, is there?

Schranz0r

Quote from: Kitty Hello on 2011-May-30
There's no license issue with source code on our forums, is there?

Thats right!
If you want you can add a credit to the member... thats enough :)
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

S. P. Gardebiter

Uh but the problem is I tend to stay on the "safe side" so to say. I can sell programs created with GLBasic itself because I bought it and therefor Gernot grants me that right. But when it comes to the modificated version of the libary Moru is the author and that's why he owns the rights, aslong as he didn't released it as PD (or something simular) or handling the rights over to Gernot. Same for PeeJay. Means: If I'm ever going change my mind and sell my game I either have to ask all the owners of the 3rd party libaries and make some kind of contract or I don't use any libaries from the beginning O:
~ Cave Story rules! ~

Slydog

Depending on your needs, I would recommend using a library for your fonts.
Either one from these forums, or create / modify one for yourself.
Before, the main reason was for proportional fonts, but Gernot added that to the built in fonts a bit ago.
(also referred to as 'kerning', but I'm pretty sure 'kerning' is specifically the concept of different character pairs having different spacing, eg: 'WA' and 'WB', the 'A' actually overlaps the 'W' to make it appear closer because they share the same angle, but the 'B' doesn't)

You'd want a custom font library for performance and features.
If you have tons of text on screen during intensive game play, every ms counts.
For that you would want to use polyvectors for speed.
Plus polyvectors have the ability to scale (and rotate) your fonts to any size very easily.
(eg: you could have 'START' rotating around getting smaller until it rests in the middle of the screen.)

Plus you can display them in any colour, even using a gradient concept (all four corners of a character can have a different colour and the result will be blended between the four colours).
Features that could be added are: font scale, font colour / alpha, justification, rotation, anchor point, etc.
For the fastest font routine, it should buffer all the font requests for a frame and display them all at once using the same material and only one material change per font used.  (mine does this, at the cost of more complex code, but I wanted the fastest fonts possible, for the future)

As far as the other library licensing, maybe the licensing should be officially stated (on a per library basis I assume).
What's the license name / type for it to be used 100% with no restrictions, and for commercial use also?

But for initial testing and prototyping, the built in fonts are good (well never really used them much, so don't really know).
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]