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

core: Allow Regular/Bold/Italic device fonts to be registered separately #14083

Merged
merged 1 commit into from
Nov 24, 2023

Conversation

MrCheeze
Copy link
Contributor

@MrCheeze MrCheeze commented Nov 20, 2023

When testing #13604 , I noticed that if I provide fontSources swf(s) that contain the same font in multiple styles (Regular, Bold, Italic, Bold Italic), only one of the provided fonts will actually be registered, and the others discarded - meaning that bolded text will appear unbolded or vice versa.

This PR solves that issue by registering device fonts in a FontMap (like embedded and global fonts are), instead of registering them by name alone and ignoring the style.

If that wasn't clear, here's what rendering text looks like when all four styles of a device font have been provided, before and after this change:
image

@Dinnerbone Dinnerbone enabled auto-merge (rebase) November 24, 2023 15:58
@Dinnerbone Dinnerbone merged commit 5920a64 into ruffle-rs:master Nov 24, 2023
13 checks passed
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.

2 participants