FontnameParser: Fix fsSelection for --has-no-italic #1255
Merged
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.
[why]
For fonts that have no Italic but an Oblique - i.e. when Oblique shall replace the Italic role in RIBBI font grouping (classic group of 4) - that grouping fails.
This affects DejaVu on Putty.
[how]
For RIBBI grouping only the classic bits are considered. That means that for fonts that have Oblique instead of Italic (and not additionally) we need to set the ITALIC bit and the OBLIQUE bit. This has been overlooked.
Cite from the specs:
Fixes: #1249
Reported-by: Huifeng Shen [email protected]
Requirements / Checklist
What does this Pull Request (PR) do?
How should this be manually tested?
Create new set of DejaVu, install NFM on Windows, start putty.
Any background context you can provide?
https://learn.microsoft.com/en-us/typography/opentype/spec/os2#fsselection
What are the relevant tickets (if any)?
Screenshots (if appropriate or helpful)