module FontForge

Public Class Methods

convert(input, output) click to toggle source
# File lib/font-converter.rb, line 6
def convert(input, output)
  script_path = File.join(File.dirname(File.expand_path(__FILE__)), "font_forge/script/convert.sh")
  system "fontforge -script '#{script_path}' '#{input}' '#{output}'"
end
parse(file_path) click to toggle source
# File lib/font-converter.rb, line 11
def parse(file_path)
  script_path = File.join(File.dirname(File.expand_path(__FILE__)), "font_forge/script/parse.sh")
  stdout_str = `fontforge -script '#{script_path}' '#{file_path}'`.split("\n")
  {
    font_name: stdout_str[0],
    full_name: stdout_str[1],
    family_name: stdout_str[2]
  }
end
Also aliased as: 🔍
🔍(file_path)
Alias for: parse