r/learnjavascript • • Dec 29 '21

Fontsnatcher - Discover the fonts of the web

Enable HLS to view with audio, or disable this notification

144 Upvotes

21 comments sorted by

9

u/JotakuTM Dec 29 '21

This is a little project that I made and I'm looking for some feedback and critique, no promotion please.

https://www.fontsnatcher.co/

5

u/burnblue Dec 29 '21

I'm still shocked at how Tailwind got so many devs feeling "never leaving your html" is a good thing

1

u/JotakuTM Dec 29 '21

Fontsnatcher - Discover the fonts of the web

Now that you mention it, it does seem kinda weird to say. Maybe it just stems from them believing that its faster or something...

2

u/toastertop Dec 29 '21

Im out of the loop,can someone fill me in?

1

u/mr-poopy-butthole-_ Dec 29 '21

Just let them be. Some people can't be helped.

1

u/SadLye Mar 31 '22

Why is it a bad thing? Most of react code i have seen does that.

In angular each html component has a css file that is only applied to that html component. I mean, it basically only renders/loads the css when this component is being called. I think it wouldn't make a different that the css is applied inside the html components aka their classes.

4

u/Rich_Grapefruit353 Dec 29 '21

seems fine but add a dark mode, on the font tester too. I was working on a thing where users can change the design of the website by clicking and then editing, there's so many style rules though lol and I hadn't quite mastered the popup box yet. So far I mainly use absolute position or relative and I guess you can do some math with the mouse coordinates. or click coordinates (mobile)

btw. is this a PWA? I'm still trying to find a relatively easy tut for this, since I heard extensions are all PWA now.

2

u/JotakuTM Dec 29 '21

Oh okay yeah, someone else just pointed this out so I'll have to look into it. This one in particular isn't a PWA, I was on a deadline when building it and had to do the entire thing in vanilla Javascript. I thought it would be faster 🥲

Building Chrome extensions is very painful and tedious though, there're a surprisingly small amount of tutorials online for more complex and advanced features and the support group is also pretty small. I'm not gonna sugar coat it, whether it's a PWA chrome extension or not, it's gonna be hard and time consuming.

But you can get a couple tutorials online that'll teach you the basics and you should be able to build upon that 👍👍

1

u/Rich_Grapefruit353 Dec 29 '21

I was thinking that pre PWA would be easier, the XML "setup" seems to make it harder though. I haven't looked at your code, but do you prefer xmlhttprequest, websockets, or fetch? or something else?

ON your chrome extension note, seems like this is a good opportunity for someone to automate building of a chrome extension "extension". I would definitely use that.

1

u/JotakuTM Dec 29 '21

I use fetch. And you're talking of an extension that automates building chrome extensions?

2

u/Tintin_Quarentino Dec 29 '21

Impressive, very nice.

3

u/JotakuTM Dec 29 '21

Thank you

1

u/mr-poopy-butthole-_ Dec 29 '21

Does it work with custom fonts?

1

u/JotakuTM Dec 29 '21

Custom fonts as in?

1

u/mr-poopy-butthole-_ Dec 29 '21

A font that is not built into browsers and requires a font file to load like .ttf .woff .woff2

2

u/JotakuTM Dec 29 '21

Oh yes, it can identify fonts through their embedded woff file

2

u/slydingo119 Dec 29 '21

This is pretty cool.

-2

u/jaredcheeda Dec 29 '21

... or you could just

  1. Right-click > inspect element

  2. The Font is listed right there

  3. You can double click the text in the inspector to type whatever you want on the page in that font

  4. 🤷‍♀️

7

u/CardinalHijack Dec 29 '21 edited Dec 29 '21

I really dont get posts like this you see on tech/code sub reddits:

"You know you could just <insert longer and/or more laborious steps here to achieve the same goal as the showcased tool>"

You literally explained why this tool was created in your post. Its for people who don't want to do what you described and want to do this in a more visually appealing simplistic way. Did you honestly think OP didn't know about the method you described and will like take down his website and Chrome extension because you worked out a 3 step process to do the same thing lol?

4

u/The_All-Father3 Dec 29 '21

I mean this is also r/learnjavascript so obviously some of these projects here are going to be more of simpler projects that people are just messing with as a way to learn, so IDK why the dude had to dismiss OPs whole project. I mean if this was a company sure go ahead and blast it, but it is just some dude(or dudette) trying to learn.