Class: DragonflyFonts::Processors::SetTtfNames
- Inherits:
-
Object
- Object
- DragonflyFonts::Processors::SetTtfNames
- Defined in:
- lib/dragonfly_fonts/processors/set_ttf_names.rb
Constant Summary collapse
- NAME_IDS =
{ compatible_full: 18, copyright: 0, description: 10, designer: 9, designer_url: 12, fontname: 1, fullname: 4, license: 13, license_url: 14, manufacturer: 8, postscript_cid: 20, postscript_name: 6, preferred_family: 16, preferred_subfamily: 17, sample_text: 19, trademark: 7, uid: 3, vendor_url: 11, version: 5, weight: 2 }
Instance Method Summary collapse
Instance Method Details
#call(content, options = {}) ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/dragonfly_fonts/processors/set_ttf_names.rb', line 30 def call(content, = {}) raise UnsupportedFormat unless content.ext raise UnsupportedFormat unless FONT_FORGE_SUPPORTED_FORMATS.include?(content.ext.downcase) content.shell_update(ext: content.ext || 'ttf') do |old_path, new_path| "#{fontforge_command} -lang=ff -c 'Open($1); #{command_string()} Generate($2);' #{old_path} #{new_path}" end end |