Sha256: 1d9a08bde2cf5196dbe07717339610a40b6152084e85da7109c48129585ef5f4

Contents?: true

Size: 469 Bytes

Versions: 13

Compression:

Stored size: 469 Bytes

Contents

#!/usr/bin/env ruby -w
require 'rmagick'

# Compute column widths
name_length = 0
family_length = 0
Magick.fonts do |font|
  if font.name.length > name_length
    name_length = font.name.length
  end
  if font.family.length > family_length
    family_length = font.family.length
  end
end

# Print all fonts
Magick.fonts do |font|
  printf("%-*s %-*s %d %s\t%s\n", name_length, font.name,
         family_length, font.family, font.weight, font.style, font.stretch)
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
rmagick-windows-2.16.5 doc/ex/fonts.rb
rmagick-windows-2.16.4 doc/ex/fonts.rb
rmagick-windows-2.16.3 doc/ex/fonts.rb
rmagick-windows-2.16.2 doc/ex/fonts.rb
rmagick-windows-2.16.1 doc/ex/fonts.rb
mdg-1.0.1 vendor/bundle/ruby/2.3.0/gems/rmagick-2.16.0/doc/ex/fonts.rb
rmagick-2.16.0 doc/ex/fonts.rb
rmagick-2.15.4 doc/ex/fonts.rb
rmagick-2.15.3 doc/ex/fonts.rb
rmagick-2.15.2 doc/ex/fonts.rb
rmagick-2.15.1 doc/ex/fonts.rb
rmagick-2.15.0 doc/ex/fonts.rb
rmagick-2.14.0 doc/ex/fonts.rb