Custom fonts
Posted: 21 May 2013, 23:39
1st thing 1st:
I'm working on a title, i want that title to have a custom feel/font/gui.
Best way to do this i think is by using manialib.
I've been thinking of where i'd ask this question for a long time, still don't know where it fits best.
As ManiaLib also uses icons and loads them like a rollover image (xy coords + size of icon) i figured it's probably a similar way.
example:

i can select 1 letter at a time and assign them to quads.
However, there's a few problems i came across in my thinking progress.
Transparency
my guess is i need either a dds or a tga, which probably isn't a standard manialib image. As it's for my custom title, that won't be a problem.
If i overlay the letters (make background transparent) i am only creating single colour squares as the overlay isn't using the layer underneath.
If i inverse the txt (make letters transparent) and choose an underlay colour i can have any txt colour i got, but can't use it in a transparent way as the background is a solid colour. if i make background transparent i get the same result as overlay.
So i guess i need to use a dds with a layermask. But then i still don't know how to alter the colour.
different sizes
the M and the i don't use the same quadsize, not too big of a problem, but still, i want to do it nicely
loading the font
As it's going to be used in a title i reckon there's some sort of preloader i need to run.
my 1st idea was to use the oldschool custom font system for webpages:
wait for text to load, then 1 by 1 overlay it with a custom letter image
That of course isn't the proper practice. i want to override the standard font for the gui/mt in my title and not just for ingame popup txt. (not in the chat window as i don't want to mess up names)
the question
Is this possible to do at all?
and if so, is it possible to get an example script?
Sidenote: only using fonts i'm allowed to use (either CC, made by me or with the authors consent)
I'm working on a title, i want that title to have a custom feel/font/gui.
Best way to do this i think is by using manialib.
I've been thinking of where i'd ask this question for a long time, still don't know where it fits best.
As ManiaLib also uses icons and loads them like a rollover image (xy coords + size of icon) i figured it's probably a similar way.
example:

i can select 1 letter at a time and assign them to quads.
However, there's a few problems i came across in my thinking progress.
Transparency
my guess is i need either a dds or a tga, which probably isn't a standard manialib image. As it's for my custom title, that won't be a problem.
If i overlay the letters (make background transparent) i am only creating single colour squares as the overlay isn't using the layer underneath.
If i inverse the txt (make letters transparent) and choose an underlay colour i can have any txt colour i got, but can't use it in a transparent way as the background is a solid colour. if i make background transparent i get the same result as overlay.
So i guess i need to use a dds with a layermask. But then i still don't know how to alter the colour.
different sizes
the M and the i don't use the same quadsize, not too big of a problem, but still, i want to do it nicely
loading the font
As it's going to be used in a title i reckon there's some sort of preloader i need to run.
my 1st idea was to use the oldschool custom font system for webpages:
wait for text to load, then 1 by 1 overlay it with a custom letter image
That of course isn't the proper practice. i want to override the standard font for the gui/mt in my title and not just for ingame popup txt. (not in the chat window as i don't want to mess up names)
the question
Is this possible to do at all?
and if so, is it possible to get an example script?
Sidenote: only using fonts i'm allowed to use (either CC, made by me or with the authors consent)