fontist / formulas

Fontist Font Formulas
6 stars 0 forks source link

Fontist font download progress total MB sometimes stuck at "5MB"? #89

Closed ronaldtse closed 3 years ago

ronaldtse commented 3 years ago

The total size is sometimes stuck at "5MB".

e.g.

Downloading font "work_sans" from https://github.com/weiweihuanghuang/Work-Sans/archive/v2.010.zip
Downloads: 110MB/5MB (2200.65%)
Installing font "work_sans".
Fonts installed at:
- /root/.fontist/fonts/WorkSans-Black.ttf
- /root/.fontist/fonts/WorkSans-BlackItalic.ttf
Downloading font "stix" from https://github.com/stipub/stixfonts/archive/v2.10.zip
Downloads: 77MB/5MB (1556.05%)
Installing font "stix".
Fonts installed at:
- /root/.fontist/fonts/STIXTwoMath-Regular.otf
- /root/.fontist/fonts/STIXTwoText-Bold.otf

But this is correct?

Downloading font "source" from https://github.com/fontist/source-fonts/releases/download/v1.0/source-fonts-1.0.zip
Downloads: 96MB/96MB (100.00%)
Installing font "source".
Fonts installed at:
- /root/.fontist/fonts/SourceSansPro-BlackIt.ttf
- /root/.fontist/fonts/SourceSansPro-It.ttf
alexeymorozov commented 3 years ago

In previous tasks these behavior has been slightly changed.

"5MB" has been shown when there were no Content-Length header. Now it just shows how many MBs is already downloaded:

Downloading:  2 MiB

And shows total when it's done:

Downloading:  110 MiB, 4.73 MiB/s, done.

When Content-Length is present, it shows size and completeness in percents:

Downloading:  54% (1/2 MiB)

And then:

Downloading: 100% (2/2 MiB), 1.40 MiB/s, done.

E.g. Chrome uses the same technique for these urls.

Let's keep it?

ronaldtse commented 3 years ago

Agree. Thanks!