Method: TkHTML_File_Viewer#pick_font_fs
- Defined in:
- sample/tkextlib/tkHTML/ss.rb
#pick_font_fs(size, attrs) ⇒ Object
This routine is called to pick fonts for the fullscreen view.
138 139 140 141 142 143 144 145 146 |
# File 'sample/tkextlib/tkHTML/ss.rb', line 138 def pick_font_fs(size, attrs) baseFontSize = 24 # puts "FontCmd: #{size} #{attrs}" [ ((attrs =~ /fixed/)? 'courier': 'charter'), (baseFontSize * (1.2**(size.to_f - 4.0))).to_i, ((attrs =~ /italic/)? 'italic': 'roman'), ((attrs =~ /bold/)? 'bold': 'normal') ].join(' ') end |