From e924a164c9b1b292cfe3d1036aa842113e2a0670 Mon Sep 17 00:00:00 2001 From: fgenesis Date: Mon, 18 Jun 2012 18:54:56 +0200 Subject: [PATCH] Also load localized font files --- Aquaria/DSQ.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Aquaria/DSQ.cpp b/Aquaria/DSQ.cpp index 9b7c873..5f13afe 100644 --- a/Aquaria/DSQ.cpp +++ b/Aquaria/DSQ.cpp @@ -485,33 +485,38 @@ void DSQ::loadFonts() destroyFonts(); - font.load("data/font-small.glf", 1, false); + std::string file = user.localisePath("data/font-small.glf"); + + font.load(file, 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.load(file, 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.load(file, 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.load(file, 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.load(file, 1, false); goldFont.fontTopColor = Vector(1,0.9,0.5); goldFont.fontBtmColor = Vector(0.6,0.5,0.25); goldFont.overrideTexture = core->addTexture("font"); + + file = user.localisePath("data/font.ttf"); + debugLog("ttf..."); - arialFontData = (unsigned char *)readFile("data/font.ttf", &arialFontDataSize); + arialFontData = (unsigned char *)readFile(file, &arialFontDataSize); if (arialFontData) { fontArialSmall .create(arialFontData, arialFontDataSize, 12);