-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fallback fonts with atlas clearing. #1790
Merged
lhog
merged 26 commits into
beyond-all-reason:master
from
saurtron:lua-fallback-fonts-with-atlasclear
Dec 17, 2024
Merged
Changes from 20 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
fd9790b
Mechanism to define priority fallback fonts through lua AddFallbackFont
saurtron 3a65eee
LDoc documentation for AddFallbackFont and ClearFallbackFonts.
saurtron a67a9fd
First search game fonts and then system fonts as otherwise fontconfig
saurtron 1241ccc
Don't add or clear fallback fonts if fontconfig is disabled for any
saurtron a3d0cfa
Don't return false on a void function.
saurtron 2e4fb11
Merge branch 'master' into lua-fallback-fonts
saurtron a1c7135
Don't try to destroy gameFontSet and fallbackPattern if null.
saurtron 74ff5f4
Call CanUseFontConfig instead of UseFontConfig inside new methods.
saurtron b6352a2
Refresh glyph atlases after adding or clearing fallback fonts.
saurtron 0fe6786
Remove some extraneous extra lines.
saurtron 7e30cae
Clear kerning precached information too.
saurtron 8be1855
Remove fast glyph cache clear mode, and all clearMode control from lua.
saurtron 9aaee44
Remove clearGlyphs parameter also from ClearGlyphMode.
saurtron 5713e71
return after #endif so HEADLESS doesn't have a warning.
saurtron 51c3aef
FontsUpdated was renamed to FontsChanged, update comments.
saurtron 2d88bf6
Merge branch 'master' into lua-fallback-fonts
saurtron e31eb5d
Merge branch 'lua-fallback-fonts' into lua-fallback-fonts-with-atlasc…
saurtron 8cf8cc3
Refactor atlas clearing into a separate method and don't use
saurtron f85dff1
Realloc before dispose.
saurtron 36783c9
Make CFontTexture::ClearGlyphs return the changed status instead of
saurtron 2a11114
Add comment about vfs access use in use by AddFallbackFont.
saurtron 6f5da57
Rename fallbackPattern to basePattern.
saurtron 2fc1dbc
Merge branch 'lua-fallback-fonts' into lua-fallback-fonts-with-atlasc…
saurtron dfba0b2
Rename badly named variable.
saurtron 3fcc1a4
Merge branch 'lua-fallback-fonts' into lua-fallback-fonts-with-atlasc…
saurtron d9ce3a1
Merge branch 'master' into lua-fallback-fonts-with-atlasclear
saurtron File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,6 +94,8 @@ CallInsList = { | |
"DrawScreen", | ||
"DrawInMiniMap", | ||
|
||
"FontsChanged", | ||
|
||
"SunChanged", | ||
|
||
"Explosion", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean font files not in the VFS (i.e. loose files somewhere on user disk aka VFS.RAW) can't be used? If they can be used, how do I specify which one to use if two are under the same path (one raw and one in the vfs)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, tbh I don't know XD. It goes through the same path other fonts use to load as well, basically doing:
CFileHandler f(fontPath)
. I'm just reusing that part of the code through CFontTexture::LoadFontFace.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're not (yet) letting people specify their own VFS mode then add a @remark that it uses the RAW_FIRST vfs mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, didn't use a specific @ tag since I don't see any that can be used here, just added it to the comment for the @param.