Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 5 123 ... LastLast
Results 1 to 10 of 45

Thread: OpenGL should provide direct font support

  1. #1
    Intern Newbie
    Join Date
    Dec 2012
    Posts
    42

    OpenGL should provide direct font support

    in my opinion a next OpenGL release should support direct font support !

    What do other´s think ?

    Who could push such a development ?

  2. #2
    Junior Member Regular Contributor
    Join Date
    Apr 2004
    Posts
    228
    My opinion is that opengl should stay narrowly specialized in it's field, that is, interface to 3D graphics hardware. It is big and complex enough as it is. If we must have some kind of standard font api, then lets make a separate one like OpenAL, OpenCL etc.
    Imagine font support was added (i don't know what exactly it would be). But most opengl users really need just the 3d graphics. Still all opengl vendors will need to implement support for fonts, only to stay unused most of the time - unneeded burden for them.
    Keeping the things as separate as possible is the best way. Otherwise it gets bloated and messier out of control.

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,101
    nVidia have arleady made moves towards a font system with their NV_path_rendering. I would like to see this promoted. I disagree with I_belev that opengl uses just do 3d. Every 3D app I have written has required 3D text to some extend whether it was a game or commerical software.

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Apr 2009
    Posts
    578
    I agree with I_believ. I do like NV_path_rendering, but font support is a terribly hairy affair. First off: fonts come in lots and lots of formats, loading and using all those formats is non-trivial. Then we get to rendering: many SVG fonts (such as TTF, etc) have a hinting system which is a dedicated virtual machine. The need for hinting is because letters are usually drawn pretty low-resolution compared to the complexity of the path defining them. Going further, for formatting text kerning is only the beginning there is also shaping. Next comes font selection, i.e. selecting a font from a generic-ish description. Different OS's have different ways of selecting fonts... and then comes font merging, there are situations where the glyphs of a font are broken into multiple files.

    AFAIK, NV_path_rendering, likely uses freetype to load fonts and the uses a very specific OS mechanism for selecting a font (for example under Linux it likely uses fontconfig, which is, in my opinion, garbage). Moreover, AFAIK, NV_path_rendering does not support shaping either...

    What would be nice: an official utility library backed by Khronos where these bits can be implemented. GLU was the last one official utility library but it is OOOOLLD, out dated etc... https://github.com/p3/regal is coming along but it's main purpose is NOT a utility library, but it does have GLU within it.
    Last edited by kRogue; 01-01-2013 at 08:49 AM.

  5. #5
    Junior Member Regular Contributor
    Join Date
    Apr 2004
    Posts
    228
    Quote Originally Posted by tonyo_au View Post
    Every 3D app I have written has required 3D text to some extend whether it was a game or commerical software.
    Every 3D app also for example loads textures form files. Does this mean file input/output functions should be added to opengl too?

  6. #6
    Junior Member Newbie
    Join Date
    Dec 2012
    Posts
    8
    I've been programming Opengl as a hobby for over 10 years and the hardest thing to get right is decent font rendering. Either libraries are old and unmaintained, not cross platform, or have horrible documentation/complete tutorials. While I agree with I_belev that fonts probably don't belong in the spec itself, there needs to be something a little more official.

  7. #7
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,264
    Quote Originally Posted by abdd0e77 View Post
    I've been programming Opengl as a hobby for over 10 years and the hardest thing to get right is decent font rendering. Either libraries are old and unmaintained, not cross platform, or have horrible documentation/complete tutorials. While I agree with I_belev that fonts probably don't belong in the spec itself, there needs to be something a little more official.
    There will never be anything official. Even GLU is no longer maintained and that has been like 13 years.
    Your best bet is to write your own code. You have been doing it for years, so invest some time into your own font system. The easiest is to create a "font map".
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  8. #8
    Intern Newbie
    Join Date
    Dec 2012
    Posts
    42
    Thank´s for the posts.

    My opinion:
    If OpenGL is not able to support native Font-Support it will still remain as a poor system.
    It seems that the core developers of OpenGL have reached their intellectual limits.

    best regards
    luis

  9. #9
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,099
    I was gonna write something harsh, but in between I reached my intellectual limit.

  10. #10
    Intern Newbie
    Join Date
    Dec 2012
    Posts
    42
    here two other intellectual limits are reached by OpenGL:

    The near clipping plane, and the far clipping plane.
    How can I tell those guys that these limits are not necessary ?

    Therefore here are my suggestions for the next release of OpenGL :
    - native font support
    - no near clipping plane
    - no far clipping plane
    - better polygonal functions

    best regards
    Luis

    Life is too short to fret around with inadequate systems.

Posting Permissions

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