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

Add font and size selection #182

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

RUN-Projects
Copy link

@RUN-Projects RUN-Projects commented May 26, 2023

Addresses #186

Describe what your pull request addresses

  • Adds detected local fonts to a dropdown
  • Lists shipped fonts
  • Avoids overriding local fonts with shipped fonts, and vice-versa, allowing users control of font versions(1).
  • Adds font size dropdown
  • Adds line height dropdown
  • Complex font-specific css shaping settings have been replicated from translationCore, with the exception of font-size which can be set by the user.

Test Instructions

  • Open a book or books and adjust font settings.
  • As is the case here with all local fonts, graphite-enable fonts are only listed when locally detected. When they are there is a separate list (which encourages FF). This comes just after Provided Fonts in the drodown, though is not shown at all if no graphite-enabled fonts are detected.
  • What is the smallest cards need to be able to be made? (Keep going smaller and this will leave font settings buttons extending past the right margin of the card. Is this size acceptable for now?)

(1) An exception to this may be the Roboto webfont, however the most current version of the font will always be delivered over https unless there is a connectivity issue with fonts.googleapis.com (the css stylesheet) or fonts.gstatic.com (28 woff2 files). It also may be that this webfont doesn't necessarily need to be listed. The Next.js style theme is pulling it into head, so since it is currently imported into the project it is being listed.

* Adds detected local fonts to a dropdown
* Lists shipped fonts
* Avoids overriding local fonts with shipped fonts, and vice-versa, allowing users control of font versions.
* Adds font size dropdown
* Adds line height dropdown
@netlify
Copy link

netlify bot commented May 26, 2023

‼️ Deploy request for gateway-translate rejected.

Name Link
🔨 Latest commit f725aa4

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.

1 participant