Thread: Choosing a cross-platform graphics library for perfect text rendering

  1. #1
    Registered User
    Join Date
    Feb 2013

    Choosing a cross-platform graphics library for perfect text rendering

    I want to write a simple text editing application in c/c++ ( mainly devoted to source code editing ) with these specifications:

    • cross-platform ( Windows, OS X, Linux )
    • insanely fast
    • a superior font printing quality * MOST IMPORTANT OF ALL *
    • it's not very important the widget support, I don't really need a complex support of widget
    • precedence to software code architecture and its speed instead of speed coming from support of hardware acceleration
    • I'm interested only on monospaced font families or font families used for source code ( eg: consolas, inconsolata, courier new, lucida console, etc )

    Before writing I made a study and some search on the net, but I need some advice to choose better:

    I discarded QT, I don't like how to use it.
    Which things I miss using a library instead of another? And what about the support? In some cases, it's not very clear to me what each library offers to me and what is the work I have to do to reach my goal ( eg. other layers to add to graphics project ).
    An example of graphic stack organization helps me very much too choose the right tool. I have to choose the right balance to customization and deploy speed. Eg: what SDL offers less than Cairo or Skia? Etc. Eg. ( starting from layers closer to the OS )

    • Backend ( = virtualization of the OS graphics )
    • ?
    • ?
    • ?
    • Rapid Application Toolkit to compose widgets into application

    I hope my question is clear enough to have some help.
    thank you very much
    Last edited by Pich78; 02-14-2013 at 06:34 AM. Reason: Removed the specification: with the as much as possible the same appearence on each os

  2. #2
    Registered User
    Join Date
    Jun 2005
    I suggest you revisit the importance of font quality. It doesn't always matter, except in highly graphic-intensive systems - which a text editor is not.

    The default font selection by most GUI frameworks is the default system font, or some other font typically available on the host system. Users of modern windowing systems tend to get grumpy with programs that use a font or colour scheme that is radically different from their chosen system settings. Doing so - without a very good reason - is therefore usually a poor idea.

    You also can print (to printer) using fonts that are optimised for printing, and those fonts can differ (if you take appropriate care with layout) from the fonts used for display on screen.

    Most GUI frameworks do support font selection. Virtually all allow selection from available system fonts. If you want other fonts, pick a framework that is able to make use of third-party fonts, and then find a font (plenty are available free, although high quality fonts are often commercial products you will need to pay for).

    Additionally, if I read your requirement correctly, you want your program appearance to be the same on all OS (i.e. it looks the same on windows as on Gnome as on .....). That is generally considered amateurish - it is easier to program, but not so good for users. Good practice is for the application to have a look and feel consistent with the host system. Again, users don't appreciate windows that look out of place on their desktop.

    "Insanely fast" is a ridiculous requirement - it is more about programmer ego than about usability, and is a waste of time as you spend time hand-optimising performance of code without any real benefit to the end user. Better to get the program working, and only tweak performance in areas that actually matter to the end users. Also, performance optimisation techniques that work on one host computer do not always carry across to others. User interface design - particularly cross-platform - is a bunch of trade-offs, and performance (higher rendering or refresh rates, etc) is not always better for the end user.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  3. #3
    Registered User
    Join Date
    Feb 2013
    Thank you for your answer.

    You are 100% right on one thing: "with the as much as possible the same appearence on each os"
    Each application should have the look and feel proper of that os.

    My base idea is to have something like Chrome that, even if it have a good integration in the file system, mantain a personal look and feel on each platform.
    Which library helps me more to do this?

    Ok for the fonts: I want to use only system fonts.

    Insanely fast: It means as fast as windows notepad. I can tolerate a longer time when the program starts, but during the use it should be very fast and responsive.

    Thank you for your answer.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. free c++ odbc library, that is cross-platform
    By underthesun in forum C++ Programming
    Replies: 3
    Last Post: 08-24-2009, 05:00 AM
  2. Looking for light cross platform Threading library
    By umen242 in forum C++ Programming
    Replies: 7
    Last Post: 03-28-2008, 04:23 PM
  3. Difficulty choosing graphics library
    By jdiperla in forum Game Programming
    Replies: 11
    Last Post: 02-27-2008, 06:35 PM
  4. Cross platform XML library
    By Josh Kasten in forum C++ Programming
    Replies: 2
    Last Post: 04-09-2007, 04:04 PM
  5. Need some help choosing a good graphics library
    By dead_cell in forum Game Programming
    Replies: 31
    Last Post: 01-08-2003, 01:30 PM