Returns an array of font names that Squib knows about. These are what Squib considers “system” fonts. For debugging purposes.
This is a module function, so it can be called anywhere with
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# require 'squib' require_relative '../../lib/squib' # Per issue #334, sometimes Pango doesn't find the font file you want # Pango requires fonts to be installed on the system, but sometimes the # font name is not obvious. e.g. "Foo Regular" might be actually named "Foo" # Use these methods to debug this problem # Usually you would just run this method to see what fonts are installed # This is commented out to make our test cases # Squib.print_system_fonts Squib.system_fonts.include? 'Open Sans' # checks if we have Open Sans installed # Note: does nothing since it's just a check