TypeRip icon indicating copy to clipboard operation
TypeRip copied to clipboard

Wouldn't these small changes be possible?

Open Nickyg001 opened this issue 1 year ago • 3 comments

@CodeZombie With the new WOFF2 file creation system the file created is in fact an OTF with TTF extension.

  1. Wouldn't it be possible to change the *.TTF extension to *.OTF when writing files? (since it works anyway)

2.a PROBLEM! By downloading this font in particular: https://fonts.adobe.com/fonts/quasimoda
when I click on DOWNLOAD ALL on the site, the browser only downloads 10 files (in total that font family brings 22). I believe that this problem needs to be reviewed and can also be combined with the subsequent request 2b.

2b. When you click on the DOWNLOAD ALL button all the files are downloaded individually, it would not be possible to download them in compressed format *.RAR / *.ZIP (FontName.rar) so when I decompress the rar file I do it in a folder with the name of the automatic fonts?

3a. Wouldn't it be possible to write just the font name in the search URL bar instead of the URL?

3b. Wouldn't it be possible for the url bar to actually become a search bar for fonts that are present on the site?

  1. It would not be possible (perhaps I think it would take too long) to download all the fonts on the site

Nickyg001 avatar Jan 08 '24 14:01 Nickyg001

1: WOFF2 is a compression format that can contain both OTF and TTF files. The library I'm using to decompress the WOFF2 files does not seem to have any way to determine if the output file is a TTF or OTF. For this reason, I chose to just give the output a TTF extension as this seems to work regardless of whether the file is OpenType or TrueType.

The more correct solution would involve some kind of font-parser like OpenType.js to read the font file to determine its actual file type, and yes, it would be aesthetically better, but it seems low priority because I havent found any instances where this is actually an issue.

With that said, I will likely need to implement OpenType.js or some equivalent to rename the font family/style to resolve #30, at which point I'll look into correct file extensions.

2a: I'm investigating this issue right now. It seems like a problem with the popular file-saver.js module, but a workaround may be possible.

2b: Zipping the files is obviously preferable, but I was running into what appeared to be a bug in the popular JSZip module which would corrupt font files when placing more than more than 1 into a zip file before downloading. I'll continue investigating and trying to come up with a workaround, but I figured releasing the tool as-is with present bugs is better than wasting another 6 months trying to sort this out. I may disable the "Download All" button in the meantime however.

3a: Sure, but the "copy and paste the Adobe Fonts URL into TypeRip and press Enter" is faster and inherently more accurate than manually typing in the name of the font, so I can't think of a reason why anyone would want to do this. However, It's certainly not an anti-feature, so if you'd like to submit a PR I'd appreciate it!

3b: Use the search bar on Fonts.Adobe.com. Searching for fonts is beyond the scope of this project, this is just a scraper.

4: It's not just that it would take too long, the primary issue here is that getting an up-to-date list of all the fonts available on Adobe Fonts would (likely) require hitting their servers with thousands of requests, which would piss off our CORS proxy and Adobe's reverse proxy and likely get us banned from both.

CodeZombie avatar Jan 08 '24 22:01 CodeZombie

@CodeZombie I hope I have reported problems of real interest for the improvement of the script. I noticed these things not working properly and reported the problem for you to hear too riscontrato.

I'll try Firefox to see if it downloads the entire family of more than 10 characters.

The issue of ttf or otf file extension I try to always install otf if possible, but it is wrong to have oft fonts with ttf extension, even when the font managers identify it as OTF.

However, one important thing among all as reported in problem #30 is the generation of the family and subfamily name bold, semibold etc.. this is the most relevant problem of all.The others are but slightly less important.

Good job I know you will be able to solve these problems, you are great.

Nickyg001 avatar Jan 09 '24 09:01 Nickyg001

a. I confirm with Chrome with DOWNLOAD ALL it downloads only 10 files, with Firefox it downloads all the files present.

b. I confirm that there is a file naming problem, as you can see in the photo, those in yellow are active, those not in yellow are not activated because they are already present, those in yellow have the same name.

Example: [Quasimoda Black / Quasimoda Black Italic ] Both are identified as Quasimoda Black

image

Nickyg001 avatar Jan 09 '24 13:01 Nickyg001