Sha256: 3596be0b9d60c36045bd5351a98caaced45e87048fc50c7a4aa652d09059f6ed
Contents?: true
Size: 869 Bytes
Versions: 22
Compression:
Stored size: 869 Bytes
Contents
# # Composer - Fallback Fonts # # This example shows how to use the fallback font support of HexaPDF to replace # invalid glyphs with ones from other fonts. # # While the examples shows the usage of a single fallback font, it can easily be # generalized to support multiple fallback fonts. # # Usage: # : `ruby composer_fallback_fonts.rb` # require 'hexapdf' HexaPDF::Composer.create('composer_fallback_fonts.pdf') do |composer| zapf_dingbats = composer.document.fonts.add('ZapfDingbats') composer.document.config['font.fallback'] = ['ZapfDingbats'] composer.text('This text contains the scissors symbol ā which is not available in ' \ 'the default font Times but available in the set ZapfDingbats fallback ' \ 'font. Other symbols from ZapfDingbats like ā and ā can also be used.' \ "\n\nā¤ HexaPDF") end
Version data entries
22 entries across 22 versions & 1 rubygems