lib/hexapdf/document/layout.rb in hexapdf-0.40.0 vs lib/hexapdf/document/layout.rb in hexapdf-0.41.0
- old
+ new
@@ -90,10 +90,17 @@
#
# And if Helvetica in its bold variant should be used it would be:
#
# style.font = ['Helvetica', variant: :bold]
#
+ # Helvetica in bold could also be set the conventional way:
+ #
+ # style.font = 'Helvetica bold'
+ #
+ # However, using an array it is also possible to specify other options when setting a font,
+ # like the :subset option.
+ #
class Layout
# This class is used when a box can contain child boxes and the creation of such boxes should
# be seemlessly doable when creating the parent node. It is yieled, for example, by Layout#box
# to collect the children for the created box.
@@ -537,10 +544,10 @@
#
# layout.table_box([['A', 'B'], ['C', 'D]]) do |args|
# # assign the predefined style :cell_text to all texts
# args[] = {style: :cell_text}
# # row 0 has a grey background and bold text
- # args[0] = {font: ['Helvetica', variant: :bold], cell: {background_color: 'eee'}}
+ # args[0] = {font: 'Helvetica bold', cell: {background_color: 'eee'}}
# # text in last column is right aligned
# args[0..-1, -1] = {text_align: :right}
# end
#
# See: HexaPDF::Layout::TableBox