cask "font-latin-modern" do
  version "2.007,31_03_2026"
  sha256 "2d8e05083e211ac838a9e306fb5e4856ed37ec15130e185a971e2683a7c5d1a1"

  url "https://www.gust.org.pl/projects/e-foundry/latin-modern/download/Latin_Modern-otf-#{version.csv.first.dots_to_underscores}#{"-#{version.csv.second}" if version.csv.second}.zip"
  name "Latin Modern"
  homepage "https://www.gust.org.pl/projects/e-foundry/latin-modern"

  livecheck do
    url "https://www.gust.org.pl/projects/e-foundry/latin-modern/download"
    regex(/href=.*?Latin[._-]Modern[._-]otf[._-]v?(\d+(?:[._]\d+)+)(?:-(\d+(?:[._]\d+)+))?\.zip/i)
    strategy :page_match do |page, regex|
      page.scan(regex).map do |match|
        version = match[0].tr("_", ".")
        match[1].present? ? "#{version},#{match[1]}" : version
      end
    end
  end

  font "lmmono10-italic.otf"
  font "lmmono10-regular.otf"
  font "lmmono12-regular.otf"
  font "lmmono8-regular.otf"
  font "lmmono9-regular.otf"
  font "lmmonocaps10-oblique.otf"
  font "lmmonocaps10-regular.otf"
  font "lmmonolt10-bold.otf"
  font "lmmonolt10-boldoblique.otf"
  font "lmmonolt10-oblique.otf"
  font "lmmonolt10-regular.otf"
  font "lmmonoltcond10-oblique.otf"
  font "lmmonoltcond10-regular.otf"
  font "lmmonoprop10-oblique.otf"
  font "lmmonoprop10-regular.otf"
  font "lmmonoproplt10-bold.otf"
  font "lmmonoproplt10-boldoblique.otf"
  font "lmmonoproplt10-oblique.otf"
  font "lmmonoproplt10-regular.otf"
  font "lmmonoslant10-regular.otf"
  font "lmroman10-bold.otf"
  font "lmroman10-bolditalic.otf"
  font "lmroman10-italic.otf"
  font "lmroman10-regular.otf"
  font "lmroman12-bold.otf"
  font "lmroman12-italic.otf"
  font "lmroman12-regular.otf"
  font "lmroman17-oblique.otf"
  font "lmroman17-regular.otf"
  font "lmroman5-bold.otf"
  font "lmroman5-regular.otf"
  font "lmroman6-bold.otf"
  font "lmroman6-regular.otf"
  font "lmroman7-bold.otf"
  font "lmroman7-italic.otf"
  font "lmroman7-regular.otf"
  font "lmroman8-bold.otf"
  font "lmroman8-italic.otf"
  font "lmroman8-regular.otf"
  font "lmroman9-bold.otf"
  font "lmroman9-italic.otf"
  font "lmroman9-regular.otf"
  font "lmromancaps10-oblique.otf"
  font "lmromancaps10-regular.otf"
  font "lmromandemi10-oblique.otf"
  font "lmromandemi10-regular.otf"
  font "lmromandunh10-oblique.otf"
  font "lmromandunh10-regular.otf"
  font "lmromanslant10-bold.otf"
  font "lmromanslant10-regular.otf"
  font "lmromanslant12-regular.otf"
  font "lmromanslant8-regular.otf"
  font "lmromanslant9-regular.otf"
  font "lmromanunsl10-regular.otf"
  font "lmsans10-bold.otf"
  font "lmsans10-boldoblique.otf"
  font "lmsans10-oblique.otf"
  font "lmsans10-regular.otf"
  font "lmsans12-oblique.otf"
  font "lmsans12-regular.otf"
  font "lmsans17-oblique.otf"
  font "lmsans17-regular.otf"
  font "lmsans8-oblique.otf"
  font "lmsans8-regular.otf"
  font "lmsans9-oblique.otf"
  font "lmsans9-regular.otf"
  font "lmsansdemicond10-oblique.otf"
  font "lmsansdemicond10-regular.otf"
  font "lmsansquot8-bold.otf"
  font "lmsansquot8-boldoblique.otf"
  font "lmsansquot8-oblique.otf"
  font "lmsansquot8-regular.otf"

  # No zap stanza required
end
