-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to Upload Fonts to Editor #2050
Comments
We don't have storage to store uploaded fonts, rejected. |
I said that it could be saved to the computer storage. |
Other users would not see it. |
You can store a link to the font in the svg? I think I've done this with Sora before... |
@TheColaber This is only possible with fonts that are available online, not with uploaded fonts. |
True, so why not do that? Why not use some API or something, so the user can input "Sora" and returns a URL to it's styles |
Reopening. Classic Apple closing stuff for reading only a portion of the text. Alternatives may exist in various form. |
Well, he said to store "the link," not "the file". I don't know, is it possible to embed fonts to |
We could provide more fonts by converting SVG text into path (but somehow storing metadata that will still allow the user to edit the path as if it was text) |
In that case, there might as well be a scratch tool website to do this. Enter text, choose point, download svg. Then import to scratch |
Downloading is a little too much, I have more than 100 files just from doing that from Google Drawings |
I think this person wants it to be stored locally for personal use. Maybe the backpack can be abused so it can saved through the account. |
Solution: use Google Fonts. A list of google fonts, like the google docs one. |
For the Google Fonts suggestion, my idea is: |
@Secret-chest there are waaaaaay too many google fonts for that to work.
|
@RedGuy12 It will only link to the font when you actually choose it |
Re Google Docs, I believe their TTF files are in google/fonts. They don't need to be included as part of the extension files; instead, perhaps they could be fetched when used, ideally from fonts.googleapis.com To convert to SVG, one could use opentype.js; it only supports OTF and TTF formats, so a different library is needed to decompress WOFF/WOFF2 files. AFAIK, Scratch already allows any arbitrary font family value in SVGs, and presumably if the font isn't supported, it reverts to a fallback |
Will the option to import fonts also be included? |
I'm only suggesting how this could be implemented, but I have no plans on actually implementing this It should be possible to import fonts of a select few file formats; it would have the same issue as with Google Fonts where it won't work for others if they don't have Scratch Addons (until converted to an SVG path, which would be hard to edit as text unless, as W_L suggested, we kept track of the text paths in some metadata). Another concern might be that we won't have access to the font file on reload; it could be saved in the browser, which would be a bit redundant, or we could just have users reupload the font when they return to editing, displaying the fallback in the meantime (though I suppose another option would be to upload fonts to Scratch's asset servers 👀) |
oh yes |
don't svgs have the ability to import fonts and stuff from a url? we could upload some nice fonts to assets.scratch.mit.edu and then automatically import them for the user |
IIRC if rendered as an embedded image as opposed to opened standalone in a new tab, SVGs won't fetch external resources. The assets server might also not return the correct MIME type for the font files, which might anger the browser It's not out of the ordinary to have to manually and explicitly irreversibly convert text to a path IMO |
It would be better if we included some fonts, and then possibly as we update, add more fonts? |
@jeffalo you will only add Sora |
Okay, we cloud use only the most popular Google fonts:
|
Good idea. |
Bump? |
This is not the scratch forums. Bumping doesn't actually do anything. Someone will attempt to make this an addon, or you can. |
I use this to get the path I need, then copy and paste it into an empty .txt file and change the extension . . . maybe base the code off of this and allow a drag n' drop for a ttf file instead of saving the link? This is beyond my skillset, but I was thinking maybe make a little popup or use prompt to get the text, then insert it into the svg? |
It's been suggested to add back the "Scratch" font, which is apparently already loaded into scratch but just isn't an option. |
isn't this a dupe of #1646 |
I think I already posted this before somewhere but |
Is there no way to detect and use system fonts? |
People that don't have the same fonts installed won't see them. |
Rejected. No more reconsideration. |
wait why? no explanation? what about google fonts? @apple502j |
@Secret-chest Embedding fonts in a SVG or hoping that the user has them on their device is not practical. Using external resources in a Scratch SVG is not possible. |
I think you should be able to add more fonts. There could be a button under all the fonts that says "upload new font". And once you upload the font, it would be saved to your storage for use in different projects. Why can't you just use Google Drawings or something? When you try editing that in Scratch, it would go back to default Sans Serif.
The text was updated successfully, but these errors were encountered: