#1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2017
    Posts
    845
    Rep Power
    0

    Question How They Structure Different Style Text Generators ?


    Happy New Year!

    Guys,

    Look at this site:
    https://cooltext.com/Logos-Ice

    They have text fonts or something. You type your words/phrase and your chosen letter style (their fonts) writes your words or phrase.
    How did the site manage to do that ?
    For example, look at the Ice Cube style:
    https://cooltext.com/Logo-Design-Ice-Cube

    Now, type any phrase and their site types your phrase using that style. How'd they program that ?
    I want to build a site like that. This is how I'm gonna built it ....

    With a font, let's say Ice Cube Style, I'm going to write each letter and save it. Like so:

    a.jpeg
    b.jpeg

    and so on right down to:

    y.jpeg
    z.jpeg

    Then, I'm going to give you a text box (in a web form).
    You will type your word such as: Get Lost.
    And, my script will call the required jpeg files and combine them to form your word. Like so:

    g.peg,e.jpeg,t.gpeg and so on. You get the picture. Gonna put each appropriate img files side by side that will make up your chosen word.

    Eg.

    $a = localhost\a.jpeg
    $b = localhost\b.jpeg

    $word = $a = localhost\a.jpeg.$b = localhost\b.jpeg;

    echo "$word";

    Ok, I'm going to do something like that but not quite like that. You do understand what I'm trying to do and how I'm trying to organize things or put the script up. Is this how they usually do it ?

    Ok, I've shown you a code sample, even though it ain't that good. Now, how-about a sample from your end ?
    Last edited by UniqueIdeaMan; January 1st, 2018 at 02:21 PM.
  2. #2
  3. Wiser? Not exactly.
    Devshed God 2nd Plane (6000 - 6499 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    6,270
    Rep Power
    4193
    They probably use some combination of Image Masking and custom border drawing.

    Your simplistic approach of just having individual letter graphics that you chain together would work ok for some cases, such as your Ice Cube example, but would not work for more complex graphics such as the Ice Berg example.

    A long time ago I wrote some code that took a grayscale image and applied it as a mask to a color image. I don't have the code anymore, nor do I remember how I did it exactly and it'd probably be horribly outdated anyway by today's standards (talking nearly 10 years ago now). Study image manipulation and you can probably figure out how to do it, or just stick to your simple approach and accept it's limitations.
    Recycle your old CD's



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2017
    Posts
    845
    Rep Power
    0
    Originally Posted by kicken
    They probably use some combination of Image Masking and custom border drawing.

    Your simplistic approach of just having individual letter graphics that you chain together would work ok for some cases, such as your Ice Cube example, but would not work for more complex graphics such as the Ice Berg example.

    A long time ago I wrote some code that took a grayscale image and applied it as a mask to a color image. I don't have the code anymore, nor do I remember how I did it exactly and it'd probably be horribly outdated anyway by today's standards (talking nearly 10 years ago now). Study image manipulation and you can probably figure out how to do it, or just stick to your simple approach and accept it's limitations.

    Happy New Year Kicken!

    Gosh, that was a fast reply! I didn't think you'd be prowling the forum on New year's day! Lol!
    Well, I have fiddled with this sort of thing with photo Shop but not got a clue how to do all this with php. Layering/Image Masking and all that I mean.
    I'll checkout your links properly another time. Had a quick glance. Way past bedtime here.

    Thanks again!

IMN logo majestic logo threadwatch logo seochat tools logo