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

Use of restricted fonts in the default theme #106

Open
iamnotsatoshi opened this issue Jul 7, 2020 · 6 comments
Open

Use of restricted fonts in the default theme #106

iamnotsatoshi opened this issue Jul 7, 2020 · 6 comments

Comments

@iamnotsatoshi
Copy link

iamnotsatoshi commented Jul 7, 2020

Hello,

The library is based on Adobe Clean fonts, which are downloaded from Internet and whose use is restricted to Adobe products. This raises a few questions:

  1. Is there any way to avoid loading any font from the Internet?

  2. If Coral Spectrum is considered an Adobe product by licence terms, which would permit the use of these restricted fonts, are we allowed to use these fonts in other widgets we would use in the same application?

  3. Is there any way to replace the use of Adobe Clean fonts with other, third party, fonts?

Thank you

@icaraps
Copy link
Contributor

icaraps commented Jul 7, 2020

Hello,

The documentation should answer most of your questions https://opensource.adobe.com/coral-spectrum/dist/documentation/manual/styles.html#fonts-via-typekit.
If not please let me know.

@iamnotsatoshi
Copy link
Author

iamnotsatoshi commented Jul 9, 2020

Thank you for your reply.

Actually, I did read this article before. But as I understand it, the library searches for fonts on the local machine by contacting a server running on the client-side. My guess is that in a development environment, this server would be a Typekit server of some kind; but in a production environment, this request would always fail and fallback to sending the request to use.typekit.net (although documented as *.adobe.com). Which is what I'd like.

Is there any way to just bypass the whole Typekit/Adobe Fonts thing and use a locally installed font of our choice, such as Roboto, Helvetica or other?

@icaraps
Copy link
Contributor

icaraps commented Jul 10, 2020

The library always uses the Typekit service to load the Adobe Clean fonts with a pre-configured Typekit Id see https://github.com/adobe/coral-spectrum/blob/master/coral-utils/src/scripts/Typekit.js#L45

You should use your own Typekit Id and you could chose different fonts.

@iamnotsatoshi
Copy link
Author

iamnotsatoshi commented Jul 10, 2020

Hello,

I understand that Typekit allows easy integration of fonts hosted by Adobe Fonts in any web project.
But although this may be very convenient for public websites, it raises concerns regarding the use of Coral Spectrum in the web UI of a standalone product.

Is this a use case you'd like to support?

I see two possible approaches:

  1. Completely bypass Typekit and have the library use local fonts selected by CSS
  2. Install a mini Typekit server on the server-side of the product to distribute fonts independently from Adobe services

Would one of these approaches be considered in the future?

@icaraps
Copy link
Contributor

icaraps commented Jul 17, 2020

I think you can already do 1. with a workaround by setting window.Typekit before loading Coral to fulfill the condition https://github.com/adobe/coral-spectrum/blob/master/coral-utils/src/scripts/Typekit.js#L32 so that Typekit won't be loaded.
Then you can use your own library to serve local fonts.

@iamnotsatoshi
Copy link
Author

Thank you for your reply.
Actually we noticed this before, but we considered it as hack and were unsure whether this technique could be used safely in the long term or could be disabled (intentionaly or not) in the future.

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

No branches or pull requests

2 participants