Esri / calcite-web

Authoritative front-end development resources for Calcite design initiative. Includes extendable base components and styles, as well as a modular and efficient framework for ArcGIS properties.
http://esri.github.io/calcite-web/
Apache License 2.0
108 stars 58 forks source link

Portal Deployments or no Internet Connection – Typeface #418

Closed julio8a closed 8 years ago

julio8a commented 8 years ago

From talking to @CassidyB it seems we can't have a local copy of Avenir in our apps (Operation Dashboard & Workforce) due to licensing issues.

Sourcing Avenir from fast.fonts.net will not work for portal deployments. Also, there are cases were Operation Dashboard is used in military operation where there is no internet connection.

@nikolaswise, Cassidy mentioned that you would have a secondary typeface suggestions for our app(s)?

fgarofalo10 commented 8 years ago

@julio8a - it's a question for Product Management, since (I believe) we would need to purchase a different license of Avenir to be embedded into apps that could be deployed on-premise (and not hosted in the "cloud"). Additionally, Product Management (I believe) would need to account for our use of a third-party asset within the product, in our legal documentation of the product... related to US government export compliance.

ffaubry commented 8 years ago

@fgarofalo10 - It makes sense. I think what we are after is: Can we replace the font without forking? What we would like is a way to provide our own fonts.

paulcpederson commented 8 years ago

I think as part of our fonts.com subscription we are actually allowed to self host. As long as we don't go above 20,000,000 pageviews per 30 days, we can host our fonts on our own server.

As far as licensing the font for Portal deployments, that is a bit more complicated. We need to have somebody from legal figure out what we can and can't do with this subscription so we can make an informed decision and move forward.

From my perspective, I'd much rather host the fonts even for people who do have an internet connection. We could host the font files on our cdn and reference them there, so we can whitelist who has access. This would help us cut down on requests. The request to fast fonts is made from the CSS file, which means it actually blocks page load and parsing of HTML until the request is completed.

@CassidyB do you know who we could talk to about figuring this out?

ffaubry commented 8 years ago

@paulcpederson No CDN. The fonts have to be part of the build and the deployment of the app. When we say no internet, it means any roundtrip outside of their domain is cut. Form an apps standpoint of view we could live with: a) a setting that basically tells calcite-bootstrap to fallback to default browser fonts b) a way to plug-in free fonts

paulcpederson commented 8 years ago

@ffaubry I know. I'm speaking not to your use case but to the general use case.

paulcpederson commented 8 years ago

BTW, you'll get solution a for free, that's how font stacks work in CSS. If a font is not found it will use the next one. So it already works like that.

ffaubry commented 8 years ago

@paulcpederson I understand. Still needs an answer to the Apps group issue. And BTW, we are not using calcite-web but calcite-bootstrap not sure why this issue is under calcite-web.. As for you last remarks, I know... The point is that we are getting requests attempt that fails.. not acceptable. So we need a way to disable these fonts.

paulcpederson commented 8 years ago

@ffaubry so just remove the request from the lib? That would be really easy to fix on a configuration level.

paulcpederson commented 8 years ago

We can absolutely do that, even as just a band aid measure until we figure out how to do self hosted fonts.

ffaubry commented 8 years ago

I ended up copying the bunch of import under calcite.scss without the font.scss in my scss instead of using @import 'calcite-bootstrap'; As a band aid the calcite-bootstrap could include a calcite-bootstrap-no-fonts.scss global.

paulcpederson commented 8 years ago

Ok. I would open an issue in calcite-bootstrap to add that as a config variable. At the calcite-web level you can turn that off by setting $include-type to false (https://github.com/Esri/calcite-web/blob/master/lib/sass/calcite-web.scss#L32). Although, we should probably make that more granular to hit this exact use case.

Looks like calcite bootstrap just copies and pastes the font import into _fonts.scss so they could throw a variable check around those imports that checked for $calcite-bootstrap-no-fonts before going and getting the fonts.

Leaving open, though, as I would still like to figure out if we can self host as part of our subscription.

ffaubry commented 8 years ago

@julio8a Could you log the issue as described by Paul in the calcite-bootstrap repo. Thx.

nikolaswise commented 8 years ago

Some notes on this:

it seems we can't have a local copy of Avenir in our apps (Operation Dashboard & Workforce) due to licensing issues.

We can purchase liscences for apps. @fgarofalo10 is on point here.

Still needs an answer to the Apps group issue.

See above - if it's an app like Collector that we distribute, we can purchase the font files we need for that use.

And BTW, we are not using calcite-web but calcite-bootstrap not sure why this issue is under calcite-web..

Calcite Bootstrap should be reflecting decisions made at the Calcite Web level. It's an implementation of this library. If we solve it here, we solve it for other projects like Calcite Dojo.


Some notes here http://www.fonts.com/info/legal/eula/server http://www.fonts.com/support/faq#app-ebook-server

@ffaubry @julio8a @fgarofalo10 How are we distributing typefaces to offline products now?

ffaubry commented 8 years ago

@nikolaswise Ok, I will contact of Product Manager @jeffshaner to get his answer to your questions.

nikolaswise commented 8 years ago

Allright - Calcite Web can now create a build that has no font imports from any cdn at all.

419 achieves this, and documents how it's done. Portal (or any other app that uses Calcite Web and wont have a connection to the outside world) can import the Calcite Web sass files, set $include-primary-family: false; and the resulting css will not include any font imports. The framework will fall back to other type defaults without making any network calls.