Change: Replace font subsystem #1162
Open
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.
This PR is an experimental effort, to replace the font subsystem.
Currently fully functional, but only uses Droid Sans from the supplied TTF, and does not load user-specified fonts.
n.b. I suspect that the entire font system probably wants pulling into a separate API interface.
It's using a fork of FontStashSharp:
https://github.com/leezer3/FontStashSharp/tree/OpenBve
This and the associated dependancies are MIT licenced.
The advantage of this is to replace the last use of System.Drawing GDI+ functions, and in future allow moving to .Net core where these are not available. I think we'd essentially require a separate build for this unless a shim can somehow be inserted for the missing WinForms libraries.
There's also a (marginal at the minute) performance gain.
As a related change, we also want to consider pulling GL1.2 entirely at some stage soon.
Ref:
#1157
#979