Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-44854

'svg' font type not served in font.php

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.2, 2.7
    • Fix Version/s: 2.6.3
    • Component/s: Themes
    • Labels:
    • Testing Instructions:
      Hide

      1. Using the supplied font 'https://tracker.moodle.org/secure/attachment/37257/BonvenoCF-Light-webfont.svg' which is GPLv2 licensed from: http://www.fontsquirrel.com/fonts/BonvenoCF.
      2. Place the svg file in a new folder 'fonts' in the 'Clean' theme.
      3. Edit the 'styles/custom.css' file and add:

      @font-face {
        font-family: 'BonvenoCF';
        src: url('[[font:theme|BonvenoCF-Light-webfont.svg]]#bonvenocflight') format('svg');
      }
       
      body {
        font-family: 'BonvenoCF';
      }
      

      4. With a compatible SVG font rendering browser and version as listed on: http://caniuse.com/svg-fonts.
      5. Purge all caches.
      6. Confirm that the body font for the front page (or any page) looks like the sample as shown on: http://www.fontsquirrel.com/fonts/BonvenoCF.

      Show
      1. Using the supplied font 'https://tracker.moodle.org/secure/attachment/37257/BonvenoCF-Light-webfont.svg' which is GPLv2 licensed from: http://www.fontsquirrel.com/fonts/BonvenoCF . 2. Place the svg file in a new folder 'fonts' in the 'Clean' theme. 3. Edit the 'styles/custom.css' file and add: @font-face { font-family: 'BonvenoCF'; src: url('[[font:theme|BonvenoCF-Light-webfont.svg]]#bonvenocflight') format('svg'); }   body { font-family: 'BonvenoCF'; } 4. With a compatible SVG font rendering browser and version as listed on: http://caniuse.com/svg-fonts . 5. Purge all caches. 6. Confirm that the body font for the front page (or any page) looks like the sample as shown on: http://www.fontsquirrel.com/fonts/BonvenoCF .
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip_MDL-44854_master

      Description

      In 'theme/font.php' there is no code to serve the 'svg' web font type and yet they are widely distributed in fonts such as FontAwesome:

      https://github.com/FortAwesome/Font-Awesome/blob/master/css/font-awesome.css#L10

      and

      https://github.com/FortAwesome/Font-Awesome/blob/master/fonts/fontawesome-webfont.svg.

        Attachments

          Activity

            People

            Assignee:
            gb2048 Gareth J Barnard
            Reporter:
            gb2048 Gareth J Barnard
            Peer reviewer:
            Mary Evans
            Integrator:
            Marina Glancy
            Tester:
            Damyon Wiese
            Participants:
            Component watchers:
            Bas Brands
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              12/May/14