diff --git a/CHANGELOG.md b/CHANGELOG.md index e7439ae72..1c081e440 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/helper/promo_screenshots_helper.rb b/lib/fastlane/plugin/wpmreleasetoolkit/helper/promo_screenshots_helper.rb index 01263391a..65a8422eb 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/helper/promo_screenshots_helper.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/helper/promo_screenshots_helper.rb @@ -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