Module: Fontist::Import

Defined in:
lib/fontist/import.rb,
lib/fontist/import/otf.rb,
lib/fontist/import/files.rb,
lib/fontist/import/google.rb,
lib/fontist/import/models.rb,
lib/fontist/import/helpers.rb,
lib/fontist/import/font_style.rb,
lib/fontist/import/google/api.rb,
lib/fontist/import/text_helper.rb,
lib/fontist/import/sil_importer.rb,
lib/fontist/import/google/models.rb,
lib/fontist/import/google_import.rb,
lib/fontist/import/otf/font_file.rb,
lib/fontist/import/create_formula.rb,
lib/fontist/import/import_display.rb,
lib/fontist/import/macos_importer.rb,
lib/fontist/import/formula_builder.rb,
lib/fontist/import/template_helper.rb,
lib/fontist/import/convert_formulas.rb,
lib/fontist/import/upgrade_formulas.rb,
lib/fontist/import/v4_to_v5_migrator.rb,
lib/fontist/import/formula_serializer.rb,
lib/fontist/import/google/models/axis.rb,
lib/fontist/import/files/font_detector.rb,
lib/fontist/import/google/data_sources.rb,
lib/fontist/import/helpers/hash_helper.rb,
lib/fontist/import/google/font_database.rb,
lib/fontist/import/models/font_metadata.rb,
lib/fontist/import/recursive_extraction.rb,
lib/fontist/import/files/collection_file.rb,
lib/fontist/import/google_fonts_importer.rb,
lib/fontist/import/helpers/system_helper.rb,
lib/fontist/import/google/data_sources/vf.rb,
lib/fontist/import/google/formula_builder.rb,
lib/fontist/import/google/metadata_parser.rb,
lib/fontist/import/google/models/metadata.rb,
lib/fontist/import/manual_formula_builder.rb,
lib/fontist/import/font_metadata_extractor.rb,
lib/fontist/import/google/data_sources/ttf.rb,
lib/fontist/import/google/metadata_adapter.rb,
lib/fontist/import/google/data_sources/base.rb,
lib/fontist/import/google/data_sources/woff2.rb,
lib/fontist/import/google/models/font_family.rb,
lib/fontist/import/google/data_sources/github.rb,
lib/fontist/import/google/models/font_variant.rb,
lib/fontist/import/google/models/axis_metadata.rb,
lib/fontist/import/google/models/file_metadata.rb,
lib/fontist/import/font_parsing_error_collector.rb,
lib/fontist/import/google/models/source_metadata.rb,
lib/fontist/import/google/models/font_file_metadata.rb,
lib/fontist/import/google/formula_builders/formula_builder_v4.rb,
lib/fontist/import/google/formula_builders/formula_builder_v5.rb,
lib/fontist/import/google/formula_builders/base_formula_builder.rb

Defined Under Namespace

Modules: Files, Google, Helpers, ImportDisplay, Models, Otf, TemplateHelper, TextHelper Classes: ConvertFormulas, CreateFormula, FontMetadataExtractor, FontParsingErrorCollector, FontStyle, FormulaBuilder, FormulaSerializer, GoogleFontsImporter, GoogleImport, MacosImporter, ManualFormulaBuilder, RecursiveExtraction, SilImporter, UpgradeFormulas, V4ToV5Migrator

Class Method Summary collapse

Class Method Details

.name_to_filename(name) ⇒ Object



27
28
29
# File 'lib/fontist/import.rb', line 27

def name_to_filename(name)
  "#{name.downcase.gsub(' ', '_')}.yml"
end

.normalize_filename(name) ⇒ String

Normalize a font name to a consistent base filename (without extension) This MUST match the normalization in FormulaBuilder#generate_filename

Parameters:

  • name (String)

    Font family name

Returns:

  • (String)

    Normalized base filename (no extension)



36
37
38
# File 'lib/fontist/import.rb', line 36

def normalize_filename(name)
  name.downcase.gsub(" ", "_")
end