Skip to content

Commit

Permalink
Solara
Browse files Browse the repository at this point in the history
  • Loading branch information
ideyaa committed Sep 17, 2024
1 parent aab0509 commit 4852589
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions solara/lib/core/brands/brand_font_switcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def add_fonts_to_pubspec
end

def copy_fonts(destination)
FontCopier.new.copy(destination)
FontCopier.new.copy(destination, @font_files)
end
end

Expand All @@ -82,7 +82,7 @@ def switch
private

def copy_fonts(destination)
FontCopier.new.copy(destination)
FontCopier.new.copy(destination, @font_files)
end
end

Expand All @@ -108,14 +108,12 @@ def switch
private

def copy_fonts(destination)
FontCopier.new.copy(destination)
FontCopier.new.copy(destination, @font_files)
end
end

class FontCopier
def copy(destination)
fonts_path = FilePath.brand_fonts
font_files = Dir.glob(File.join(fonts_path, '*.{ttf,otf}'))
def copy(destination, font_files)
FileUtils.mkdir_p(destination)
return if font_files.empty?

Expand Down

0 comments on commit 4852589

Please sign in to comment.