Squib
v0.19.0
  • Install & Update
  • Learning Squib
  • Parameters are Optional
  • Squib Thinks in Arrays
  • Layouts are Squib’s Best Feature
  • Be Data-Driven with XLSX and CSV
  • Unit Conversion
  • XYWH Shorthands
  • Specifying Colors & Gradients
  • The Mighty text Method
  • Always Have Bleed
  • Configuration Options
  • Vector vs. Raster Backends
  • Group Your Builds
  • Sprue Thy Sheets
  • Get Help and Give Help
  • CLI Reference
  • DSL Reference
    • Squib::Deck.new
    • background
    • build
    • build_groups
    • circle
    • cm
    • Squib.configure
    • csv
    • curve
    • cut_zone
    • Squib::DataFrame
    • disable_build
    • disable_build_globally
    • ellipse
    • enable_build
    • disable_build_globally
    • grid
    • hand
    • hint
    • inches
    • line
    • mm
    • png
    • polygon
    • print_system_fonts
      • Options
      • Examples
    • rect
    • safe_zone
    • save
    • save_pdf
    • save_png
    • save_sheet
    • showcase
    • star
    • svg
    • system_fonts
    • text
    • triangle
    • use_layout
    • xlsx
    • yaml
Squib
  • Docs »
  • DSL Reference »
  • print_system_fonts
  • Edit on GitHub

print_system_fonts¶

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 Squib.print_system_fonts

Options¶

None.

Examples¶

 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
Next Previous

© Copyright MIT License Revision 20ee941b.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: v0.19.0
Versions
latest
v0.19.0
v0.18.0
release
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.