Class: Ucode::Models::SpecialistFont

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/ucode/models/specialist_font.rb

Overview

One entry in config/specialist_fonts.yml — a Tier 1 font that fontist's formula index does not carry (academic sites, SIL downloads, GitHub releases). The fetcher walks a list of these and materializes each path on disk.

Wire shape (YAML):

label: Lentariso
version: "1.033"
license: OFL
url: "https://github.com/.../Lentariso.otf"
sha256: "<hex>"          # null until first successful fetch
path: "data/fonts/Lentariso.otf"
extract: false
extract_member: null     # required when extract: true
provenance: "Imperial Aramaic / Phoenician / Sidetic coverage"

url: null marks a local-only entry: the user supplies the file at path (which may use ~ and shell globs); the fetcher never attempts a network download for these.

Instance Method Summary collapse

Instance Method Details

#extract?Boolean

Returns:

  • (Boolean)


65
66
67
# File 'lib/ucode/models/specialist_font.rb', line 65

def extract?
  extract == true
end

#hash_known?Boolean

Returns:

  • (Boolean)


61
62
63
# File 'lib/ucode/models/specialist_font.rb', line 61

def hash_known?
  !sha256.nil? && !sha256.empty?
end

#local_only?Boolean

Returns:

  • (Boolean)


53
54
55
# File 'lib/ucode/models/specialist_font.rb', line 53

def local_only?
  url.nil? || url.empty?
end

#ofl?Boolean

Returns:

  • (Boolean)


57
58
59
# File 'lib/ucode/models/specialist_font.rb', line 57

def ofl?
  license == LICENSE_OFL
end