Skip to content

Commit

Permalink
Merge pull request #3284 from DMPRoadmap/domo-arigato
Browse files Browse the repository at this point in the history
Switched Google font used in PDFs from Helvetica to Roboto
  • Loading branch information
benjaminfaure authored Jan 27, 2023
2 parents 00459b6 + cfc9b39 commit 1b816d9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Added popover for org profile page and added explanation for public plan
### Fixed

- Updated sans-serif font used in PDF downloads to Roboto since Google API no longer offers Helvetica
- Fixed discrepencies with default/max per_page values for API and UI pagination
- Updated JS that used to call the TinyMCE `setMode()` function so that it now calls `mode.set()` because the former is now deprecated.

Expand Down
2 changes: 1 addition & 1 deletion app/helpers/exports_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module ExportsHelper
}.freeze

def font_face
@formatting[:font_face].presence || 'Arial, Helvetica, Sans-Serif'
@formatting[:font_face].presence || 'Roboto, Arial, Sans-Serif'
end

def font_size
Expand Down
2 changes: 1 addition & 1 deletion app/models/settings/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module Settings
class Template < RailsSettings::SettingObject
VALID_FONT_FACES = [
'"Times New Roman", Times, Serif',
'Arial, Helvetica, Sans-Serif'
'Roboto, Arial, Sans-Serif'
].freeze

VALID_FONT_SIZE_RANGE = (8..14).freeze
Expand Down
4 changes: 2 additions & 2 deletions app/views/shared/export/_plan_styling.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<style>
@import 'https://fonts.googleapis.com/css?family=<%= font_face.downcase.include?('times') ? 'Times' : 'Helvetica' %>';
@import 'https://fonts.googleapis.com/css?family=<%= font_face.downcase.include?('times') ? 'Times' : 'Roboto' %>';

body {
font-family: <%= font_face %>;
Expand Down Expand Up @@ -58,5 +58,5 @@
}
.bold {
font-weight: bold;
}
}
</style>

0 comments on commit 1b816d9

Please sign in to comment.