Menu

Use of own font to generate

2004-12-31
2013-05-02
  • Archie Kane

    Archie Kane - 2004-12-31

    Hi guys

    I'm trying to help a friend out with a college project.  He's doing animation and philosophy and he's merging his 2 projects together to create something along the lines of "How logo's reflect what people think they own".

    He's taken 16 common logos from SKY, Nike, MTV, etc and turned them into a true type font.  He's managed to get a picture (16 colour greyscale gif file) to be rendered with his font through an Adobe Illustrator.  What he would like to be able to do is use Mplayer with the AAlib to render his own movie file.  We can do this with the standard fonts that AAlib supports but we need to use his font.

    Is there a way to do this or can you give us any help at all?

    Thanks in advance

    ArC

     
    • Chunky Kibbles

      Chunky Kibbles - 2005-01-01

      Actually, it's really easy, but doesn't work with vector fonts, and aalib only understands 8-bit-wide fonts [although you're allowed arbitrary heights, IIRC].

      Look at font*.c in aalib/src.

      Basically, each byte is the representation of a horizontal line in the font [a bit set means the pixel is "on" in the font, a bit not set means the pixel is "off"].

      The font then goes top-to-bottom, for each character in the character set, starting at '\0', and going on.

      If you set your font up like this, making everything except your characters all blank, then when aalib runs using that font, it should Do The Right Thing(TM).

      If you look at the last few lines of that file:
      __AA_CONST struct aa_font aa_font16 =
      {font16data, 16, "Standard vga 8x16 font", "vga16"};

      font16data is what's defined above, "16" is the bit-height of the characters, "Standard..." is a long textual name, and "vga16" is a symbolic name that aalib understands when you do "-font vga16"

      Add your font to aafonts.c, and thar. It's all done.

      export AAOPTS="-font vga16 $AAOPTS"

      Speaking on dumping movies, you may find [cheap plug alert] this useful:
      http://icculus.org/jugglemaster/aa/
      Note the "aa5mills.mpeg"

      Feel free to download the source, and check out aampeg.cpp

      Hope that helps,
      Gary (-;

       
    • Archie Kane

      Archie Kane - 2005-01-09

      Thanks for that info, I'll take a look.

      I think I understand what you've said, but I'm not a programmer.  I'll go and check out the fonts now.  I'll let you know how I get on.

      Regards

       
    • Archie Kane

      Archie Kane - 2005-01-09

      A quick Q.:

      Is there an easy way to generate a "binary image" of a font?

       
      • Chunky Kibbles

        Chunky Kibbles - 2005-01-10

        Honestly, not that I know of.

        Your best bet may be to do it by hand, and with graph paper. You'd be surprised how simple it is...

        It wouldn't be too hard to throw together an application to do it for you, if you couldn't find anything...

        Gary (-;:wq

         

Log in to post a comment.

MongoDB Logo MongoDB