canvas-lms/public/fonts
Ed Schiebel 2b859ccf85 Add setting to choose Lato or Lato Extended font for canvas
closes LS-1559
flag=none

This makes 2 changes
1. Before, we were loading both Lato and Lato Extended fonts. This is
unnecessary since Lato Extended is a superset of Lato. Now the default
behavior is to load Lato Extended and not Lato.
2. Because we host the Lato Extended font files, Cisco loads them from
their own instance of Akamai, and they want to avoid the extra bandwidth
it's using. If Setting.get('disable_lato_extended', 'false') returns
anything other than 'false', canvas will load Lato instead.

I don't know why it started failing, but I had to tweak an rce
selenium test.

test plan:
  - load any canvas page
  > using the devtools Network panel, Font filter, expect to see
    our lato extended woff2 files downloaded from /fonts/lato/extended
    and not from fonts.gstatic.com/s/lato
  > expect the pages to look just like they did before
  - load a page with the RCE
  > expect the lato extended woff2 files loaded in the tinymce iframe
    also.
  - add some text including bold, italic and so forth
  > expect the text to look like it did before (see also LS-317)

  - in a rails console, run Setting.set('disable_lato_extended', 'true')
  - send a SIGHUP to the canvas server process
    (hint: `ps -a | grep puma` will find the process for `kill -1 <pid>`
  - load any canvas page
  > expect to see fonts from fonts.gstatic.com/s/lato, and not our
    files from /fonts/lato/extended
  - load a page with the RCE
  > expect to see the fonts loaded in the tinymce iframe
    from fonts.gstatic.com, and not ours from /fonts/lato/extended

Change-Id: Ia0c1820fa96e5ae9095c3cd1c796d381fd035a8a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250533
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-10-21 12:42:03 +00:00
..
canvas add "mastery-path" icon to the existing canvas icon-font 2016-09-07 02:39:21 +00:00
icons Revert and bring InstIcons into Canvas 2016-11-29 20:52:54 +00:00
lato Add setting to choose Lato or Lato Extended font for canvas 2020-10-21 12:42:03 +00:00
stixgeneral-bundle mv public/font public/fonts (so it works with asset pipeline) 2015-06-08 18:02:55 +00:00
Symbola.eot mv public/font public/fonts (so it works with asset pipeline) 2015-06-08 18:02:55 +00:00
Symbola.otf mv public/font public/fonts (so it works with asset pipeline) 2015-06-08 18:02:55 +00:00
Symbola.svg mv public/font public/fonts (so it works with asset pipeline) 2015-06-08 18:02:55 +00:00
Symbola.ttf mv public/font public/fonts (so it works with asset pipeline) 2015-06-08 18:02:55 +00:00
Symbola.woff mv public/font public/fonts (so it works with asset pipeline) 2015-06-08 18:02:55 +00:00
instructure_icons Use ui-icons instead of inst-icons for icon font 2018-05-29 20:57:04 +00:00