sparks wrote:
I think this is an example of where font-size would be a hand attribute!
I didn't even notice the tiny text in the top!
Offline
sparks wrote:
I think this is an example of where font-size would be a hand attribute!
Strange, because the code that LS97 gave me enabled me to change the font size. If you take a look at the function he uses to make the image http://php.net/manual/en/function.imagettftext.php then it says that the second parameter is the font size, so if you have that as a variable in the code, it should work. It did for me!
Edit: Php and C++ are incredibly similar!
Last edited by RUMCHEERYPOOPOO (2011-07-28 06:45:38)
Offline
sparks wrote:
Thanks for pointing it out, Rum, I didn't spot the font attribute as it was just a number, so I had to look the function up to see that it was the font size
http://blocks.scratchr.org/textrender.p … p;ypos=150
your welcome!
Offline
I may actually be able to apply font options to both textreturns now... though from what I understand fonts don't work outside the same directory?
$font = realpath('Trebuchet_MS.ttf');
Looking up realpath()...
It appears to swap /'s with \'s. So that's annoying....
Last edited by sparks (2011-07-28 07:16:49)
Offline
sparks wrote:
I may actually be able to apply font options to both textreturns now... though from what I understand fonts don't work outside the same directory?
$font = realpath('Trebuchet_MS.ttf');
Looking up realpath()...
I think the font has to be on the same server as the php file, as the realpath finds the path to it on the server, for example on a linux server the real path would be something like '/var/www/public_html/font.ttf' (root of the webserver in many cases.)
Offline
RUMCHEERYPOOPOO wrote:
sparks wrote:
I may actually be able to apply font options to both textreturns now... though from what I understand fonts don't work outside the same directory?
$font = realpath('Trebuchet_MS.ttf');
Looking up realpath()...I think the font has to be on the same server as the php file, as the realpath finds the path to it on the server, for example on a linux server the real path would be something like '/var/www/public_html/font.ttf' (root of the webserver in many cases.)
Hmmm, I suppose I could support a few common fonts on the server, but I don't want to clog it up, it does belong to the Scratch team, after all...
It looks like php actually has five built-in fonts...
Last edited by sparks (2011-07-28 07:20:13)
Offline
sparks wrote:
RUMCHEERYPOOPOO wrote:
sparks wrote:
I may actually be able to apply font options to both textreturns now... though from what I understand fonts don't work outside the same directory?
$font = realpath('Trebuchet_MS.ttf');
Looking up realpath()...I think the font has to be on the same server as the php file, as the realpath finds the path to it on the server, for example on a linux server the real path would be something like '/var/www/public_html/font.ttf' (root of the webserver in many cases.)
Hmmm, I suppose I could support a few common fonts on the server, but I don't want to clog it up, it does belong to the Scratch team, after all...
You could have serif, sans-serif, console and decorative.
Offline
Offline
sparks wrote:
It may be hard not to get carried away...
lol I suggest you use some of the ones from this list: http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html
Arial, Comic Sans MS, Courier New, Georgia and Impact.
Offline
Hmmm, it's looking like I can't apply fonts to the standard single-colour imagereturn. The background image fits itself to the size of the text (unless otherwise specified). If I added fonts I don't think it could calcualte that any more and there would be all sorts of problems... Prove me wrong if you can, world
Offline
sparks wrote:
Hmmm, it's looking like I can't apply fonts to the standard single-colour imagereturn. The background image fits itself to the size of the text (unless otherwise specified). If I added fonts I don't think it could calcualte that any more and there would be all sorts of problems... Prove me wrong if you can, world
The world says: "You can but not as well as you can with the default font"
Offline
Hmmmm this gives me an idea, would it be possible for you to make an api which would check who is logged onto the scratch website? Then you could make a note seem personal for that person so your forum could be different for each person. Could you make it? Do you know what I am talking about? If not, wait till I am done with my vacation. XD
YouAreAwsomeSparks!YouShowedUsHowToSaveSpacesAndNowThis!LOLXD
Last edited by Pecola1 (2011-07-28 12:34:26)
Offline
Pecola1 wrote:
Hmmmm this gives me an idea, would it be possible for you to make an api which would check who is logged onto the scratch website? Then you could make a note seem personal for that person so your forum could be different for each person. Could you make it? Do you know what I am talking about? If not, wait till I am done with my vacation. XD
YouAreAwsomeSparks!YouShowedUsHowToSaveSpacesAndNowThis!LOLXD
Essentially, no.
Offline
Save spaces? As in reserved posts?
It would be possible if the Scratch team allowed the API to read the session variable of the viewer, but I doubt they would let that happen; it's probably against their privacy policy, I could technically do it with IP addresses but then you would need to know the IP for each person you wish to personalise the message for.
Furthermore, how on earth would moderators keep track of bullying sigs that target just one person?! It's a nice idea though
Offline
sparks wrote:
Save spaces? As in reserved posts?
It would be possible if the Scratch team allowed the API to read the session variable of the viewer, but I doubt they would let that happen; it's probably against their privacy policy, I could technically do it with IP addresses but then you would need to know the IP for each person you wish to personalise the message for.
Furthermore, how on earth would moderators keep track of bullying sigs that target just one person?! It's a nice idea though
XD That would be hard for moderators, but couldn't you make it by having it read the url of the scratch website and seeing who is logged in? I don't know anything about making an api, could you read a url from that browser?
Offline
Wait... using this method can you make a sig to be different for certain forums?
Offline
There is no "currently online" on the main site for me to pull from. There is "5 most-recent visitors" but that's not much use.
And no, unfortunately the API can't tell where it is being displayed, though you may be able to do it using the target function on the online/offline bit. The the sig can show one thing when you're on the tbg and another when you're on the main forum.
Offline
RememberYour"SaveTheSpaces"Sig?
Offline
Oh, yes! ITotallyForgotAboutThatOne.They recently worked out that you could just chop up tabs and get a couple of spaces that way. It means a lot of paperwork but no-one notices the difference and it neutralised the problem for the time being. I believe there's a hefty reward for space mines all the same, so keep your eye out for little bits of stuff you can't see in the soil, there may be one nearby! We're too young to be paying taxes but I believe our parents are becoming rather fond of camelCase to cut down on their monthly grammar bill.
Offline
sparks wrote:
Save spaces? As in reserved posts?
It would be possible if the Scratch team allowed the API to read the session variable of the viewer, but I doubt they would let that happen; it's probably against their privacy policy, I could technically do it with IP addresses but then you would need to know the IP for each person you wish to personalise the message for.
Furthermore, how on earth would moderators keep track of bullying sigs that target just one person?! It's a nice idea though
Aaahh!!! You just gave me an idea!!
Don't worry, nothing malicious. But sparks, you'll probably be seeing news from me in my sig.
Offline
RUMCHEERYPOOPOO wrote:
sparks wrote:
A lot of programmers are self-taught so they just do what works. It's like when johnnydean1 would get a block to work using about 50 lines and then it turns out nXIII knew a commands to do exactly that and cut it down to three. You could always try and develop your own generator if you wanted to have a go?
I think I'll wait until I've cut down on the todo list for the like buttons a bit more, as it's quite a big job making a generator for it, and I commend what comp has done.
I couldn't have said it better myself. comp's put a lot of effort into the project.
and sparks, that's too true. That's what my 600 page C++ manual is for... but coding is more fun when it's yours. Still, there's a limit to craziness: I try to comment my code also for later use.
Offline