Bit Blot Forum
Aquaria => General => Topic started by: Nacery on October 17, 2011, 11:13:34 pm
-
I was using GLFont2 to remake the aquaria TROJAN PRO REGULAR font that is used in menus and subtitles so it contains all the 32-255 character set that are needed to render all european languages as can be Spanish or Polish but seems that this file isn't used anymore and the font coordinates are hard coded into the game to only use english alphabet.
Is there any way to modify this?
-
You are right, the game uses only data/font-small.glf and data/font.ttf.
void DSQ::loadFonts()
{
debugLog("loadFonts...");
destroyFonts();
font.load("data/font-small.glf", 1, false);
font.fontTopColor = Vector(0.9,0.9,1);
font.fontBtmColor = Vector(0.5,0.8,1);
font.overrideTexture = core->addTexture("font");
smallFont.load("data/font-small.glf", 0.6, false);
smallFont.fontTopColor = Vector(0.9,0.9,1);
smallFont.fontBtmColor = Vector(0.5,0.8,1);
smallFont.overrideTexture = core->addTexture("font");
smallFontRed.load("data/font-small.glf", 0.6, false);
smallFontRed.fontTopColor = Vector(1,0.9,0.9);
smallFontRed.fontBtmColor = Vector(1,0.8,0.5);
smallFontRed.overrideTexture = core->addTexture("font");
subsFont.load("data/font-small.glf", 0.5, false);
subsFont.fontTopColor = Vector(1,1,1);
subsFont.fontBtmColor = Vector(0.5,0.8,1);
subsFont.overrideTexture = core->addTexture("font");
goldFont.load("data/font-small.glf", 1, false);
goldFont.fontTopColor = Vector(1,0.9,0.5);
goldFont.fontBtmColor = Vector(0.6,0.5,0.25);
goldFont.overrideTexture = core->addTexture("font");
debugLog("ttf...");
arialFontData = (unsigned char *)readFile("data/font.ttf", &arialFontDataSize);
if (arialFontData)
{
fontArialSmall .create(arialFontData, arialFontDataSize, 12);
fontArialBig .create(arialFontData, arialFontDataSize, 18);
fontArialSmallest.create(arialFontData, arialFontDataSize, 10);
}
debugLog("done loadFonts");
/*
//gold
smallFont.fontTopColor = Vector(1,0.9,0.5);
smallFont.fontBtmColor = Vector(0.6,0.5,0.25);
*/
//Texture::format = GL_LUMINANCE_ALPHA;
//Texture::format = 0;
}
Does it work when you rename the file to font-small.glf ? I can't seem to find any evidence in the code that the coordinates are hard-coded... So it should be possible to use other glyphs as well.
The file data/font.txt is not used either. Looks like an older version of the game read its font coordinates from this file, but not anymore.
Also, could you post your modfied glf file? I want to see how it works :)
-
This is the font.glf that I made thinking that aquaria still used it, but it seems that it only uses the font.png texture and it's coordinates are coded into the game without requiring a font.glf file anymore.
http://www.mediafire.com/?10nx2cb72h52gxc (http://www.mediafire.com/?10nx2cb72h52gxc)
-
I always read .glf as GILF. Terrible of me. O0
-
Off topic: this (http://www.urbandictionary.com/define.php?term=gilf) ? Wut? :o