Results 1 to 9 of 9

Thread: Font Issues

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Font Issues

    Well, I'm trying to use the tool to generate fonts (under Windows), but when I try to draw the generated font it results in a sigsegv. Any ideas why? I initially thought it was because the font I was using was limited in terms of special characters, but I used on of Windows' more extensive built-in fonts with the same results.

    Using a laz nightly build of .9.3 with fpc 2.4.x, zgl .2rc6.

    I suspect it's the font builder. The sample font works just fine in my application, and my font does not work in the sample application.

  2. #2
    Show me the code how you trying to load fonts. One of ideas - you don't use ZenGL.dll, only ZenGL units, and forgot to include zgl_textures_tga

    Quote Originally Posted by dazappa
    and my font does not work in the sample application.
    Yeah, seems this is it... sample uses zgl_textures_png only, but generated font by ZenFont uses tga, and demo04 warns about this in comments:
    Important moment, unit that support needed format must be included one time.

  3. #3
    Aha, yes that did it. Just had a few little things to tweak to use the new rc6 after that (lib paths, mainly). Looking great! Thanks for the help.

  4. #4
    about the font editor , i've one remark , its the outline effect i hope this feature will be included in the next releases, it makes the font more attractive . other than that , ZenGL is the best .

    i'd like to know if you planing to write a GUI system for ZenGL
    Last edited by virtual; 31-01-2011 at 07:20 AM.

  5. #5
    Hi Andru,

    I have toyed with Zengl for a bit yesterday and I must agree, it was surprisingly easy to work with. I had something up and running pretty fast. Although I must admit, much of my code doesn't depended that much on the underlying engine. I can switch pretty easily nowadays.

    Anyway, some things I'd like to see:
    - documentation. I was able to figure things out using the demos and the zengl source, but some form of documentation would help a lot.
    - mouse support/trouble. If you forget to include the zengl mouse unit, but do use one of its functions, you get an access violation during runtime. It took me a long while to figure out where the error came from and would like to see better handling for this.
    - same goes for image loading, I forgot to add the font image in my resource directory with an access violation as a result. I'm not sure anymore if this particular case is mentioned in the log, I know it does for the usual images, but I'd like to see a different error in this case.
    - +1 for the GUI idea.
    - Is it possible to restrict fps while retaining smooth movement?

    Thanks & looking forward to the next release.

  6. #6
    Quote Originally Posted by Traveler View Post
    Hi Andru,

    I have toyed with Zengl for a bit yesterday and I must agree, it was surprisingly easy to work with. I had something up and running pretty fast. Although I must admit, much of my code doesn't depended that much on the underlying engine. I can switch pretty easily nowadays.

    Anyway, some things I'd like to see:
    - documentation. I was able to figure things out using the demos and the zengl source, but some form of documentation would help a lot.
    - mouse support/trouble. If you forget to include the zengl mouse unit, but do use one of its functions, you get an access violation during runtime. It took me a long while to figure out where the error came from and would like to see better handling for this.
    - same goes for image loading, I forgot to add the font image in my resource directory with an access violation as a result. I'm not sure anymore if this particular case is mentioned in the log, I know it does for the usual images, but I'd like to see a different error in this case.
    - +1 for the GUI idea.
    - Is it possible to restrict fps while retaining smooth movement?

    Thanks & looking forward to the next release.
    Assuming the following works, for restricting fps you could do:
    scr_SetVSync( true );
    scr_SetOptions( 800, 600, REFRESH_DEFAULT, FALSE, FALSE );

    Then see demo 5/6 for how to use a timer for moving (so not to be constrained by fps)

    So for FPS, I don't know of a way to simply say "Hey, make it 30FPS max please" but if you set VSync on and your driver is setup to allow the application to choose whether or not to vsync, you'll get ~60fps max which can greatly reduce CPU usage.

    edit:
    Also, I don't know about about creating GUI functions. I guess this could be helpful if you're developing some kind of interactive application, but personally I like to hand design my GUI's for games and not be restricted by a library (or set of functions).

    As for the docs, yes, there really needs to be some. Maybe you could run pasdoc on the source to generate some simplified list, and when you have time create some stellar docs that are more than just a list of functions, types, etc. that pasdoc would output. At this point, there's so much not covered in the examples, and you have to go hunting through various files with a text editor to look for something. Pasdoc makes browsing easy. Unfortunately, it still requires a bit of work on your end.
    Last edited by dazappa; 31-01-2011 at 03:50 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
  •