it-tools icon indicating copy to clipboard operation
it-tools copied to clipboard

Text to ASCII Art Generator unable to fetch fonts

Open artyPD opened this issue 8 months ago • 14 comments

Describe the bug

Initial page load throws Current settings resulted in error. Changing the font or width makes no difference:

Image

What happened?

It seems the page is unable to fetch any fonts. Issues persist across all browsers listed below:

Image

System information

System:

  • OS: Windows 11 10.0.26100
  • CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
  • Memory: 2.31 GB / 15.75 GB

Browsers:

  • Google Chrome (134.0.6998.177)
  • Firefox (136.0.3)
  • Edge (134.0.3124.93)

Where did you encounter the bug?

Public app (it-tools.tech)

artyPD avatar Mar 31 '25 06:03 artyPD

Hi @artyPD, sounds like unpkg.com has a problem

sharevb avatar Apr 01 '25 11:04 sharevb

Simple solution, as in it seems easy, but I'm not this competent YET... One day...

Host the font files locally.

Instead of loading fonts from unpkg.com, download them and serve them from the same domain (it-tools.tech). That way, there's no cross-origin request to be blocked.

Gormandy avatar Apr 02 '25 05:04 Gormandy

Hi @artyPD, sounds like unpkg.com has a problem

It seems so simple now. Thanks.

artyPD avatar Apr 02 '25 05:04 artyPD

I can do you one better (I think)... There are two slashes right before Standard. If you remove one, the font is actually loadable from unpkg. https://unpkg.com/[email protected]/fonts/Standard.flf. It might be a mere concatenation issue!

Cheers

bfqrst avatar Apr 02 '25 08:04 bfqrst

Hi @artyPD and @Gormandy and @bfqrst , I will serve fonts locally in my fork soon (for "safety reasons"). But as of now, this works again in my fork (ctrl+f5 may be needed): https://sharevb-it-tools.vercel.app/ascii-text-drawer

sharevb avatar Apr 02 '25 08:04 sharevb

Hi @sharevb, looks good!

It seems that Ctrl+F5 is needed to switch fonts. Swiching between the different fonts with reloading shows the same error. However, Ctrl+F5 then loads the font I selected because it was the last selected font. Is this what you meant with the Ctrl+F5?

artyPD avatar Apr 03 '25 06:04 artyPD

Hi @artyPD and @Gormandy and @bfqrst , I now serve fonts locally in my fork. May need one time "ctrl+f5" since it-tools is a PWA

sharevb avatar Apr 06 '25 20:04 sharevb

I can do you one better (I think)... There are two slashes right before Standard. If you remove one, the font is actually loadable from unpkg. https://unpkg.com/[email protected]/fonts/Standard.flf. It might be a mere concatenation issue!

Cheers

I am seeing this also. Has anything been done to change the concatenation for the fonts?

moltra avatar Apr 29 '25 19:04 moltra

Hi @artyPD and @Gormandy and @bfqrst and @moltra , I now serve fonts locally in my fork. May need one time "ctrl+f5" since it-tools is a PWA, at https://sharevb-it-tools.vercel.app/ascii-text-drawer and if you arr interested in up to date version of it-tools, I made kind of a fork here : https://github.com/sharevb/it-tools (https://sharevb-it-tools.vercel.app/ and docker images https://github.com/sharevb/it-tools/pkgs/container/it-tools)

sharevb avatar Apr 30 '25 07:04 sharevb

Hi @artyPD and @Gormandy and @bfqrst and @moltra , I now serve fonts locally in my fork. May need one time "ctrl+f5" since it-tools is a PWA, at https://sharevb-it-tools.vercel.app/ascii-text-drawer and if you arr interested in up to date version of it-tools, I made kind of a fork here : https://github.com/sharevb/it-tools (https://sharevb-it-tools.vercel.app/ and docker images https://github.com/sharevb/it-tools/pkgs/container/it-tools)

Thanks, it is working well. Just a heads up to anyone using this docker. The original docker uses port 80 your docker version uses port 8080. I did not realize this at first and had to re-edit the docker compose to correct this.

moltra avatar Apr 30 '25 12:04 moltra

vi /usr/share/nginx/html/assets/ascii-text-drawer-3abd67f7.js

Change "ascii-text-drawer:width",80),N=$(""),k=$(!1),R=$(!1);fe.defaults({fontPath:"//unpkg.com/[email protected]/fonts/" to "ascii-text-drawer:width",80),N=$(""),k=$(!1),R=$(!1);fe.defaults({fontPath:"//unpkg.com/[email protected]/fonts". Refresh

diracdelta420 avatar Jul 23 '25 14:07 diracdelta420

Hi @diracdelta420 , I now serve fonts locally in my fork. May need one time "ctrl+f5" since it-tools is a PWA, at https://sharevb-it-tools.vercel.app/ascii-text-drawer and if you arr interested in up to date version of it-tools, I made kind of a fork here : https://github.com/sharevb/it-tools (https://sharevb-it-tools.vercel.app/ and docker images https://github.com/sharevb/it-tools/pkgs/container/it-tools)

sharevb avatar Jul 23 '25 16:07 sharevb

The last release was build in October last year, is this awesome app still being developed or is there an active/maintained fork?

red-lichtie avatar Aug 26 '25 20:08 red-lichtie

Hi @red-lichtie , @diracdelta420, it should be ok on my fork

And if you are interested in an up to date version of it-tools, with many improvements, new tools, and bug fixes, as this repo is almost no more maintained, I made a fork here : https://github.com/sharevb/it-tools (https://sharevb-it-tools.vercel.app/ and docker images https://github.com/sharevb/it-tools/pkgs/container/it-tools)

sharevb avatar Aug 31 '25 20:08 sharevb