Browse files

FIX: Consistenly look for fonts in special//home, then special://xbmc

  • Loading branch information...
1 parent b08bd0e commit 1501e49f96f75d12ef8071f30ca3338ea18f4ff4 @koying koying committed Aug 31, 2013
View
10 xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitlesLibass.cpp
@@ -20,6 +20,7 @@
#include "DVDSubtitlesLibass.h"
#include "DVDClock.h"
+#include "filesystem/File.h"
#include "filesystem/SpecialProtocol.h"
#include "settings/Settings.h"
#include "utils/log.h"
@@ -75,9 +76,14 @@ CDVDSubtitlesLibass::CDVDSubtitlesLibass()
if(!m_renderer)
return;
- //Setting default font to the Arial in \media\fonts (used if FontConfig fails)
- strPath = "special://xbmc/media/Fonts/";
+ //Setting default font to the Arial in \media\fonts (used if FontConfig fails)
+ strPath = "special://home/media/Fonts/";
strPath += CSettings::Get().GetString("subtitles.font");
+ if (!XFILE::CFile::Exists(strPath))
+ {
+ strPath = "special://xbmc/media/Fonts/";
+ strPath += CSettings::Get().GetString("subtitles.font");
+ }
int fc = !CSettings::Get().GetBool("subtitles.overrideassfonts");
m_dll.ass_set_margins(m_renderer, 0, 0, 0, 0);
View
4 xbmc/music/karaoke/karaokelyricstext.cpp
@@ -139,7 +139,9 @@ bool CKaraokeLyricsText::InitGraphics()
if ( m_lyrics.empty() )
return false;
- CStdString fontPath = "special://xbmc/media/Fonts/" + CSettings::Get().GetString("karaoke.font");
+ CStdString fontPath = "special://home/media/Fonts/" + CSettings::Get().GetString("karaoke.font");
+ if (!XFILE::CFile::Exists(fontPath))
+ fontPath = "special://xbmc/media/Fonts/" + CSettings::Get().GetString("karaoke.font");
m_karaokeFont = g_fontManager.LoadTTF("__karaoke__", fontPath,
m_colorLyrics, 0, CSettings::Get().GetInt("karaoke.fontheight"), FONT_STYLE_BOLD );
CGUIFont *karaokeBorder = g_fontManager.LoadTTF("__karaokeborder__", fontPath,
View
8 xbmc/video/windows/GUIWindowFullScreen.cpp
@@ -56,6 +56,7 @@
#include "pvr/channels/PVRChannelGroupsContainer.h"
#include "windowing/WindowingFactory.h"
#include "cores/IPlayer.h"
+#include "filesystem/File.h"
#include <stdio.h>
#include <algorithm>
@@ -401,8 +402,13 @@ bool CGUIWindowFullScreen::OnMessage(CGUIMessage& message)
{
CSingleLock lock (m_fontLock);
- CStdString fontPath = "special://xbmc/media/Fonts/";
+ CStdString fontPath = "special://home/media/Fonts/";
fontPath += CSettings::Get().GetString("subtitles.font");
+ if (!XFILE::CFile::Exists(fontPath))
+ {
+ fontPath = "special://xbmc/media/Fonts/";
+ fontPath += CSettings::Get().GetString("subtitles.font");
+ }
// We scale based on PAL4x3 - this at least ensures all sizing is constant across resolutions.
RESOLUTION_INFO pal(720, 576, 0);

0 comments on commit 1501e49

Please sign in to comment.