Posted: 2nd Jan 2022 19:06
There is memblock commands to load images, sprites, objects and music from memblocks but there isnt a command to load a font from memblock.

Is there a way to do this without saving the memblock to a file so we can just load a font at runtime from a memblock?
Posted: 2nd Jan 2022 20:26
You can certainly do it with bitmap fonts but I presume you know that already
Posted: 2nd Jan 2022 21:24
Yeah I was thinking about ttf fonts
Posted: 2nd Jan 2022 21:25
how are you getting it into a memblock without loading it (in some form) at some point?

in another thread, there was short discussion about loading a sound and playing it but if the sound was later deleted from the harddrive, you could no longer play the sound? so, i wondered if there HAS to be a file SOMEWHERE.

update: i was mistaken. this is the thread i was referencing.
Posted: 4th Jan 2022 0:12
Completely thinking out loud here...

Has anyone worked with vector graphics directly in AppGameKit somehow? Wondering if you could take an image of a TTF font and get the vertices to represent a letter. Or can the data in a TTF file be mined for something like that.

...carry on...
Posted: 4th Jan 2022 0:23
i've only seen vector graphics in tier 2.

meanwhile, i think the AGK2 font is embedded in the exe and somehow built at runtime (i could be wrong). regardless, i'm sure a ttf can be "built", saved and loaded back in (somehow).
Posted: 4th Jan 2022 1:00
Interesting! SVG files are simple XML data so shouldn't be too big a deal to come up with something to convert very simple shapes.

BUT taking a look and a TTF file is not a simple data file to mine. There is a CreateMemblockFromFile() command to get the raw data, but my guess is you will be making a glorified image font with a home made vector algorithm.
Posted: 4th Jan 2022 8:46
What I do ATM is unencrypt a file to memblock ATM then save the memblock to file and load from that file, after that I delete the file.

What I was wondering was if there was a command to load the front from memblock directly?

I have commands to load sound (standard and ogg), images, sprites, objects and data from memblocks directly there just isn't a command for fonts
Posted: 5th Jan 2022 3:18
This may be a little off topic, but with windows you can create a bitmap and from that freely create a png that can also be converted to a ttf totally with free legal software.
Converting the bmp into sections with memblocks the math can be achieved the main problem I foresee is converting that to a ttf and for my purposes placing it into the
correct directory. As a community with the current AppGameKit I believe its possible and this is certainly the place to ask. If I had a chance I'de look at the algorithm from memory
to a saved ttf format. It may require a few resaves and the use of one of the file handling tools I've seen on the forum
Posted: 5th Jan 2022 12:52
I have just started to get to grips with memblocks and all is good . So I covert a file to memblock then back to a sound and then play the sound . What I do not understand Is the point of doing this . Could somebody please explain the purpose of using a memblock?
Maybe I'm very thick .
Posted: 5th Jan 2022 15:05
Once you have the data in its raw format you can manipulate it it in any way you want.
Encryption, change the pitch or speed of a sound, blend sounds together, blend images together, adjust brightness, contrast, colour. The world is your oyster.