Class: Fontisan::Commands::InfoCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Fontisan::Commands::InfoCommand
- Defined in:
- lib/fontisan/commands/info_command.rb
Overview
Command to extract font or collection metadata information.
This command auto-detects whether the input is a collection (TTC/OTC) or individual font (TTF/OTF) and returns the appropriate model:
-
CollectionInfo for TTC/OTC files
-
FontInfo for TTF/OTF files
For individual fonts, extracts comprehensive information from various tables:
-
name table: family names, version, copyright, etc.
-
OS/2 table: vendor ID, embedding permissions
-
head table: font revision, units per em
Instance Method Summary collapse
-
#run ⇒ Models::FontInfo, Models::CollectionInfo
Extract information from font or collection.
Methods inherited from BaseCommand
Constructor Details
This class inherits a constructor from Fontisan::Commands::BaseCommand
Instance Method Details
#run ⇒ Models::FontInfo, Models::CollectionInfo
Extract information from font or collection.
Auto-detects file type and returns appropriate model.
32 33 34 35 36 37 38 |
# File 'lib/fontisan/commands/info_command.rb', line 32 def run if FontLoader.collection?(@font_path) collection_info else font_info end end |