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 missing fonts under Linux #437

Merged
merged 3 commits into from
Jul 21, 2022

Conversation

KyleGospo
Copy link
Contributor

@KyleGospo KyleGospo commented Jul 20, 2022

This PR replaces Arial with Lato, and Lucidia with Northstar Mono (Modified Fira Mono Regular), removing the need to install fonts when running the game on Linux. Licenses for these fonts have been included along-side the TTF.

Adjusts .gitattributes and .github/workflows/encoding.yml to better target localization files, this fixes a crash caused by the font definition file being encoded as UTF-16LE-BOM

Related PRs:
R2Northstar/Northstar#314
R2Northstar/NorthstarWiki#91

@GeckoEidechse
Copy link
Member

Any chance you could add screenshots of it in action (preferably of both old and new version)? ^^

Also regarding licenses, if they don't require redistributing license in same folder as font file, it'd might make sense to add them to LEGAL.txt in release repo to avoid adding a new license file for each new content of media that requires redistributing license.

@KyleGospo
Copy link
Contributor Author

Also regarding licenses, if they don't require redistributing license in same folder as font file, it'd might make sense to add them to LEGAL.txt in release repo to avoid adding a new license file for each new content of media that requires redistributing license.

R2Northstar/Northstar#314

Getting screenshots and removing the licenses from this PR now.

@KyleGospo
Copy link
Contributor Author

KyleGospo commented Jul 20, 2022

Arial & Lucidia Console:
ArialLucidia

Lato & Fira Code:
LatoFiraCode

@GeckoEidechse
Copy link
Member

Looks close enough for me that the difference shouldn't matter. Maybe a second opinion by someone else would be nice (preferably not using Linux to avoid bias :P).

That and gonna test it tonight to make sure it also works on my machine and then I could merge it ^^

… this fixes Linux users needing to install proprietary fonts to use the in-game console.
… txt files it checks against. UTF-16LE-BOM will crash the game with a division by zero error if it's not expecting the file to be encoded as such.
Copy link
Member

@GeckoEidechse GeckoEidechse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Sadly) quick Discord poll said no to Fira code ;-;

Consolas was a suggested alternative

@GeckoEidechse
Copy link
Member

An issue we also noticed in testing that streaming the in-game console with Fira Code from a 1440p screen to a 1080p via Discord on Text readability mode, rendered the text unreadable on the 1080p screen. So it should be big enough for it to be still readable like the current version is. ^^

@KyleGospo
Copy link
Contributor Author

KyleGospo commented Jul 21, 2022

An issue we also noticed in testing that streaming the in-game console with Fira Code from a 1440p screen to a 1080p via Discord on Text readability mode, rendered the text unreadable on the 1080p screen. So it should be big enough for it to be still readable like the current version is. ^^

Created a custom font to solve this. Meet Northstar Mono:
FiraNorthstar

It's Fira Mono resized to as closely match the original font's size as possible, with a little more space between lines to help with readability when compressed.

@KyleGospo KyleGospo requested a review from GeckoEidechse July 21, 2022 04:27
Copy link
Member

@GeckoEidechse GeckoEidechse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got enough positive feedback on the updated font to consider it mergeable ^^

@GeckoEidechse GeckoEidechse merged commit fdc38f3 into R2Northstar:main Jul 21, 2022
@KyleGospo KyleGospo deleted the linux_font_fix branch July 24, 2022 06:43
JMM889901 pushed a commit to JMM889901/NorthstarMods that referenced this pull request Aug 12, 2024
* Replace Arial and Lucidia fonts with Lato and Fira Code respectively, this fixes Linux users needing to install proprietary fonts to use the in-game console.

* Clean up gitattributes and encoding.yml to be more specific about the txt files it checks against. UTF-16LE-BOM will crash the game with a division by zero error if it's not expecting the file to be encoded as such.

* Replace Fira Code with Northstar Mono (Modified Fira Mono Regular)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants