1

I use couple of open source fonts like Inter, Iosevka, Hack etc on Windows 10. Those fonts regularly get updated but it takes time to install a new version so I rarely or never do it.

I know some fonts are available on Windows Store which would solve the issue, but right now not a lot of fonts are there, none of the mentioned ones.

4
  • 1
    You don't mention what version of Windows you are using. Without that vital information, this question cannot be answered. – Ramhound Oct 24 '19 at 7:20
  • Added info about Windows 10 and Window Store. – David Vidmar Oct 25 '19 at 12:40
  • Check out a tool like chocolatey and whenever it provides packages for those fonts. You will probably have to come up with something of your own. You could probably build a PowerShell script for it. Also you'd have check what those updates actually entail and whenever it's worth the additional work. – Seth Oct 25 '19 at 13:08
  • That is the main issue... Not a lot of fonts are packaged, and those that are, are not maintained. I could become a packager and do the job, but I'm currently not a Chocholatey (or Scopp, or...) user and this font thing alone it's not tempting enough for me to become one. – David Vidmar Nov 4 '19 at 8:20
0

Answering my own question...

I ended up writting a simple PowerShell script. It will not install fonts, but it will find latest version, download a file and unzip it. Solve about 80% of my problem.

Here is a basic version of the script that will download latest releases of Iosevka and Inter fonts:

$fonts = @(
             @("Iosevka", "be5invis"),
             @("Inter", "rsms") 
)

foreach ($font in $fonts)
{

  $apiUrl = "https://api.github.com/repos/" + $font[1] + "/" + $font[0] + "/releases/latest"
  $json = Invoke-WebRequest $apiUrl
  $o = ConvertFrom-Json $json
  $downloadUrl = $o.assets[0].browser_download_url

  $filename = $downloadUrl.Substring($downloadUrl.LastIndexOf('/') + 1)    
  $localFilename = (Resolve-Path ".").Path + '\' + $filename

  if (Test-Path $localFilename)
  {

    "File $filename already exists! Skipping."

  } else {

    "Downloading $filename..."
    $progressPreference = 'silentlyContinue'
    $webResponse = Invoke-WebRequest $downloadUrl -UseBasicParsing
    $progressPreference = 'continue'
    [System.IO.File]::WriteAllBytes($localFilename, $webResponse.Content) 

    "Expanding $filename..."
    Expand-Archive -LiteralPath $localFilename -DestinationPath $font[0] -Force

  }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.