mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Added Arch Linux's path for the Deja Vu Seriff font to the list of default fonts.
This commit is contained in:
parent
989ba9a8f9
commit
807c4b2f5b
|
@ -1,3 +1,6 @@
|
|||
November 19
|
||||
-Added Arch Linux's DejaVuSeriff.ttf path to the list of fonts to check for.
|
||||
|
||||
November 17
|
||||
-Fixed default game image resizing if none is defined.
|
||||
-Heavily refactored theming. You shouldn't notice any changes, but if something broke, let me know!
|
||||
|
|
15
src/Font.cpp
15
src/Font.cpp
|
@ -3,6 +3,7 @@
|
|||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include "Renderer.h"
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
FT_Library Font::sLibrary;
|
||||
bool Font::libraryInitialized = false;
|
||||
|
@ -14,7 +15,19 @@ int Font::getSize() { return mSize; }
|
|||
|
||||
std::string Font::getDefaultPath()
|
||||
{
|
||||
return "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf";
|
||||
int fontCount = 2;
|
||||
std::string fonts[] = {"/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf",
|
||||
"/usr/share/fonts/TTF/DejaVuSerif.ttf" };
|
||||
|
||||
for(int i = 0; i < fontCount; i++)
|
||||
{
|
||||
if(boost::filesystem::exists(fonts[i]))
|
||||
return fonts[i];
|
||||
}
|
||||
|
||||
std::cerr << "Error - could not find a font!\n";
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
void Font::initLibrary()
|
||||
|
|
Loading…
Reference in a new issue