FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to print graphic characters
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
How to print graphic characters
Posted: Sun Dec 20, 2020 03:55 PM
In this sample, the graphic character (a vertical line) is not printed. Any ideas?

Code (fw): Select all Collapse
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oPrn, oFnt

    PRINT oPrn PREVIEW
        DEFINE FONT oFnt NAME "Courier New" SIZE 0, -16 OF oPrn

        PAGE
            oPrn:Say( 100, 100, "This should be a vertical line (ALT-179): " + CHR( 179 ), oFnt )
        ENDPAGE
    ENDPRINT

    RELEASE FONT oFnt

    RETURN NIL


EMG
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: How to print graphic characters
Posted: Sun Dec 20, 2020 04:27 PM
https://tools.oratory.com/altcodes.html


Code (fw): Select all Collapse
// <!-- m --><a class="postlink" href="https://tools.oratory.com/altcodes.html">https://tools.oratory.com/altcodes.html</a><!-- m -->

#include "Fivewin.ch"

FUNCTION MAIN()

   LOCAL oPrn, oFnt, cAlt_179 := "| ³ ãäå |"
   LOCAL cAlt_124 := "|"

   PRINT oPrn PREVIEW

      DEFINE FONT oFnt NAME "Courier New" SIZE 0, -16 OF oPrn

      PAGE
         //oPrn:Say( 100, 100, "This should be a vertical line (ALT-179): " + CHR( 179 ), oFnt )

         oPrn:Say( 100, 100, "This should be a vertical line (ALT-124): " + cAlt_124, oFnt )
      ENDPAGE

   ENDPRINT

   RELEASE FONT oFnt

RETURN NIL


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How to print graphic characters
Posted: Sun Dec 20, 2020 05:44 PM

Thank you, but I need to print an existing text file containing graphic characters like CHR( 179 ).

EMG

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: How to print graphic characters
Posted: Mon Dec 21, 2020 02:08 AM
Please define the font with OEM charset like this:
Code (fw): Select all Collapse
        DEFINE FONT oFnt  NAME "Courier New" SIZE 0, -16 OF oPrn CHARSET 255
Regards



G. N. Rao.

Hyderabad, India
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How to print graphic characters
Posted: Mon Dec 21, 2020 09:25 AM

Thank you, it works! :-)

EMG

Continue the discussion