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.
Description
I went deep down a rabbit hole investigating a bug I reported (#4854) and I found several other small related problems.
I hope you will consider this PR which fixes the problems I found and updates the internal Inter font and the Google Fonts list.
Please let me know your thoughts. Thank you.
This PR addresses the following bugs (from a user's point of view):
This PR implements the following (from a dev's point of view):
1. Updated the internal Inter font from v3.12 to v4.0 (v4.0 uses the same license as v3.2).2. Ensured that the default font labels (on the General settings page) display the selected variant as well as the family. Previously "Regular" was missing (for default font only.. it was present for all other fonts).
3. Renamed the internal Inter font from "Inter" to
"Inter v4.0""Inter v3" (just via labelling... no font files have been modified from their original source versions) to differentiate it from the Google Fonts version. Renaming the default font labels (on the General settings page) and the font itself in the font list ensures that on the first visit to the font list, a radio button is selected. Previously, on the first visit to the font list, no radio button was selected.4. Removed the duplicate Google Fonts Inter font (with italic variants which did not work) from the font list to prevent duplicate font names being listed and to prevent two radio buttons from being selected at the same time.
5. Added the internal Inter font (with
all 18 supportedthe 4 available variants) to the font list (after system fonts and before Google Fonts in the list) as it was previously unavailable. This givers users a way to reinstate the default font after selecting a different font.6. Updated the Google Fonts list (generated directly using the Google Fonts API on 8 October 2024). The font family count has increased from 1646 to 1726 (80 new fonts).
7. Allowed AssetFont and ResourceFont font types to be included in the font list. Previously, they could not be selected via their corresponding radio buttons on the first try. The radio button would look to be selected but on moving away from the font list, it would be evident that the font had not been applied and, going back to the font list, the radio button would no longer be selected. The font would need to be selected for a second time before it worked as expected. This needed to be fixed as the internal Inter font is added to the font list as a ResourceFont. (Fix also implemented for AssetFont for potential future use.)
8. Used translatable strings for internal Inter font variant labels (same as Google Font variant labels).
Fixes #4854
Type of change
❌ General change (non-breaking change that doesn't fit the below categories like copyediting)
✅ Bug fix (non-breaking change which fixes an issue)
❌ New feature (non-breaking change which adds functionality)
❌ Breaking change (fix or feature that would cause existing functionality to not work as expected)