Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
8ee0bdbd
Commit
8ee0bdbd
authored
15 years ago
by
Kent Quirk
Browse files
Options
Downloads
Plain Diff
Merge
parents
197c4d0a
59394005
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/llwindow/llwindowsdl.cpp
+7
-5
7 additions, 5 deletions
indra/llwindow/llwindowsdl.cpp
with
7 additions
and
5 deletions
indra/llwindow/llwindowsdl.cpp
+
7
−
5
View file @
8ee0bdbd
...
@@ -2543,6 +2543,7 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
...
@@ -2543,6 +2543,7 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
// Use libfontconfig to find us a nice ordered list of fallback fonts
// Use libfontconfig to find us a nice ordered list of fallback fonts
// specific to this system.
// specific to this system.
std
::
string
final_fallback
(
"/usr/share/fonts/truetype/kochi/kochi-gothic.ttf"
);
std
::
string
final_fallback
(
"/usr/share/fonts/truetype/kochi/kochi-gothic.ttf"
);
const
int
max_font_count_cutoff
=
40
;
// fonts are expensive in the current system, don't enumerate an arbitrary number of them
// Our 'ideal' font properties which define the sorting results.
// Our 'ideal' font properties which define the sorting results.
// slant=0 means Roman, index=0 means the first face in a font file
// slant=0 means Roman, index=0 means the first face in a font file
// (the one we actually use), weight=80 means medium weight,
// (the one we actually use), weight=80 means medium weight,
...
@@ -2558,7 +2559,6 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
...
@@ -2558,7 +2559,6 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
std
::
vector
<
std
::
string
>
rtns
;
std
::
vector
<
std
::
string
>
rtns
;
FcFontSet
*
fs
=
NULL
;
FcFontSet
*
fs
=
NULL
;
FcPattern
*
sortpat
=
NULL
;
FcPattern
*
sortpat
=
NULL
;
int
font_count
=
0
;
llinfos
<<
"Getting system font list from FontConfig..."
<<
llendl
;
llinfos
<<
"Getting system font list from FontConfig..."
<<
llendl
;
...
@@ -2602,12 +2602,13 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
...
@@ -2602,12 +2602,13 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
FcPatternDestroy
(
sortpat
);
FcPatternDestroy
(
sortpat
);
}
}
int
found_font_count
=
0
;
if
(
fs
)
if
(
fs
)
{
{
// Get the full pathnames to the fonts, where available,
// Get the full pathnames to the fonts, where available,
// which is what we really want.
// which is what we really want.
int
i
;
found_font_count
=
fs
->
nfont
;
for
(
i
=
0
;
i
<
fs
->
nfont
;
++
i
)
for
(
int
i
=
0
;
i
<
fs
->
nfont
;
++
i
)
{
{
FcChar8
*
filename
;
FcChar8
*
filename
;
if
(
FcResultMatch
==
FcPatternGetString
(
fs
->
fonts
[
i
],
if
(
FcResultMatch
==
FcPatternGetString
(
fs
->
fonts
[
i
],
...
@@ -2616,7 +2617,8 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
...
@@ -2616,7 +2617,8 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
&&
filename
)
&&
filename
)
{
{
rtns
.
push_back
(
std
::
string
((
const
char
*
)
filename
));
rtns
.
push_back
(
std
::
string
((
const
char
*
)
filename
));
++
font_count
;
if
(
rtns
.
size
()
>=
max_font_count_cutoff
)
break
;
// hit limit
}
}
}
}
FcFontSetDestroy
(
fs
);
FcFontSetDestroy
(
fs
);
...
@@ -2629,7 +2631,7 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
...
@@ -2629,7 +2631,7 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
{
{
lldebugs
<<
" file: "
<<
*
it
<<
llendl
;
lldebugs
<<
" file: "
<<
*
it
<<
llendl
;
}
}
llinfos
<<
"Using "
<<
font_count
<<
" system font
(s)
."
<<
llendl
;
llinfos
<<
"Using "
<<
rtns
.
size
()
<<
"/"
<<
found_
font_count
<<
" system font
s
."
<<
llendl
;
rtns
.
push_back
(
final_fallback
);
rtns
.
push_back
(
final_fallback
);
return
rtns
;
return
rtns
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment