Discuss Scratch

FlowOS
Scratcher
100+ posts

Perfect Font Engine: Make a font!

Hey!

Want to make your own font in my project, ‘Perfect Font Engine’?
Here's how you do it.

First, create a list titled the name of your font.

In this case, we'll name our list My Font.

Next, create a block called ‘Initialize MyFont’. Ensure ‘run without screen refresh’ is ticked

define Initialize MyFont

Next, make a variable called ‘letters in MyFont’

(letters in MyFont)

Next, copy the following script:

define Initialize MyFont
set [letters in my font v] to [abcdefghijklmnopqrstuvwxyz1234567890...] // Set it to all the characters you want in your font

Now it's time to make the font

Think of what the first character will look like. The first character in our variable is a, so think about a.
Visualize it in your head and convert it to a 4 x 6 table. For example, if you're doing a lowercase ‘f’, it should look something like this in your brain:



Everywhere you have a 1, it shows you want it to render a square in that area. If it's 0, it won't render anything in the area.

Now export the code into the list. Put it under your definition block, like so:

define Initialize MyFont
set [letters in my font v] to [abcdefghijklmnopqrstuvwxyz1234567890...] // Set it to all the characters you want in your font
add [001101000100111101000100] to [MyFont v]

It's important to add it to the list in order, so A will go first, B will go second and so on (refer to your variable)

Last, before the adding to the list, make sure you have a ‘delete all of MyFont’ block in front.

There you have it, folks!

Scratch On! - Flow

Last edited by FlowOS (June 22, 2014 02:18:07)

TheHockeyist
Scratcher
1000+ posts

Perfect Font Engine: Make a font!

Um… it's not shared?
FlowOS
Scratcher
100+ posts

Perfect Font Engine: Make a font!

TheHockeyist wrote:

Um… it's not shared?
Oh, I guess it's a glitch. You'll find the project on my account.
D-Zi
Scratcher
71 posts

Perfect Font Engine: Make a font!

//cool cool cool!

Last edited by D-Zi (June 22, 2014 16:52:18)

SpiderManGwenStacy
Scratcher
33 posts

Perfect Font Engine: Make a font!

Nice, discussion! I've been wanting to make my own font for a while now!!
_Programmer
Scratcher
5 posts

Perfect Font Engine: Make a font!

Thank you for making this! I rate this discussion 5 star/ 5 star.

This::operators
Is::motion
So::looks
AWESOME!::sensing
Minecart696
Scratcher
100+ posts

Perfect Font Engine: Make a font!

Epic. Too epic. THAT'S TOO EPIC FOR ME AAAAAAHHH

*Minecart696's mind is blown*
-Graphite-
New Scratcher
8 posts

Perfect Font Engine: Make a font!

That'll Take Forever to type it all out
szogun
Scratcher
100+ posts

Perfect Font Engine: Make a font!

Amazing!
szogun
Scratcher
100+ posts

Perfect Font Engine: Make a font!

But how does it make the font? Is that all?
Embertail
Scratcher
100+ posts

Perfect Font Engine: Make a font!

So awesome! It's really creative how you did that
nerdcraft
Scratcher
54 posts

Perfect Font Engine: Make a font!

I will get right to making a font.
MCjason2
Scratcher
41 posts

Perfect Font Engine: Make a font!

FlowOS wrote:

Hey!

Want to make your own font in my project, ‘Perfect Font Engine’?
Here's how you do it.

First, create a list titled the name of your font.

In this case, we'll name our list My Font.

Next, create a block called ‘Initialize MyFont’. Ensure ‘run without screen refresh’ is ticked

define Initialize MyFont

Next, make a variable called ‘letters in MyFont’

(letters in MyFont)

Next, copy the following script:

define Initialize MyFont
set [letters in my font v] to [abcdefghijklmnopqrstuvwxyz1234567890...] // Set it to all the characters you want in your font

Now it's time to make the font

Think of what the first character will look like. The first character in our variable is a, so think about a.
Visualize it in your head and convert it to a 4 x 6 table. For example, if you're doing a lowercase ‘f’, it should look something like this in your brain:



Everywhere you have a 1, it shows you want it to render a square in that area. If it's 0, it won't render anything in the area.

Now export the code into the list. Put it under your definition block, like so:

define Initialize MyFont
set [letters in my font v] to [abcdefghijklmnopqrstuvwxyz1234567890...] // Set it to all the characters you want in your font
add [001101000100111101000100] to [MyFont v]

It's important to add it to the list in order, so A will go first, B will go second and so on (refer to your variable)

Last, before the adding to the list, make sure you have a ‘delete all of MyFont’ block in front.

There you have it, folks!

Scratch On! - Flow

Does This Work Properly?
CuriousGamer
Scratcher
60 posts

Perfect Font Engine: Make a font!

I made a font but how to I actually use it?

Found it out: In this
define render character etc
...

Change this from
if <(letter (p) of (item ((lc) v) of [ Letters v])) = [1]> then
...
end
to
if <(letter (p) of (item ((lc) v) of [ MyFont v])) = [1]> then
...
end

And to make it load your letters, in
define Variable to list

Change all mentions of the variable “letters” to “letters in my font” and all mentions of the list “Letters” to “MyFont”.
________________________________________________________________________________________________________

My outcome, is that once I pressed the green flag, it just gave me a black dot.

Last edited by CuriousGamer (Jan. 5, 2015 17:36:35)

Miastonished
Scratcher
100+ posts

Perfect Font Engine: Make a font!

FlowOS wrote:

TheHockeyist wrote:

Um… it's not shared?
Oh, I guess it's a glitch. You'll find the project on my account.

it came up with our sever is scratching its head thing
Jirachi-artist
Scratcher
12 posts

Perfect Font Engine: Make a font!

I cant go on your account…?
Raindrop57
Scratcher
500+ posts

Perfect Font Engine: Make a font!

I can't go on your profile page, and neither can anyone else…
webber111
Scratcher
100+ posts

Perfect Font Engine: Make a font!

So how do you actually make the font?
leicestertiger
Scratcher
36 posts

Perfect Font Engine: Make a font!

Why can't I go? But there is an example:
define 1
add [font] to [xa]
wait until <number 1 done>
say (Write 2)
So if I was doing Y, it would look like this:
O O
O O
OOOOO
O
OOOOO
Code would be
define A
add [font] to [xa]
wait until <letter CapA done>
say (Write B)
if I was doing A.
leicestertiger
Scratcher
36 posts

Perfect Font Engine: Make a font!

webber111 wrote:

So how do you actually make the font?
Well, here's an example:
when green flag clicked
forever

if <mouse down?> then

pen down
end

end

Powered by DjangoBB