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

Fix duplicate unitfont.ttf in config/fonts.json #50610

Merged
merged 1 commit into from
Aug 8, 2021

Conversation

BrettDong
Copy link
Member

Summary

Bugfixes "Fix duplicate unitfont.ttf in config/fonts.json"

Purpose of change

When testing #50609 I found that data/font/unifont.ttf appears twice in the generated config/fonts.json.

ensure_unifont_loaded() finds Unifont in the font list and inserts it if it does not exist. However in current implementation it doesn't take path into account and only search for plain string unifont.ttf. The path of Unifont should be data/font/unifont.ttf.

Describe the solution

Replace unitfont.ttf with data/font/unifont.ttf.

Describe alternatives you've considered

None.

Testing

Now config/fonts.json only contains one Unifont entry:

{
  "typeface": [ "data/font/unifont.ttf" ],
  "map_typeface": [ "data/font/unifont.ttf" ],
  "overmap_typeface": [ "data/font/unifont.ttf" ]
}

Additional context

@BrettDong BrettDong added the <Bugfix> This is a fix for a bug (or closes open issue) label Aug 8, 2021
@actual-nh actual-nh added 0.F Backport Candidate [C++] Changes (can be) made in C++. Previously named `Code` labels Aug 8, 2021
@ZhilkinSerg ZhilkinSerg merged commit 2f12e31 into master Aug 8, 2021
@BrettDong BrettDong deleted the duplicate-unitfont branch August 10, 2021 12:25
ZhilkinSerg added a commit to ZhilkinSerg/Cataclysm-DDA that referenced this pull request Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants