Results 1 to 9 of 9

Thread: Font Issues

  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.

  7. #7
    Quote Originally Posted by Traveler
    - documentation. I was able to figure things out using the demos and the zengl source, but some form of documentation would help a lot.
    I'm working on it, but not fast(because it's boring ) and only on Russian version, later I will try to translate it(and I will need someone help, because my English is far from "good" )

    Quote Originally Posted by Traveler
    - 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.
    Use ZenGL library and zglHeader.pas instead of advanced way with ZenGL units

    - 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.
    Ok, I will try to do something with it(for example do not draw the Text when "pages" of font are not loaded).

    Quote Originally Posted by Traveler
    - Is it possible to restrict fps while retaining smooth movement?
    The only way to do this is to turn on VSync(with scr_SetOptions or scr_SetVSync). Also for really smooth movement it's recommended to use SYS_UPDATE function with dt argument.

    Quote Originally Posted by dazappa
    scr_SetVSync( true );
    scr_SetOptions( 800, 600, REFRESH_DEFAULT, FALSE, FALSE );
    if you want to use scr_SetVSync then it must be executed after scr_SetOptions(last argument of it also change VSync ).

    About GUI. Old versions of ZenGL were with it. But that GUI subsystem was without skins and was very simple(only label, button, checkbox, radiobutton, listbox, combobox, groupbox, editbox and spinbutton, without windows). And it was procedural, like GTK under Linux Maybe when I will release ZenGL 0.2, I will continue work on it and include it in ZenGL 0.3.x branch.
    Last edited by Andru; 31-01-2011 at 04:18 PM.

  8. #8
    Although I don't know any Russian, I would be more than happy to try to make your translation or google's translation understandable once you release it.

    Aha! Delta time is what I would be interested in as well, somehow I managed to skip right on past demo 01 which shows the basic setup.

    Anyone interested?

    Lazarus is nice, but overkill for developing ZGL apps. I started working on a little ZGL IDE a while ago. Of course it has a long way to go before an alpha release (it barely functions!), but I think I'll GPL the source and post on these forums once I feel it's stable and usable enough.

  9. #9
    Quote Originally Posted by dazappa
    Lazarus is nice, but overkill for developing ZGL apps.
    The only reason why I use Lazarus is debugger.

    Quote Originally Posted by dazappa
    I started working on a little ZGL IDE a while ago.
    Very interesting

    Quote Originally Posted by dazappa
    Although I don't know any Russian, I would be more than happy to try to make your translation or google's translation understandable once you release it.
    I use only my own knowledges(googletranslate can be used only for translation of some words, because whole sentences have a terrible quality...), and I need some fixes for grammar So, if you found something wrong in comments for demos(or you have just better variant), you can write me about this(with correct variant, of course) and I will fix it

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
  •