diff --git a/app/assets/fonts/inter/inter-latin-ext.woff2 b/app/assets/fonts/inter/inter-latin-ext.woff2 new file mode 100644 index 0000000..57da6f8 Binary files /dev/null and b/app/assets/fonts/inter/inter-latin-ext.woff2 differ diff --git a/app/assets/fonts/inter/inter-latin.woff2 b/app/assets/fonts/inter/inter-latin.woff2 new file mode 100644 index 0000000..91dc3e8 Binary files /dev/null and b/app/assets/fonts/inter/inter-latin.woff2 differ diff --git a/app/assets/stylesheets/vendor/inter.css b/app/assets/stylesheets/vendor/inter.css new file mode 100644 index 0000000..6d7b09b --- /dev/null +++ b/app/assets/stylesheets/vendor/inter.css @@ -0,0 +1,18 @@ +/* latin-ext */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 400 800; + font-display: swap; + src: url("/inter/inter-latin-ext.woff2") format('woff2'); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 400 800; + font-display: swap; + src: url("/inter/inter-latin.woff2") format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} diff --git a/app/views/layouts/display.html.erb b/app/views/layouts/display.html.erb index 1e7adc7..17f77f6 100644 --- a/app/views/layouts/display.html.erb +++ b/app/views/layouts/display.html.erb @@ -18,7 +18,7 @@ <%# Be sure to add your own custom favicons %> <%= render "shared/favicons" %> - + <%= stylesheet_link_tag "vendor/inter", media: "all" %> <%= yield :head %> diff --git a/app/views/layouts/errors.html.erb b/app/views/layouts/errors.html.erb index 8bf2fca..668ce95 100644 --- a/app/views/layouts/errors.html.erb +++ b/app/views/layouts/errors.html.erb @@ -18,7 +18,7 @@ <%# Be sure to add your own custom favicons %> <%= render "shared/favicons" %> - + <%= stylesheet_link_tag "vendor/inter", media: "all" %> <%= yield :head %> diff --git a/app/views/layouts/minimal.html.erb b/app/views/layouts/minimal.html.erb index 7489e12..03d4d1b 100644 --- a/app/views/layouts/minimal.html.erb +++ b/app/views/layouts/minimal.html.erb @@ -18,7 +18,7 @@ <%# Be sure to add your own custom favicons %> <%= render "shared/favicons" %> - + <%= stylesheet_link_tag "vendor/inter", media: "all" %> <%= yield :head %> diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb index c8da354..959b383 100644 --- a/config/initializers/content_security_policy.rb +++ b/config/initializers/content_security_policy.rb @@ -7,11 +7,11 @@ Rails.application.configure do config.content_security_policy do |policy| policy.default_src :self - policy.font_src :self, "https://fonts.gstatic.com" + policy.font_src :self policy.img_src :self, :data policy.object_src :none policy.script_src :self - policy.style_src :self, :unsafe_inline, "https://fonts.googleapis.com" + policy.style_src :self, :unsafe_inline policy.connect_src :self policy.frame_src :self policy.base_uri :self