Class: Fontisan::Commands::InfoCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Fontisan::Commands::InfoCommand
- Defined in:
- lib/fontisan/commands/info_command.rb
Overview
Command to extract font metadata information.
This command extracts comprehensive font 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
Extract font information from all available tables.
Methods inherited from BaseCommand
Constructor Details
This class inherits a constructor from Fontisan::Commands::BaseCommand
Instance Method Details
#run ⇒ Models::FontInfo
Extract font information from all available tables.
20 21 22 23 24 25 26 27 |
# File 'lib/fontisan/commands/info_command.rb', line 20 def run info = Models::FontInfo.new populate_font_format(info) populate_from_name_table(info) if font.has_table?(Constants::NAME_TAG) populate_from_os2_table(info) if font.has_table?(Constants::OS2_TAG) populate_from_head_table(info) if font.has_table?(Constants::HEAD_TAG) info end |