Topic: AppGraphics Bug or

Hi Jeff,

I'm having difficulty displaying text in the vertical direction using AppGraphics.

Using the following AppGraphics commands and three different fonts, I've been unsuccessful to display text in the vertical position (-90 degrees from horizontal).  For example, a y-axis ordinate label.

        w = getmaxx ( )
        h = getmaxy ( )

        call settextstyle (DEFAULT_FONT, VERT_DIR, 18)
        INFO = "VERTICAL TEXT-1"
        tw = textwidth( TRIM(INFO) )
        call outtextxy( (w/2-300), INT(real(h/2-2*tw/3)), TRIM(INFO) )

        call settextstyle (SANS_SERIF_FONT, VERT_DIR, 18)
        INFO = "VERTICAL TEXT-2"
        call outtextxy( (w/2-250), INT(real(h/2-2*tw/2)), TRIM(INFO) )

        call settextstyle (WINDOWS_FONT, VERT_DIR, 18)
        INFO = "VERTICAL TEXT-3"
        call outtextxy( (w/2-200), INT(real(h/2-2*tw/1)), TRIM(INFO) )

I don't claim to fully understand the use of all AppGraphics drawing commands, but displaying text vertically should be fairly straight forward. 

What am I missing?   Or is this an AppGraphics bug?

Frank

Re: AppGraphics Bug or

Frank,

Vertical text is not currently working.   I'm looking into it now.

Jeff Armstrong
Approximatrix, LLC

Re: AppGraphics Bug or

Frank,

I haven't forgotten about this issue.  The problem stems from the simplistic way that AppGraphics was attempting to create vertical text.  Specifically, it was asking Windows to rotate the characters, which just isn't supported on many fonts.  I'm working on a more general fix, but it has been problematic thus far.  I would expect a new build containing the fix to be available sometime this week or next.

Jeff Armstrong
Approximatrix, LLC

Re: AppGraphics Bug or

Hi Jeff,

Thanks, I appreciate that you're working to find a fix that will allow AppGraphics to rotate text (whichever font you choose).

If your more general fix works, an added feature might include the capability to rotate the text at any angle, and not just vertically.  Obviously, this added feature is not expected to be a high priority, but it would be a nice addition to the horizontal and vertical text capability.

Thanks again, I look forward to the vertical font fix when it becomes available.

Frank

Re: AppGraphics Bug or

Frank,

There is now a bugfix build of Simply Fortran 2.24 (1921) that is available on the Download page.  Vertical text now works properly in AppGraphics.

In regards to arbitrary angles of text, I think that feature makes sense.  No promise on a time frame.

Jeff Armstrong
Approximatrix, LLC

Re: AppGraphics Bug or

Hi Jeff,

Thank you for taking the time to revise AppGraphics vertical font Settextstyle command.

The Call Settextstyle( ) command now displays text in the vertical position.

However, several of the fonts are displayed vertically but "underlined" when they should not be underlined.

For example,

                !-------------------------------------------------------
                !--- Y-axis lable of graph
                !call settextstyle (DEFAULT_FONT, VERT_DIR, 20)                !--- Vertical Text is underlined
                !call settextstyle (MONOSPACE_FONT, VERT_DIR, 18)            !---  Vertical Text is normal
                !call settextstyle (BOLD_SANS_SERIF_FONT, VERT_DIR, 18)    !---  Vertical Text is normal
                !call settextstyle (BOLD_SANS_SERIF_FONT, VERT_DIR, 20)    !---  Vertical Text is underlined
                !call settextstyle (SERIF_FONT, VERT_DIR, 18)                !---  Vertical Text is underlined
                call settextstyle (SANS_SERIF_FONT, VERT_DIR, 18)            !---  Vertical Text is underlined
                xlable = "Y-value"
                tw = textwidth( TRIM(xlable) )
                call outtextxy( (w/30), INT(real(h/2))-tw, TRIM(xlable) )
                !-------------------------------------------------------

The MONOSPACE_FONT correctly displays the text in the vertical position without being underlined.

But the BOLD_SANS_SERIF_FONT only displays the text correctly (not underlined) using FONT-18 and not FONT-20.

Frank

Re: AppGraphics Bug or

Frank,

I'll have to look into the problem.  It's probably not a true underline, but, rather, a graphical artifact.  To create vertical text, AppGraphics currently outputs the text to an internal buffer and copies the result, pixel by pixel, transformed, back to the actual drawing surface.  It's probably picking up some white somehow from the internal buffer.

Jeff Armstrong
Approximatrix, LLC