@@ -7,6 +7,8 @@ require_relative 'squib/version'
|
||||
require_relative 'squib/commands/cli'
|
||||
require_relative 'squib/deck'
|
||||
require_relative 'squib/card'
|
||||
require_relative 'squib/system_fonts'
|
||||
|
||||
|
||||
module Squib
|
||||
using Rainbow # we can colorize strings now!
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
require 'pango'
|
||||
module Squib
|
||||
|
||||
# List all system fonts that Cairo/Pango can see
|
||||
# Wow this call was convoluted...
|
||||
# Returns array of strings with the names of fonts
|
||||
module_function def system_fonts
|
||||
cc = Cairo::Context.new(Cairo::ImageSurface.new(0,0)) # empty image
|
||||
cc.create_pango_layout.context.families.map {|f| f.name }
|
||||
end
|
||||
|
||||
# Prints out the system fonts in sorted order
|
||||
module_function def print_system_fonts
|
||||
puts "== DEBUG: Squib knows about these fonts =="
|
||||
puts system_fonts.sort
|
||||
end
|
||||
end
|
||||
@@ -6,6 +6,6 @@ module Squib
|
||||
# Most of the time this is in the alpha of the next release.
|
||||
# e.g. v0.0.5a is on its way to becoming v0.0.5
|
||||
#
|
||||
VERSION = '0.17.0a'
|
||||
VERSION = '0.16.1'
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user