manual/text/fallback_fonts.rb in prawn-2.2.2 vs manual/text/fallback_fonts.rb in prawn-2.3.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + # Prawn enables the declaration of fallback fonts for those glyphs that may not # be present in the desired font. Use the <code>:fallback_fonts</code> option # with any of the text or text box methods, or set fallback_fonts document-wide. require_relative '../example_helper' @@ -22,18 +24,18 @@ 'using the first font that includes the glyph, starting with the ' \ 'current font and then moving through the fallback fonts from left ' \ 'to right.' \ "\n\n" \ "hello ƒ 你好\n再见 ƒ goodbye", - fallback_fonts: ['Times-Roman', 'Kai'] + fallback_fonts: %w[Times-Roman Kai] ) end move_down 20 formatted_text( [ { text: 'Fallback fonts can even override' }, { text: 'fragment fonts (你好)', font: 'Times-Roman' } ], - fallback_fonts: ['Times-Roman', 'Kai'] + fallback_fonts: %w[Times-Roman Kai] ) end