class qdii::font {
  if $qdii::is_desktop {
      File {
        ensure => file,
        owner  => 'qdii',
        group  => 'qdii',
        mode   => '0600',
      }
      file { 'font_directory':
          ensure => 'directory',
          path   => "$qdii::homedir/.fonts"
      }
      file { 'install_signerica_fat':
          ensure  => 'file',
          path    => "$qdii::homedir/.fonts/Signerica_Fat.ttf",
          source  => 'puppet:///modules/qdii/misc/Signerica_Fat.ttf',
          require => File['font_directory'],
          notify  => Exec['reload_fc'],
      }
      file { 'install_montserrat_regular':
          ensure => 'file',
          path   => "$qdii::homedir/.fonts/Montserrat-Regular.otf",
          source => 'puppet:///modules/qdii/misc/Montserrat-Regular.otf',
          require => File['font_directory'],
          notify  => Exec['reload_fc'],
      }
      file { 'install_libre_baskerville':
          ensure => 'file',
          path   => "$qdii::homedir/.fonts/LibreBaskerville-Regular.otf",
          source => 'puppet:///modules/qdii/misc/LibreBaskerville-Regular.otf',
          require => File['font_directory'],
          notify  => Exec['reload_fc'],
      }
      file { 'install_lato_regular':
          ensure  => 'file',
          path    => "$qdii::homedir/.fonts/Lato-Regular.ttf",
          source  => 'puppet:///modules/qdii/misc/Lato-Regular.ttf',
          require => File['font_directory'],
          notify  => Exec['reload_fc'],
      }
      exec { 'reload_fc':
          cwd     => "$qdii::homedir/.fonts",
          command => "/usr/bin/fc-cache -f"
      }
  }
}
