diff app/helpers/application_helper.rb @ 510:1afe06d9ba94 cannam_integration

Merge from branch "cannam"
author Chris Cannam
date Thu, 14 Jul 2011 10:42:41 +0100
parents 5d608412b003
children 5e80956cc792
line wrap: on
line diff
--- a/app/helpers/application_helper.rb	Mon Jul 11 16:35:45 2011 +0100
+++ b/app/helpers/application_helper.rb	Thu Jul 14 10:42:41 2011 +0100
@@ -913,6 +913,17 @@
     '<meta name="robots" content="noindex,follow,noarchive" />'
   end
 
+  def stylesheet_platform_font_tag
+    agent = request.env['HTTP_USER_AGENT']
+    name = 'fonts-generic'
+    if agent and agent =~ %r{Windows}
+      name = 'fonts-ms'
+    elsif agent and agent =~ %r{Macintosh}
+      name = 'fonts-mac'
+    end
+    stylesheet_link_tag name, :media => 'all'
+  end
+
   # Returns true if arg is expected in the API response
   def include_in_api_response?(arg)
     unless @included_in_api_response