X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 23 Mar 2020 01:59 PM by  Kenneth Bowman
TrueType font rendering quality
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

Kenneth Bowman



New Member


Posts:5
New Member


--
13 Mar 2020 02:40 PM
    I run IDL on Mac and Linux.

    Occasionally I need to to do pixel-for-pixel plotting of image data. X-windows works for this, and I can use hardware (bitmapped) fonts. I can do this in batch mode (that is, without a display) using Xfvb; but that has some issues of its own (related to X-Windows, not IDL).

    So the obvious solution is to use the Z-buffer instead of Xvfb. The downside is that the rendering quality of TrueType fonts, at least on MacOS and Linux, is terrible. I can send small example images if anyone is interested.

    Is there any way to improve the TrueType rendering quality? How do MS Windows users live with this? Does MS provide a better font renderer in Windows than we get on Mac or Linux?

    Cheers, Ken Bowman

    BTW, why does the forum software remove all of the carriage returns and make this hard to read?

    Ben Castellani



    Basic Member


    Posts:130
    Basic Member


    --
    20 Mar 2020 04:06 PM
    Hello Ken,

    Can you provide a snippet of code to show the issue you are seeing with poor TT font rendering on Linux/Mac?

    Thanks!

    Kenneth Bowman



    New Member


    Posts:5
    New Member


    --
    23 Mar 2020 01:59 PM
    Here is the code to set up the X device

     

    Here is the plot setup code for the Z-buffer

    [CODE]SET_PLOT, 'Z' ;Set plotting device to X-Windows DEVICE, SET_PIXEL_DEPTH = 24 ;Use 24-bit color DEVICE, SET_RESOLUTION = [nx + i1 + i2, ny + j1 + j2] ;Define plot dimensions in pixels DEVICE, SET_CHARACTER_SIZE = [6, 9] ;Set character size to match X-Windows default DEVICE, SET_FONT = ['Helvetica Bold'] ;Set TrueType font !P.BACKGROUND = COLOR_24_KPB('white') ;Background color !P.COLOR = COLOR_24_KPB('black') ;Foreground color !P.FONT = 1 ;Use TrueType fonts !P.CHARSIZE = 2.0 ;Default font size


    I can post pictures comparing the two devices (which are each worth a thousand words), if someone can explain how to use the Image embed button in the forum software.

    Also, I don't suppose the forum has a preview post option?

    Cheers, Ken
    You are not authorized to post a reply.