-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: add font feature settings support #2740
base: master
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: f33ad19 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
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 |
I'm of course also happy to extend the documentation site accordingly if this will be merged, I'd just need a pointer as to where I could contribute that. |
The website documentation is kept in the react-pdf-site repository. |
Hi! |
Up! |
I'm also happy to change anything needed for this to be merged :) Is there a process for getting this PR reviewed? |
If anything can be done to merge this PR, please reach out. :) |
Up, is there anything I can do to help this PR being merged? :) |
This PR would help my team. Happy to help write documentation or assist where I can if it'd help get this approved. |
Same as @bnlb. Happy to help for testing or writing docs :) |
@diegomura Any pointers on how to get this PR reviewed? :) |
Implements #2155.
This PR adds the
fontFeatureSettings
style property (see MDN for the CSS equivalent). It takes a list of feature tags, which appends to the default set, or an object to turn on/off individual features, as supported by fontkit.Why it matters
This allows users to apply any font features supported by a given font, such as tabular numbers, fractions, alternate glyphs, control over ligatures, etc.
Usage
Example
A full example is provided in the
examples
package. Here's how it looks like: