Skip to content
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

ImGui to respect fonts.json #75920

Merged
merged 5 commits into from
Aug 25, 2024
Merged

Conversation

alef
Copy link
Contributor

@alef alef commented Aug 24, 2024

Summary

Bugfixes "ImGui doesn't respect font settings #73019"

Purpose of change

Fix #73019

Describe the solution

The original typefaces vector was empty, so ensure_unifont_loaded() would make unifont.ttf the only font used by ImGui.
Now load_fonts is given the the game's list of typefaces to start with.

Describe alternatives you've considered

None.

Testing

Built SDL/Tiles on Windows/MSVC in CMake. It worked, see screenshots.

Additional context

Before
image
After
image

@github-actions github-actions bot added Info / User Interface Game - player communication, menus, etc. [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) json-styled JSON lint passed, label assigned by github actions labels Aug 24, 2024
@mqrause
Copy link
Contributor

mqrause commented Aug 24, 2024

Could this possibly also fix #75818?

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Aug 24, 2024
@alef
Copy link
Contributor Author

alef commented Aug 24, 2024

Could this possibly also fix #75818?

Don't think so. That seems related to division by zero mentioned in Discord#development yesterday

@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Aug 24, 2024
@mqrause
Copy link
Contributor

mqrause commented Aug 24, 2024

Yeah, it's division by zero, but most likely resulting from something like an uninitialized font.

@alef alef marked this pull request as ready for review August 24, 2024 15:57
@Maleclypse Maleclypse merged commit 573e19e into CleverRaven:master Aug 25, 2024
42 of 44 checks passed
@alef alef deleted the 73019-typefaces branch August 25, 2024 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ImGui doesn't respect font settings
3 participants