Discuss Scratch

mingo-gag
Scratcher
1000+ posts

Custom fonts

Bringing this topic up again and Support Because custom fonts are good to add on Scratch.
HBATest
Scratcher
60 posts

Custom fonts

Support!

You can just have a feature where the website or project downloads the custom font on your computer.

fungifungus
Scratcher
51 posts

Custom fonts

Will the font file be part of the project? If so, the user should be able to pick a certain character set so the project isn't as big.
BigNate469
Scratcher
1000+ posts

Custom fonts

fungifungus wrote:

Will the font file be part of the project? If so, the user should be able to pick a certain character set so the project isn't as big.
How about just using whatever characters that the person uses?

I will also point out that storing fonts shouldn't really be a problem in bitmap mode, as text there is rasterized into pixels anyways, and in vector you can know exactly what the user has written (as it's stored as plain text inside the .svg internally), so just storing the characters you use shouldn't be too hard.
fungifungus
Scratcher
51 posts

Custom fonts

BigNate469 wrote:

fungifungus wrote:

Will the font file be part of the project? If so, the user should be able to pick a certain character set so the project isn't as big.
How about just using whatever characters that the person uses?

I will also point out that storing fonts shouldn't really be a problem in bitmap mode, as text there is rasterized into pixels anyways, and in vector you can know exactly what the user has written (as it's stored as plain text inside the .svg internally), so just storing the characters you use shouldn't be too hard.
But what if the project is saved and the user adds more text with unique characters? I think by default, it should include all the characters that wont return “?” when you put it in a project title, and maybe throw out a few impractical ones
bingo-and-rolly54321
Scratcher
2 posts

Custom fonts

bingo-and-rolly54321 wrote:

https://scratch.mit.edu/projects/1144181662 my concept
but theyy do exist with note pad
jen6C
Scratcher
100+ posts

Custom fonts

“We used to have that in 1.4 - but it did cause a lot of problems. Projects that looked great on one computer would look not-so-great on another computer that didn't have the same set of fonts. Trying to capture the entire font definition in the project would take care of that issue but make the projects much larger. So we decided to go with a few standard fonts - but you can still bring in costume text by either importing the letters as images or vector objects. More work for you - but it guarantees that it will work on all computers.”
- Paddle2See

The quote above was posted more than a decade ago. I think it’s time to close this topic.

Last edited by jen6C (April 16, 2025 15:38:39)

Yellowsheep43
Scratcher
1000+ posts

Custom fonts

Paddle2See wrote:

Projects that looked great on one computer would look not-so-great on another computer that didn't have the same set of fonts.
I've been taking a Web Programming course and I have a solution for this.

In addition to the standard fonts, there's also an option to use a custom font. But there will be a warning that custom fonts may not work on all devices, and scratchers are encouraged to test with both the default and the custom font. Unsupported fonts default to Sans Serif.
unknown2467
Scratcher
100+ posts

Custom fonts

jen6C wrote:

The quote above was posted more than a decade ago. I think it’s time to close this topic.
Suggestions can stay open as long as the suggestion hasn't been added or rejected. or is created by someone who doesn't know how to create a suggestion topic

Last edited by unknown2467 (April 16, 2025 17:15:01)

kkidslogin
Scratcher
1000+ posts

Custom fonts

Yellowsheep43 wrote:

(#269)

Paddle2See wrote:

Projects that looked great on one computer would look not-so-great on another computer that didn't have the same set of fonts.
I've been taking a Web Programming course and I have a solution for this.

In addition to the standard fonts, there's also an option to use a custom font. But there will be a warning that custom fonts may not work on all devices, and scratchers are encouraged to test with both the default and the custom font. Unsupported fonts default to Sans Serif.
It's the modern era. Now we can just do this:
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;400&display=swap" rel="stylesheet">
This will fetch a font from Google and add it to the webpage. Something similar for Scratch shouldn't be overly difficult, and it would not take up project space; and anyhow anybody whose system can't fetch the font certainly can't load Scratch. And all the fonts are legal for general use. We can fall back to Serif, Sans-Serif, or another appropriate font.

BigNate469 wrote:

(#264)

fungifungus wrote:

Will the font file be part of the project? If so, the user should be able to pick a certain character set so the project isn't as big.
How about just using whatever characters that the person uses?

I will also point out that storing fonts shouldn't really be a problem in bitmap mode, as text there is rasterized into pixels anyways, and in vector you can know exactly what the user has written (as it's stored as plain text inside the .svg internally), so just storing the characters you use shouldn't be too hard.
See my above comment. In addition, however, if we did store the font in the project, know that fonts are a lot smaller relative to the project than the 1.4 days.

For comparison:
  • Roboto TTF file: 458,000 bytes
  • Large PNG file: 1,870,000 bytes
  • Usual MP3 song: ~6,000,000 bytes
  • Individual asset limit: 10,000,000 bytes
BriIIiantScratcher
Scratcher
100+ posts

Custom fonts

bump
ipaygoodies32222
Scratcher
8 posts

Custom fonts

Font effect trick
when green flag clicked
set [font v] effect to [Arial Black]
ipaygoodies32222
Scratcher
8 posts

Custom fonts

QUOTEEMPTY
ipaygoodies32222
Scratcher
8 posts

Custom fonts

Roll
Imtwentytenth
Scratcher
100+ posts

Custom fonts

ipaygoodies32222 wrote:

Roll
Stop posting nonsense

Powered by DjangoBB