Closed michaeltaranto closed 7 months ago
Latest commit: 9161d71368486ecfcb137a8784919c7891032df5
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Character frequency weightings used to calculate the
xWidthAvg
metrics were previously hard coded internally, and were an adaption from a frequency table on Wikipedia.We now generate these weightings based on the abstracts of WikiNews articles, making it possible to add support for other languages that make use of non-latin unicode subsets, e.g. Thai.
The updated
xWidthAvg
metrics are very close to the original hard coded values. This results in either no or extremely minor changes to the generated fallback font CSS, meaning we don't expect any notable changes to consumers, with the benefit being this lays the ground work to support additional language subsets in the future.Note for the reviewer
This PR is in preparation for a follow up PR that introduces unicode subset support. So some refactoring in this PR is in service of a cleaner diff for the next PR.