module RBPDFFontDescriptor
Copyright © 2011-2017 NAITOH Jun Released under the MIT license www.opensource.org/licenses/MIT
Public Class Methods
define(font_name = 'freesans') { |descriptors| ... }
click to toggle source
# File lib/rbpdf-font.rb, line 13 def self.define(font_name = 'freesans') @@descriptors[font_name] ||= {} yield @@descriptors[font_name] end
font(font_name)
click to toggle source
# File lib/rbpdf-font.rb, line 9 def self.font(font_name) @@descriptors[font_name.gsub(".rb", "")] end
getfontpath()
click to toggle source
Return fonts path
# File lib/rbpdf-font.rb, line 21 def self.getfontpath() # Is it in this plugin's font folder? fpath = File.join File.dirname(__FILE__), 'fonts' if File.exist?(fpath) return fpath end # Could not find it. nil end