Results 1 to 5 of 5

Thread: Is there a way to make my own FontRender Application?

  1. #1

    Is there a way to make my own FontRender Application?

    Ehhmmm yo, the Titel say`s it all

  2. #2

    Is there a way to make my own FontRender Application?

    why not ? It is about 2 day work, but you can use my Fntcreator
    http://jansoft.aquasoft.cz/delphicomps.html#fntcreator which is designed to prepare font image for later processing in bitmap editor (like Photoshop).
    Export consist of two files - bitmap and widths file.
    "Bitmap" use as alpha channel and texturize it or do what you want. Save as another TGA/BMP file and then use VTDManager (downloadable from my pages) for compiling with "width" file into FONT.

  3. #3

    Is there a way to make my own FontRender Application?

    Yay, good work!

    Did that mean i can handle the Font like one i createt with the PowerDraw FontRender (a ver2.0 VTD file)?

    The Render Routines to a Bitmap is easy, but is a VTD Font only a Record with this Bitmap? I dunno understand becouse it can draw Bold and Italic Fonts at Runtime :?

    I like to integrate a Font render tool (that renders in the v2.0 Format) in my Game Development GUI.

  4. #4

    Is there a way to make my own FontRender Application?

    this is my code iam using to create VTDB record with font. I am using some procedures not defined, but you can imagine what they do.

    Code:
    procedure SaveFontExtraData(PCount,StChar,EnChar:Integer;Widths,Heights:Array of Integer;out Data:Pointer;out DataSize:Integer);
    var
      Write:Pointer;
      I:Integer;
    begin
      DataSize:=(3+4+(PCount)*2)*sizeof(Integer);
      GetMem(Data,DataSize);
      Write:=Data;
      AddInt(Write,PCount);
      AddInt(Write,StChar);
      AddInt(Write,EnChar);
      // skip 16 reserved bytes
      for i:=0 to 3 do
        AddInt(Write,0);
      for I:= 0 to PCount - 1 do
        begin
        AddInt(Write, Widths[I]);
        AddInt(Write, Heights[I]);
        end;
    end;
    
    procedure CreateVTDFont(stchar,endchar:Integer;Widths,Heights:Array of Integer;Img:TAGFImage;out Data:Pointer;out DataSize:Integer);
    var
      Write,wdata,idata:Pointer;
      wdatasize,idatasize:Integer;
    begin
      SaveFontExtraData(endchar-stchar,stchar,endchar,widths,heights,wdata,Wdatasize);
      CheckError(Img.GetAGFData(iData,iDataSize));
      DataSize:=IDataSize+WDataSize+4;
      getmem(Data,DataSize);
      Write:=Data;
      AddInt(Write,SIG_FNT2);
      move(wData^,Write^,wDataSize);
      inc(integer(Write),wDataSize);
      move(iData^,Write^,iDataSize);
    end;
    good luck

  5. #5

    Is there a way to make my own FontRender Application?

    Oh, thats Great! Thx a lot! =D

Bookmarks

Posting Permissions

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