[GH-ISSUE #6] Font failed to install on Windows (via Github Actions) #1

Open
opened 2026-02-26 17:39:13 +03:00 by kerem · 1 comment
Owner

Originally created by @cN3rd on GitHub (Apr 10, 2021).
Original GitHub issue: https://github.com/Crosse/font-install/issues/6

Originally assigned to: @Crosse on GitHub.

I've been trying to use your tool in CI-related contexts.
It works perfectly on linux/macos, but it fails on windows.

Here is an example run:
https://github.com/cN3rd/PyonFX/runs/2312509943

The specific step is called "Install font":

      - name: Install fonts
        run: |
          GO111MODULE=on GOBIN=$HOME/.local/bin go get github.com/Crosse/font-install@v1.4.1
          $HOME/.local/bin/font-install -debug https://mirrors.tuna.tsinghua.edu.cn/osdn/mix-mplus-ipa/58720/migu-1p-20130430.zip
        shell: bash

and here's the output of that particular run:

Run GO111MODULE=on GOBIN=$HOME/.local/bin go get github.com/Crosse/font-install@v1.4.1
go: downloading github.com/Crosse/font-install v1.4.1
go: downloading github.com/Crosse/gosimplelogger v0.2.0
go: downloading golang.org/x/sys v0.0.0-20191118133127-cf1e2d577169
go: downloading github.com/ConradIrwin/font v0.0.0-20190603172541-e12dbea4cf12
go: downloading github.com/casimir/xdg-go v0.0.0-20160329195404-372ccc2180da
go: downloading dmitri.shuralyov.com/font/woff2 v0.0.0-20180220214647-957792cbbdab
go: downloading golang.org/x/text v0.3.2
go: downloading github.com/dsnet/compress v0.0.1
Installing font from https://mirrors.tuna.tsinghua.edu.cn/osdn/mix-mplus-ipa/58720/migu-1p-20130430.zip
Downloading font file from https://mirrors.tuna.tsinghua.edu.cn/osdn/mix-mplus-ipa/58720/migu-1p-20130430.zip
Detected content type: application/zip
Skipping non-font file "migu-1p-20130430/"
Scanning ZIP file for fonts
Skipping non-font file "migu-1p-20130430/ipag00303/"
Skipping non-font file "migu-1p-20130430/ipag00303/IPA_Font_License_Agreement_v1.0.txt"
Skipping non-font file "migu-1p-20130430/ipag00303/Readme_ipag00303.txt"
==> Migu 1P Bold
Skipping non-font file "migu-1p-20130430/migu-README.txt"
Installing "Migu 1P Bold" to C:\Windows/Fonts/migu-1p-20130430/migu-1p-bold.ttf
open C:\Windows/Fonts/migu-1p-20130430/migu-1p-bold.ttf: The system cannot find the path specified.
Installed 0 fonts
You will need to logoff and logon before the installed font(s) will be available.

I'm not sure what I'm doing wrong here.

Originally created by @cN3rd on GitHub (Apr 10, 2021). Original GitHub issue: https://github.com/Crosse/font-install/issues/6 Originally assigned to: @Crosse on GitHub. I've been trying to use your tool in CI-related contexts. It works perfectly on linux/macos, but it fails on windows. Here is an example run: https://github.com/cN3rd/PyonFX/runs/2312509943 The specific step is called "Install font": ``` - name: Install fonts run: | GO111MODULE=on GOBIN=$HOME/.local/bin go get github.com/Crosse/font-install@v1.4.1 $HOME/.local/bin/font-install -debug https://mirrors.tuna.tsinghua.edu.cn/osdn/mix-mplus-ipa/58720/migu-1p-20130430.zip shell: bash ``` and here's the output of that particular run: ``` Run GO111MODULE=on GOBIN=$HOME/.local/bin go get github.com/Crosse/font-install@v1.4.1 go: downloading github.com/Crosse/font-install v1.4.1 go: downloading github.com/Crosse/gosimplelogger v0.2.0 go: downloading golang.org/x/sys v0.0.0-20191118133127-cf1e2d577169 go: downloading github.com/ConradIrwin/font v0.0.0-20190603172541-e12dbea4cf12 go: downloading github.com/casimir/xdg-go v0.0.0-20160329195404-372ccc2180da go: downloading dmitri.shuralyov.com/font/woff2 v0.0.0-20180220214647-957792cbbdab go: downloading golang.org/x/text v0.3.2 go: downloading github.com/dsnet/compress v0.0.1 Installing font from https://mirrors.tuna.tsinghua.edu.cn/osdn/mix-mplus-ipa/58720/migu-1p-20130430.zip Downloading font file from https://mirrors.tuna.tsinghua.edu.cn/osdn/mix-mplus-ipa/58720/migu-1p-20130430.zip Detected content type: application/zip Skipping non-font file "migu-1p-20130430/" Scanning ZIP file for fonts Skipping non-font file "migu-1p-20130430/ipag00303/" Skipping non-font file "migu-1p-20130430/ipag00303/IPA_Font_License_Agreement_v1.0.txt" Skipping non-font file "migu-1p-20130430/ipag00303/Readme_ipag00303.txt" ==> Migu 1P Bold Skipping non-font file "migu-1p-20130430/migu-README.txt" Installing "Migu 1P Bold" to C:\Windows/Fonts/migu-1p-20130430/migu-1p-bold.ttf open C:\Windows/Fonts/migu-1p-20130430/migu-1p-bold.ttf: The system cannot find the path specified. Installed 0 fonts You will need to logoff and logon before the installed font(s) will be available. ``` I'm not sure what I'm doing wrong here.
Author
Owner

@Crosse commented on GitHub (Apr 11, 2021):

Hm, interesting. To be perfectly honest I haven't used Windows as a desktop for a few years now, so I haven't noticed that this was failing. I'll look into it (unless you have a fix you could PR?). I think I do remember that changes to fonts don't take effect until you logoff and logon (don't know why else I would have put that warning in 😆), but I think that really just means that fonts won't show up in the Fonts control panel applet. It also needs admin rights (IIRC?) to perform the install—or it did four years ago, at least?

Anyway, I'll test this on a Windows machine here soon and see if I can figure out what's going on, but if you figure it out before I do, feel free to open a pull request and we'll get this working!

<!-- gh-comment-id:817313009 --> @Crosse commented on GitHub (Apr 11, 2021): Hm, interesting. To be perfectly honest I haven't used Windows as a desktop for a few years now, so I haven't noticed that this was failing. I'll look into it (unless you have a fix you could PR?). I think I do remember that changes to fonts don't take effect until you logoff and logon (don't know why else I would have put that warning in 😆), but I think that really just means that fonts won't show up in the Fonts control panel applet. It also needs admin rights (IIRC?) to perform the install—or it did four years ago, at least? Anyway, I'll test this on a Windows machine here soon and see if I can figure out what's going on, but if you figure it out before I do, feel free to open a pull request and we'll get this working!
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/font-install#1
No description provided.