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

Match Spritefont style on Windows #7993

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

wldevries
Copy link

@wldevries wldevries commented Feb 25, 2023

Implements #4149 by parsing TrueType fonts to extract their font family and font sub family (style) names.

The content pipeline speed is not affected much, since TrueType fonts parsing is quite simple and super fast. The font family is already filtered on using information in the Windows registry.

There are many more font sub families in fonts. Calibri for instance has Light, Light Italic and Bold Italic. The Bahnschrift font in Windows has even more: Condensed, SemiCondensed, SemiBold, etc... It might make sense to treat the Style property as a string instead of an enum with fixed values.

@stromkos
Copy link
Contributor

I do not know of "RoyT.TrueType", but I am opposed to adding another requirement when the "issue" could be solved internally in a cross platform nature.

DavidFidge added a commit to DavidFidge/GeonBit.UI that referenced this pull request Jan 27, 2024
The Bitstream font styles may not work due to non-standard font style names. Refer to MonoGame/MonoGame#7993
DavidFidge added a commit to DavidFidge/GeonBit.UI that referenced this pull request Jan 27, 2024
…ndows - use specific ttf files instead of relying on installed fonts.

https://community.monogame.net/t/fontdescriptionprocessor-had-unexpected-failure/18110/3

Also note that installed fonts don't work properly on windows since it is unable to resolve the unique 'styles' that Bitstream Vera Sans Mono has (refer to monogame pull request 7993). Using ttf directly avoids all these issues.

MonoGame/MonoGame#7993
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants