Defining more than one font at the same time ?
Defining more than one font at the same time ?
Hi,
I have 'drawn' a nice 32x32 font which I'm using for a scroller, but I would also like a small 8x8 font to stick some other text on screen.
Is it possible to define more than one font ? also what does: "get_pixi_font - get current font-image" actually do ? can it be used to swap fonts during a program ?
cheers, Phil
I have 'drawn' a nice 32x32 font which I'm using for a scroller, but I would also like a small 8x8 font to stick some other text on screen.
Is it possible to define more than one font ? also what does: "get_pixi_font - get current font-image" actually do ? can it be used to swap fonts during a program ?
cheers, Phil
Re: Defining more than one font at the same time ?
ah, this was a really stupid question
I can just define as many as I like and swap between them during the program with
pixi_font (whatever)
I can just define as many as I like and swap between them during the program with
pixi_font (whatever)
- samrai katt kovboy
- Posts: 309
- Joined: Wed Jun 13, 2012 11:07 am
- Location: Spain
- Contact:
Re: Defining more than one font at the same time ?
I am in the same situation as you and have realized that the only way to get into Pixilang is to start to study some programming.
The easiest way to me seems to be to start with Processing as there is a lot of good tutorials for beginners and most of them make you learn by doing some more fun and interesting coding to get you to learn step by step...
The easiest way to me seems to be to start with Processing as there is a lot of good tutorials for beginners and most of them make you learn by doing some more fun and interesting coding to get you to learn step by step...
SOOOOOOOOOOOOOOO MANY CIRCLES
- NightRadio
- Site Admin
- Posts: 3944
- Joined: Fri Jan 23, 2004 12:28 am
- Location: Ekaterinburg. Russia
- Contact:
Re: Defining more than one font at the same time ?
It's my fault.
Right now the Pixilang is very useful language for my own projects. But i have no enough time to make the good tutorials. Sorry :( I will try to do this in future...
But now you can ask absolutely anything on this forum. I'm always ready to answer.
Right now the Pixilang is very useful language for my own projects. But i have no enough time to make the good tutorials. Sorry :( I will try to do this in future...
But now you can ask absolutely anything on this forum. I'm always ready to answer.
- samrai katt kovboy
- Posts: 309
- Joined: Wed Jun 13, 2012 11:07 am
- Location: Spain
- Contact:
Re: Defining more than one font at the same time ?
But Mr Nightradio!
There is 24 hours in a day and if you only cut out dinners, lunch and sleep you will have some time!
Stop using silly excuses that you do not have time!!!
Because we want tutorials and one update after another every week on all your programs plus at least a new revolutionary program once a month!
You can do it! You can do it!!!
We are tired of you slacking around instead of satisfying our thirst for more excitement!
Just sleeping long into the afternoon playing with your cat/s and then taking looong siestas, c'mon...
I bet you do not even spend twenty minutes a week coding!
Ti hi
There is 24 hours in a day and if you only cut out dinners, lunch and sleep you will have some time!
Stop using silly excuses that you do not have time!!!
Because we want tutorials and one update after another every week on all your programs plus at least a new revolutionary program once a month!
You can do it! You can do it!!!
We are tired of you slacking around instead of satisfying our thirst for more excitement!
Just sleeping long into the afternoon playing with your cat/s and then taking looong siestas, c'mon...
I bet you do not even spend twenty minutes a week coding!
Ti hi
SOOOOOOOOOOOOOOO MANY CIRCLES
- NightRadio
- Site Admin
- Posts: 3944
- Joined: Fri Jan 23, 2004 12:28 am
- Location: Ekaterinburg. Russia
- Contact:
Re: Defining more than one font at the same time ?
Oh, okBecause we want tutorials and one update after another every week on all your programs plus at least a new revolutionary program once a month!
- samrai katt kovboy
- Posts: 309
- Joined: Wed Jun 13, 2012 11:07 am
- Location: Spain
- Contact:
Re: Defining more than one font at the same time ?
Hey Mr Nightradio...
Even if you stopped now doing anything more you would still be a hero and the only sad thing would be when the programs stop working for one reason or another.
Spectacular creations and today will be a whole day dedicated to Virtual ANS and the last five days have been taking as much time as possible to compose in SunVox...
Just love your programs!
It will be so cool when Pixilang and SunVox play nicely together even if I can not code but just to take advantage of other peoples creations!
Happy NEW YEAR to you and can not wait to see what your brain + time will bring us for 2014!
mjiauuu mjiauuu mjiau
Even if you stopped now doing anything more you would still be a hero and the only sad thing would be when the programs stop working for one reason or another.
Spectacular creations and today will be a whole day dedicated to Virtual ANS and the last five days have been taking as much time as possible to compose in SunVox...
Just love your programs!
It will be so cool when Pixilang and SunVox play nicely together even if I can not code but just to take advantage of other peoples creations!
Happy NEW YEAR to you and can not wait to see what your brain + time will bring us for 2014!
mjiauuu mjiauuu mjiau
SOOOOOOOOOOOOOOO MANY CIRCLES
- NightRadio
- Site Admin
- Posts: 3944
- Joined: Fri Jan 23, 2004 12:28 am
- Location: Ekaterinburg. Russia
- Contact:
Re: Defining more than one font at the same time ?
Thanks, and happy new year too! :)
Re: Defining more than one font at the same time ?
like others have said, I found it easiest to just get stuck in and see what works and what didn't - I expect some of the things I couldn't get to work might be possible if I new more about coding, but the more I practice, the more I learn
- xaccrocheur
- Posts: 77
- Joined: Sat Feb 27, 2010 3:16 pm
- Location: Africa
- Contact:
Re: Defining more than one font at the same time ?
You meant set_font(whatever) right? Or is pixi_font() a function that you defined elsewhere? Or maybe a builtin from an earlier version..?spiny wrote:
pixi_font (whatever)
Please, can you kindly show me how set_font() works, so I can understand how to use different fonts (well, actually the same, only resized at 200% (w/o interpolation) at the same time? And if it is not possible (after all, no example file shows text displayed in more than one way) please, tell me.
Yassin Philip - Check out My music
- xaccrocheur
- Posts: 77
- Joined: Sat Feb 27, 2010 3:16 pm
- Location: Africa
- Contact:
Re: Defining more than one font at the same time ?
Why is nobody answering me? I really need an answer to this question :
Is it possible to print() two fonts at the same time ?
A simple "no" would be really useful. And if it is possible, a quick example would really boost my understanding of Pixilang.
Apparently, print() creates a container. Maybe this container can be re-shaped..?
Is it possible to print() two fonts at the same time ?
A simple "no" would be really useful. And if it is possible, a quick example would really boost my understanding of Pixilang.
Apparently, print() creates a container. Maybe this container can be re-shaped..?
Yassin Philip - Check out My music
- xaccrocheur
- Posts: 77
- Joined: Sat Feb 27, 2010 3:16 pm
- Location: Africa
- Contact:
Re: Defining more than one font at the same time ?
Hum. So I guess nobody here knows how to do this? NightRadio, what can I possibly do to get this information?
Yassin Philip - Check out My music
- NightRadio
- Site Admin
- Posts: 3944
- Joined: Fri Jan 23, 2004 12:28 am
- Location: Ekaterinburg. Russia
- Contact:
Re: Defining more than one font at the same time ?
You can't use two fonts within one print() call. But you can do it by using two print() calls with switching between different fonts :)
Re: Defining more than one font at the same time ?
I was using v2 of pixilang when I started this thread, the font stuff has changed in v3, so pixi_font (whatever) is no longer a valid command.xaccrocheur wrote:You meant set_font(whatever) right? Or is pixi_font() a function that you defined elsewhere? Or maybe a builtin from an earlier version..?spiny wrote:
pixi_font (whatever)
Please, can you kindly show me how set_font() works, so I can understand how to use different fonts (well, actually the same, only resized at 200% (w/o interpolation) at the same time? And if it is not possible (after all, no example file shows text displayed in more than one way) please, tell me.
V3 uses this (which you probably know) :
font = load( "font5.gif" )
set_font( 32, font, 10, 10 )
to use multiple fonts, just define another one, the code might look like this:
font = load( "font5.gif" )
font2 = load("whatever.gif")
set_font( 32, font, 10, 10 )
print( "font one", 0, 100)
set_font( 32, font2, 10, 10 )
print( "font two", 0, 200)
I think