Page 4 of 4 FirstFirst ... 234
Results 31 to 38 of 38

Thread: Font Studio 4.02 is here!

  1. #31

    Font Studio 4.02 is here!

    Help and feedback is appreciated, but:

    You're defeating the purpose of packing the characters into a bitmap! If I wanted to write a PNG exporter with that function, how would I produce a png image from a bunch of disjoint pixel arrays? Would I have to write my own character packing routine when FS has just done that for me?

    Further, the exporter should not have to change anything about the visuals of the font: colours, sizes etc. The user would have done this before exporting anyways.

    Giving the plugin a raw uncompressed bitmap is the most basic data it can receive, so it should be able to encode this into any data format imaginable, present-day and yet-to-be-discovered. If you want to extract the individual characters out of that data for your own format, you can work the raw bitmap to do that.

    I fully agree with C++/FPC compatibility and you are welcome to point out where I should make things AnsiString or packed record or whatnot, I dont have much experience writing cross-compatible procedures.
    I also agree with the author, name etc. we'll have to have another procedure which communicates this sort of info between the host and the dll.

    I went for 4/5 types of exporters because:
    - It splits up the output into multiple files, giving the user more control.
    Like if I wanted my alpha in JPG format and rgb in BMP format separate from my data in XML format, you can do that.
    - It only has to give the plugin the data it needs, saving processing time.

    But I agree it's a very nasty and complex situation because you have to handle:
    * RGB and Alpha and Data all separate files
    * RGB and Alpha in composite file, Data in separate file
    * RGB, Alpha and Data all in one file. //Going to have to add this as another type of exporter.
    My site: DelphiTuts.com (coming soon)...

    Download Font Studio 4.21 here.

  2. #32

    Font Studio 4.02 is here!

    Oh, almost forgot:

    This is an explanation of the XML format (my own format, not the XNA one)



    X1,Y1,X2,Y2 - Coordinates ranging from 0..1 so they are texture-size independent.

    Wid,Hgt - These are for when you draw the character to the screen, you know how big to make it.

    A - This is the amount of space to add before drawing the character, you normally add this to your current 'cursor' position when drawing the font
    Also known as the lsb (left side bearing).

    C - This is the amount of space to add to get the cursor in position to draw the NEXT character. So it includes the current char's width and any trailing space. Also known as the aw (advance width)


    SpaceWidth - This is simply the width in pixels of the space character (#32) Because the space is not really stored as a character (it's just a width really), it's stored in the header as a global value.
    My site: DelphiTuts.com (coming soon)...

    Download Font Studio 4.21 here.

  3. #33

    Font Studio 4.02 is here!

    Maybe I missed something, but I didn't see a pointer to the raw bitmap being passed. Note that you can't pass a TBitmap, you have to pass the pixel pointer and pixel format across to the exporter. If you know that your always running in 24 bit then that makes thing easier.

    Just make sure that you mark ALL methods that need to be exporter with cdecl and all strings are PChar, AnsiString (Pascal version of PChar directly compatible), or ShortStrings.

    Also, the reason for passing each characters pixel data separately is so that if you need different spacing for your exporter you can easily paste together the image. Of course another method that would work just as well would be to create 3 temporary bitmaps and an XML details file. When the exporter is called then it receives the names of the files only. It then does what it wishes with them.

    Extension is not necessary though . I for one would most likely put more then one export format into a single exporter DLL. Thus prompting the user to select the format they want to save to. Instead just have an export menu with sub menu items containing the exporters that you loaded.

    Oh, and if you want a sample of some stuff WILL and I have been working on in FPC that can be loaded by Delphi, C/C++, or whatever download: http://www.eonclash.com/Test2.zip

  4. #34

    Font Studio 4.02 is here!

    Quote Originally Posted by jdarling
    Maybe I missed something, but I didn't see a pointer to the raw bitmap being passed. Note that you can't pass a TBitmap, you have to pass the pixel pointer and pixel format across to the exporter. If you know that your always running in 24 bit then that makes thing easier.
    Code:
    /Sends width*height*3 bytes in the data pointer
        function SaveRGB(data: pointer; width, height: cardinal): boolean;
    The data: pointer, it sends width*height*3 bytes of raw bitmap to the plugin...

    Quote Originally Posted by jdarling
    Just make sure that you mark ALL methods that need to be exporter with cdecl and all strings are PChar, AnsiString (Pascal version of PChar directly compatible), or ShortStrings.
    Will do...

    Quote Originally Posted by jdarling
    Extension is not necessary though . I for one would most likely put more then one export format into a single exporter DLL. Thus prompting the user to select the format they want to save to. Instead just have an export menu with sub menu items containing the exporters that you loaded.
    The only reason I wanted an extension is so when you browse for a filename to save, it can filter it to the relevant file type!
    My site: DelphiTuts.com (coming soon)...

    Download Font Studio 4.21 here.

  5. #35

    Font Studio 4.02 is here!

    I wouldn't have it browse for a file when you fire off an extension. Leave that to the extension to do. As an example. I might create an extension that simply copy's the image to the clipboard. Of course, that could be one of your options for the exporter to tell the application about. If so, then allow for multiple extensions not just one. And pass it back to the exporter when it gets fired off.

  6. #36

    Font Studio 4.02 is here!

    At last it works in Linux without a notch!

    Only one strange warning, which didn't affect anything though:
    fixme:file:WriteFile Could not access memory (0xb70000,786432) at first, now OK. Protected by DIBSection code?

    There is no difference between "Smooth" and "Cleartype": it always uses the default KDE smoothing/hinting settings.


  7. #37

    Font Studio 4.02 is here!

    It didn't run in Windows 98 SE, said it linked to missing component GDI32.DLL:GetFontUnicodeRanges

  8. #38
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Font Studio 4.02 is here!

    Hey Micheal I was just checking your Font Studio out. I'm currious as to why you have the characters shuffled into corners and in the middle in such a bazaar manner? There has to be some kind of practical reason for that.

    Sadly it's not what I need as I require fixed size raster fonts for my game engine. Plus it feels a little bit bloated for my purposes.
    Jason McMillen
    Pascal Game Development
    Co-Founder





Page 4 of 4 FirstFirst ... 234

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
  •