Giter Site home page Giter Site logo

Comments (3)

matthewjberger avatar matthewjberger commented on June 6, 2024 1

@ueberBrot I liked your suggestion! I went ahead and consolidated the CascadiaCode font manifests the same way that the official releases did. Now they will all update together.

As for installing the new fonts and uninstalling the old ones, scoop should be able to just scoop uninstall fontName where fontName is any of the existing installed fonts. Should work properly even if the manifest was removed from this bucket

from scoop-nerd-fonts.

ueberBrot avatar ueberBrot commented on June 6, 2024

They are not separate files anymore but one zipfile.
The downloadable .zip file contains

  • CascadiaCode.ttf
  • CascadiaCodePL.ttf
  • CascadiaMono.ttf
  • CascadiaMonoPL.ttf

@matthewjberger
Maybe it would be best to combine those in one script for installation the same way as
e.g. Fira Code ?

I'm not sure if the following script works, because I've only corrected the links a little bit so far for my PRs of the Fira Code font. I used the Fira Code script as base for this:

{
    "version": "2005.15",
    "license": "OFL-1.1",
    "homepage": "https://github.com/microsoft/cascadia-code",
    "url": "https://github.com/microsoft/cascadia-code/releases/download/v2005.15/CascadiaCode_2005.15.zip",
    "hash": "b3d8495e9cdee90d0dbaf60b7db018413e130265dc27e2be7a8db04cf98fddce",
    "checkver": "github",
    "autoupdate": {
        "url": "https://github.com/microsoft/cascadia-code/releases/download/v$version/CascadiaCode_$version.zip"
    },
    "installer": {
        "script": [
            "Get-ChildItem $dir -Filter '*.ttf' -Recurse | ForEach-Object {",
            "  New-ItemProperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts' -Name $_.Name.Replace($_.Extension, ' (TrueType)') -Value $_.Name -Force | Out-Null",
            "  Copy-Item $_.FullName -destination \"$env:windir\\Fonts\"",
            "}"
        ]
    },
    "uninstaller": {
        "script": [
            "if(!(is_admin)) { error \"Admin rights are required, please run 'sudo scoop uninstall $app'\"; exit 1 }",
            "Get-ChildItem $dir -filter '*.ttf' | ForEach-Object {",
            "    Remove-ItemProperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts' -Name $_.Name.Replace($_.Extension, ' (TrueType)') -Force -ErrorAction SilentlyContinue",
            "    Remove-Item \"$env:windir\\Fonts\\$($_.Name)\" -Force -ErrorAction SilentlyContinue",
            "}",
            "Write-Host \"The '$app' font family has been uninstalled and will not be present after restarting your computer.\" -Foreground Magenta"
        ]
    }
}

Does this work for installing the new fonts and uninstalling the old ones?
Maybe you have to uninstall with the old scripts first and install with the then newly suggested script?

And is there a way to test the installation prior to submitting a newly script that was not used in that way before?

from scoop-nerd-fonts.

matthewjberger avatar matthewjberger commented on June 6, 2024

I've added a note to the readme about this change as well

from scoop-nerd-fonts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.