Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ _None_

### Bug Fixes

- Fix `check_fonts_installed` step in `create_promo_screenshots` [#615]
- Fix broken `draw_text_to_canvas` method for `create_promo_screenshots` [#614]

### Internal Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ def check_fonts_installed!(config:)
# Parse the first font in each `font-family` attribute found in all found CSS files.
# Only the first in each `font-family` font list matters, as others are fallbacks we don't want to use anyway.
font_families = all_stylesheets.flat_map do |s|
File.readlines(s).flat_map do |line|
stylesheet_path = resolve_path(s)
File.readlines(stylesheet_path).flat_map do |line|
attr = line.match(/font-family: (.*);/)&.captures&.first
attr.split(',').first.strip.gsub(/'(.*)'/, '\1').gsub(/"(.*)"/, '\1') unless attr.nil?
end
Expand Down