473,406 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

font script.

hi all.

first time poster so please forgive and maybe direct me to correct
group if this is wrong place. tia.

i'm after constructing a PHP script to fit within my nuke modules to
do this..

I would like users to enter my cross stitch site and be able to type
in text and have it formatted into a cross stitch font.

I know from other sites that it can be achieved using a perl script
but not sure how it's done as i have no perl knowledge whatsoever.

here is an example from a fellow cross stitch site..
http://www.celticxstitch.ie/cgi-celt...t/stitches.cgi

any ideas where i should start?

thanx for any help.

Sarah.
Jul 17 '05 #1
3 2459
Uzytkownik "sarah" <ow***@bronteland.com> napisal w wiadomosci
news:a3*************************@posting.google.co m...
hi all.

first time poster so please forgive and maybe direct me to correct
group if this is wrong place. tia.
You're at the right place :)
i'm after constructing a PHP script to fit within my nuke modules to
do this..

I would like users to enter my cross stitch site and be able to type
in text and have it formatted into a cross stitch font.

I know from other sites that it can be achieved using a perl script
but not sure how it's done as i have no perl knowledge whatsoever.


Looks like it's a matter of stitching a few images together. The easiest way
is to keep each letter of the alphabet in a separate image, then generate
img tags base on what the user type in:

$letters = preg_split('//', $input, -1, PREG_SPLIT_NO_EMPTY);
echo "<nobr>";
foreach($letters as $letter) {
echo "<img src=\"img/letters/$letter.gif\">";
}
echo "</nobr>";

If you want a single image, you can use the GD function to joint the images
together.
Jul 17 '05 #2
thankyou Chung for your help, but i have to say that this looks a
little too advanced for my skills at the present time :(

I understand from this that i will need to create a simple form, and
have images in the specified folder that i have made, but apart from
the "echo" command i don't really understand much more of your code.

It probably looks easy to some of you but i haven't acquired enough
skills yet to implement this.

I shall continue to "hang around " in this group and go back to the
PHP manual and learn. :)

thanx again.. Sarah.

Looks like it's a matter of stitching a few images together. The easiest way
is to keep each letter of the alphabet in a separate image, then generate
img tags base on what the user type in:

$letters = preg_split('//', $input, -1, PREG_SPLIT_NO_EMPTY);
echo "<nobr>";
foreach($letters as $letter) {
echo "<img src=\"img/letters/$letter.gif\">";
}
echo "</nobr>";

If you want a single image, you can use the GD function to joint the images
together.

Jul 17 '05 #3
I noticed that Message-ID:
<a3*************************@posting.google.com> from sarah contained
the following:
I understand from this that i will need to create a simple form, and
have images in the specified folder that i have made, but apart from
the "echo" command i don't really understand much more of your code.

It probably looks easy to some of you but i haven't acquired enough
skills yet to implement this.


The script pretty much works as is.

I have six images of the numbers 1 to 6 named 1.jpg, 2.jpg and so on
Obviously for an alphabet you need many more.

http://www.ckdog.co.uk/js/number%20images.php

Here is the code.

<HTML>
<HEAD>
<TITLE>number images</TITLE> <META HTTP-EQUIV="Content-Type"
CONTENT="text/html; charset=iso-8859-1">
</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<FORM NAME="form1" METHOD="post" ACTION="">enter numbers between 1 and 6
<BR>e.g
123432<BR> <INPUT TYPE="text" NAME="inputbox"><INPUT TYPE="submit"
NAME="Submit" VALUE="Submit"></FORM>
<?php
$input=$_POST["inputbox"];
$letters = preg_split('//', $input, -1, PREG_SPLIT_NO_EMPTY);
echo "<nobr>";
foreach($letters as $letter) {
echo "<img src=\"$letter.jpg\">";
}
echo "</nobr>";
?>
</BODY>
</HTML>
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: StaZ | last post by:
Hello I have a ASP script that generates a jpg/gif image using the Overpower.ImageLib component. I do all my tests on my own intranet server before uploading it to the webhost Actually i...
4
by: Csaba Gabor | last post by:
What I'd like to do is to be able to set the font of a textarea element to the same font that another element is using (say, for example, an <INPUT type=text ...> element, but if that's a no go,...
3
by: Matej Cepl | last post by:
I know about element.style.fontSize, but it seems to work here (with Mozilla Firefox 1.0.6) just only when the fontSize was set via CSS. Can I get somewhere current size of the font in the actual...
0
by: Chenghui Li | last post by:
We have a problem with the Windows XP theme: We have a IDE which allows other developers to develop visual programs for their customers. Our IDE allow them to set font for window captions easyly...
4
by: tshad | last post by:
I am having trouble with links in my DataGrid. I have Links all over my page set to smaller and they are consistant all over the page in both Mozilla and IE, except for the DataGrid. Here is a...
3
by: Hymer | last post by:
Hello, I used CSS to specify a line of type in Times New Roman, Italic. I notice that the font seems to not be dithered on the webpage. That is, the font looks a little ragged around the edges....
16
by: carlbernardi | last post by:
Hi, I was wondering if there is way use a font that is somehow kept in the code instead of having to load it? I am working on a single script that so far can produce images and html but I have...
2
by: kheitmann | last post by:
OK, so I have a blog. I downloaded the "theme" from somewhere and have edited a few areas to suit my needs. There are different font themes within the page theme. Long story short, my "Text Posts"...
1
by: neovantage | last post by:
Hey all, I am using a PHP script which creates headings at run time in a sense at page execution. I am stuck a with a very little problem which i am sure i will have the solution from experts. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.