Results 1 to 3 of 3
  1. #1
    totalspelnerd is offline Member
    Join Date
    Mar 2012
    Location
    Sweden
    Posts
    88
    Rep Power
    0

    Default [need help] Create my own Font and related stuff

    Unneeded information above the line, read it if you want
    I want to create my own font but I don't really know how to tackle it. Right now I have a String with all characters I want for example:
    Java Code:
    String chars = "acbdefghijklmnopqrstuvwxyz"
    I also have a method that takes a string and will return my own character value of a character at a given place. For example: I input the string "1abc" and position 2. This will return the value 1 because b has the value 1 in my character string. I little bit hard to explain, though if you need more info just ask me.

    When I create a Font I need a image in my parentheses:
    Java Code:
    public Font(Image font){
    
    }
    This Image gets turned into individual character images.


    Here comes the first problem: I need to crop all the individual characters (images) in the horizontal line. For example let 0 be transparent and 1 be black:
    00000
    00100
    00100
    01100
    00000
    This needs to be turned into:
    00
    01
    01
    11
    00
    and not:
    01
    01
    11

    The second thing is how can I convert for example the color black to white or red. But if I got 2 different color in the image I just want to change one of them to a desired color.

    Summary:
    1. Crop Image
    2. Change one single color.

    Thanks for your time :D
    Last edited by totalspelnerd; 04-22-2013 at 09:18 PM.

  2. #2
    sevoxx is offline Oracle Java Developer
    Join Date
    Apr 2013
    Location
    In a PineApple Under the Sea
    Posts
    20
    Rep Power
    0

    Default Re: [need help] Create new Font and related stuff

    One question. Why do you want to create a new font in Java? If you're doing it for the challenge I'd give you a thumbs up, but if you're trying to create a font for the mere goal of creating a font, I wouldn't recommend Java.

  3. #3
    totalspelnerd is offline Member
    Join Date
    Mar 2012
    Location
    Sweden
    Posts
    88
    Rep Power
    0

    Default Re: [need help] Create new Font and related stuff

    I want to have my own font inside my game that at the same time works with my own library. How can I create a font another way?

Similar Threads

  1. Replies: 1
    Last Post: 04-27-2012, 08:14 AM
  2. Replies: 0
    Last Post: 08-18-2010, 11:31 AM
  3. Trying to create a code for queue, complex stuff...
    By Mikey_S in forum Threads and Synchronization
    Replies: 3
    Last Post: 09-28-2009, 10:13 PM
  4. Replies: 5
    Last Post: 04-25-2009, 09:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •