Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
ygopro
Commits
c33ed423
Commit
c33ed423
authored
May 01, 2025
by
mercury233
Committed by
GitHub
May 01, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update font fallback order (#2766)
parent
efc86785
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
gframe/game.cpp
gframe/game.cpp
+7
-7
No files found.
gframe/game.cpp
View file @
c33ed423
...
@@ -106,6 +106,9 @@ bool Game::Initialize() {
...
@@ -106,6 +106,9 @@ bool Game::Initialize() {
numFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
numfont
,
16
);
numFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
numfont
,
16
);
if
(
!
numFont
)
{
if
(
!
numFont
)
{
const
wchar_t
*
numFontPaths
[]
=
{
const
wchar_t
*
numFontPaths
[]
=
{
L"./fonts/numFont.ttf"
,
L"./fonts/numFont.ttc"
,
L"./fonts/numFont.otf"
,
L"C:/Windows/Fonts/arialbd.ttf"
,
L"C:/Windows/Fonts/arialbd.ttf"
,
L"/usr/share/fonts/truetype/DroidSansFallbackFull.ttf"
,
L"/usr/share/fonts/truetype/DroidSansFallbackFull.ttf"
,
L"/usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc"
,
L"/usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc"
,
...
@@ -113,9 +116,6 @@ bool Game::Initialize() {
...
@@ -113,9 +116,6 @@ bool Game::Initialize() {
L"/usr/share/fonts/noto-cjk/NotoSansCJK-Bold.ttc"
,
L"/usr/share/fonts/noto-cjk/NotoSansCJK-Bold.ttc"
,
L"/System/Library/Fonts/SFNSTextCondensed-Bold.otf"
,
L"/System/Library/Fonts/SFNSTextCondensed-Bold.otf"
,
L"/System/Library/Fonts/SFNS.ttf"
,
L"/System/Library/Fonts/SFNS.ttf"
,
L"./fonts/numFont.ttf"
,
L"./fonts/numFont.ttc"
,
L"./fonts/numFont.otf"
};
};
for
(
const
wchar_t
*
path
:
numFontPaths
)
{
for
(
const
wchar_t
*
path
:
numFontPaths
)
{
BufferIO
::
CopyWideString
(
path
,
gameConf
.
numfont
);
BufferIO
::
CopyWideString
(
path
,
gameConf
.
numfont
);
...
@@ -127,6 +127,9 @@ bool Game::Initialize() {
...
@@ -127,6 +127,9 @@ bool Game::Initialize() {
textFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
textfont
,
gameConf
.
textfontsize
);
textFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
textfont
,
gameConf
.
textfontsize
);
if
(
!
textFont
)
{
if
(
!
textFont
)
{
const
wchar_t
*
textFontPaths
[]
=
{
const
wchar_t
*
textFontPaths
[]
=
{
L"./fonts/textFont.ttf"
,
L"./fonts/textFont.ttc"
,
L"./fonts/textFont.otf"
,
L"C:/Windows/Fonts/msyh.ttc"
,
L"C:/Windows/Fonts/msyh.ttc"
,
L"C:/Windows/Fonts/msyh.ttf"
,
L"C:/Windows/Fonts/msyh.ttf"
,
L"C:/Windows/Fonts/simsun.ttc"
,
L"C:/Windows/Fonts/simsun.ttc"
,
...
@@ -139,9 +142,6 @@ bool Game::Initialize() {
...
@@ -139,9 +142,6 @@ bool Game::Initialize() {
L"/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc"
,
L"/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc"
,
L"/System/Library/Fonts/PingFang.ttc"
,
L"/System/Library/Fonts/PingFang.ttc"
,
L"/System/Library/Fonts/STHeiti Medium.ttc"
,
L"/System/Library/Fonts/STHeiti Medium.ttc"
,
L"./fonts/textFont.ttf"
,
L"./fonts/textFont.ttc"
,
L"./fonts/textFont.otf"
};
};
for
(
const
wchar_t
*
path
:
textFontPaths
)
{
for
(
const
wchar_t
*
path
:
textFontPaths
)
{
BufferIO
::
CopyWideString
(
path
,
gameConf
.
textfont
);
BufferIO
::
CopyWideString
(
path
,
gameConf
.
textfont
);
...
@@ -159,7 +159,7 @@ bool Game::Initialize() {
...
@@ -159,7 +159,7 @@ bool Game::Initialize() {
}
}
});
});
if
(
fpath
[
0
]
==
0
)
{
if
(
fpath
[
0
]
==
0
)
{
ErrorLog
(
"No fonts found! Please
manually edit system.conf or place appropriate font file in the fonts director
y."
);
ErrorLog
(
"No fonts found! Please
place appropriate font file in the fonts directory, or edit system.conf manuall
y."
);
return
false
;
return
false
;
}
}
if
(
!
numFont
)
{
if
(
!
numFont
)
{
...
...
Write
Preview
Markdown
is supported
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