Results 1 to 10 of 10

Thread: FontStudio exporter TCharacterData question

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Hmm.. I just found this record definition in Font4.pas:

    Code:
      FontInfo = record
        A, C: integer;
        Wid, Hgt: cardinal;
        char: WideChar;
        x1,y1,x2,y2: double;
      end;
    Why is B missing? By looking at your source, my guess is that it's added to C.

    Code:
    procedure TFontObj.Draw(const X, Y: single; const Txt: widestring; Lev: single);
    var CurX: single;
        Ch: Widechar;
        Chaar, I, Ind: integer;
    begin
       CurX := X;
    
       for I := 1 to length(Txt) do
       begin
           Ch := Txt[I];
           Chaar := integer(ch);
    
           if Chaar = 32 then
           begin
             Ind := -1;
             CurX := CurX + SpaceWidth;
           end
           else
           begin
             Ind := CharLookup[Chaar];
           end;
    
           if ind > -1 then
           begin
             CurX := CurX + F[Ind].A;
    
             DrawQuadRT(CurX, Y, F[ind].Wid, F[ind].Hgt, lev, F[ind].x1,F[ind].x2,F[ind].y1,F[ind].y2);
    
             CurX := CurX + F[Ind].C;
           end;
       end;
    
    end;
    Would be nice if you added some comments to make these things clear.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  2. #2
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059
    Thnx, that realy helps a lot
    NecroSOFT - End of line -

  3. #3
    Quote Originally Posted by chronozphere View Post
    Would be nice if you added some comments to make these things clear.

    Oops! The separate B and C values are actually something I did recently and I dont think I updated any of the .fnt file reading sources so they still have only A and C... The old .fnt file exporter plugin still uses the old method (Font Studio 4.21 is backward compatible with the old plugins) so if you want *all* the A,B and C values, I'll have to update the .fnt exporter and corresponding Font4.pas file (with comments of course )
    My site: DelphiTuts.com (coming soon)...

    Download Font Studio 4.21 here.

  4. #4
    Hi Again Nitron!

    The download link really don't works here! http://www.delphituts.com/labs/FontStudio421.zip

    I can not even ping delphituts.com here, I tryed it for days long and I think it does not works here in Brazil, it is blocked someway.

    Is there no altenative download links? Please upload it to 4shared or any other free hosting service!

    Thanks!

  5. #5
    The link does work here. Perhaps someone should make a mirror download?
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  6. #6
    Just one more question about TCharacterData ... what are Ox and Oy values?

    Edit: ahhh... it's all in the readme.txt
    Last edited by Srki_82; 08-12-2010 at 10:16 PM.

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
  •