Sha256: e33c281aa16cce41e69484cc444f578f6eda5d4c199d8c830690ec3bcf5ce4e1

Contents?: true

Size: 485 Bytes

Versions: 67

Compression:

Stored size: 485 Bytes

Contents

#! /usr/local/bin/ruby -w
require 'RMagick'

# Compute column widths
name_length = 0
family_length = 0
Magick::fonts { |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
}

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

Version data entries

67 entries across 67 versions & 2 rubygems

Version Path
rmagick-2.8.0 doc/ex/fonts.rb
rmagick-2.7.2 doc/ex/fonts.rb
rmagick-2.7.0 doc/ex/fonts.rb
rmagick-2.7.1 doc/ex/fonts.rb
rmagick-2.9.0 doc/ex/fonts.rb
rmagick-2.9.2 doc/ex/fonts.rb
rmagick-2.9.1 doc/ex/fonts.rb