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

Support for user-installed system fonts in addition to ReadiumCSS predefined typefaces #1373

Merged
merged 5 commits into from
Feb 11, 2021

Conversation

danielweck
Copy link
Member

@danielweck danielweck commented Feb 11, 2021

Fixes #766
Fixes #765

Note that unlike r2-testapp-js which uses a code library (see below) to discover font faces installed on the operating system, Thorium's implementation allows the user to type in any arbitrary name (case insensitive, and sanitized to avoid breaking ReadiumCSS).

  1. Lib used in the test app (pure Javascript): https://github.com/rBurgett/system-font-families
  2. Alternative lib (has native code): https://github.com/foliojs/font-manager
  3. Another lib (has native code): https://github.com/oldj/node-font-list

@danielweck
Copy link
Member Author

Default publisher font:

Screenshot 2021-02-11 at 13 34 04

@danielweck
Copy link
Member Author

Dyslexia-friendly font (ReadiumCSS predefined typeface):

Screenshot 2021-02-11 at 13 34 14

@danielweck
Copy link
Member Author

danielweck commented Feb 11, 2021

Custom selection (... option):

Screenshot 2021-02-11 at 13 44 59

@danielweck
Copy link
Member Author

Atkinson Hyperlegible:

( https://brailleinstitute.org/freefont )

Screenshot 2021-02-11 at 13 41 25

@danielweck
Copy link
Member Author

WebDings and WingDings

WHY?!

Screenshot 2021-02-11 at 13 37 39

Screenshot 2021-02-11 at 13 34 31

@danielweck
Copy link
Member Author

Comic Sans

(some people like it)

Screenshot 2021-02-11 at 13 34 53

@danielweck
Copy link
Member Author

Misc.

(case insensitive, some names contains spaces, and generally-speaking typeface names are automatically sanitized and normalized to trim leading and trailing whitespace characters, and to collapse inner whitespace too)

Screenshot 2021-02-11 at 13 40 29

Screenshot 2021-02-11 at 13 39 40

Screenshot 2021-02-11 at 13 38 01

Screenshot 2021-02-11 at 13 36 02

Screenshot 2021-02-11 at 13 34 24

@danielweck danielweck merged commit bd81f9f into develop Feb 11, 2021
@danielweck danielweck deleted the feat/fonts branch February 11, 2021 16:23
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.

Font face selector: preview rendering of fonts? Font face selector: add system fonts?
1 participant