add apple sym fallback

This commit is contained in:
24c02 2025-07-10 15:54:07 -04:00
parent 1a112006d1
commit 0d8d0ee71c
2 changed files with 4 additions and 4 deletions

Binary file not shown.

View file

@ -4,7 +4,7 @@ module SnailMail
def before_template
start_new_page unless page_number > 0
register_fonts
fallback_fonts(["arial", "noto"])
fallback_fonts %w[arial noto sym]
end
private
@ -18,12 +18,12 @@ module SnailMail
"gohu" => { normal: font_path("gohu.ttf") },
"noto" => { normal: font_path("noto sans regular.ttf") },
"times" => { normal: font_path("times.ttf") },
"sym" => { normal: font_path("apple-symbols.ttf") },
)
end
def font_path(font_name)
File.join(Rails.root, "app", "lib", "snail_mail", "assets", "fonts", font_name)
end
def font_path(font_name) = File.join(Rails.root, "app", "lib", "snail_mail", "assets", "fonts", font_name)
end
end
end