Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Testicular Slingshot
Alchemy Viewer
Commits
5ea48987
Commit
5ea48987
authored
Jul 14, 2017
by
Cinder
Browse files
Griefing the font path
parent
9c412d5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
indra/llrender/llfontgl.cpp
View file @
5ea48987
...
...
@@ -38,10 +38,8 @@
#include
"llgl.h"
#include
"llimagegl.h"
#include
"llrender.h"
#include
"llstl.h"
#include
"v4color.h"
#include
"lltexture.h"
#include
"lldir.h"
// Third party library includes
#include
<boost/tokenizer.hpp>
...
...
@@ -1097,26 +1095,39 @@ std::string LLFontGL::getFontPathSystem()
return
system_path
;
}
static
std
::
string
sLocalFontPath
;
// static
std
::
string
LLFontGL
::
getFontPathLocal
()
{
std
::
string
local_p
ath
;
if
(
!
sLocalFontPath
.
empty
())
return
sLocalFontP
ath
;
// Backup files if we can't load from system fonts directory.
// We could store this in an end-user writable directory to allow
// end users to switch fonts.
if
(
!
LLFontGL
::
sAppDir
.
empty
())
{
// use specified application dir to look for fonts
local_path
=
LLFontGL
::
sAppDir
+
"/fonts/"
;
#if LL_WINDOWS
std
::
string
::
size_type
indra_dir_pos
=
sAppDir
.
rfind
(
"indra
\\
newview"
);
if
(
indra_dir_pos
!=
std
::
string
::
npos
)
{
// we're running from the bugger probably
std
::
string
basedir
=
sAppDir
.
substr
(
0
,
indra_dir_pos
);
sLocalFontPath
=
basedir
+
"build-vc141-x86_64
\\
packages
\\
fonts
\\
"
;
// fix me drake, fix me. lol
}
else
#endif
{
// use specified application dir to look for fonts
sLocalFontPath
=
LLFontGL
::
sAppDir
+
"/fonts/"
;
}
}
else
{
// assume working directory is executable directory
l
ocal
_p
ath
=
"./fonts/"
;
sL
ocal
FontP
ath
=
"./fonts/"
;
}
return
l
ocal
_p
ath
;
return
sL
ocal
FontP
ath
;
}
LLFontGL
::
LLFontGL
(
const
LLFontGL
&
source
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment