How to print graphic characters

Post Reply
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

How to print graphic characters

Post by Enrico Maria Giordano »

In this sample, the graphic character (a vertical line) is not printed. Any ideas?

Code: Select all

#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
User avatar
karinha
Posts: 4882
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: How to print graphic characters

Post by karinha »

https://tools.oratory.com/altcodes.html

Code: Select all

// https://tools.oratory.com/altcodes.html

#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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: How to print graphic characters

Post by Enrico Maria Giordano »

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

EMG
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: How to print graphic characters

Post by nageswaragunupudi »

Please define the font with OEM charset like this:

Code: Select all

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

G. N. Rao.
Hyderabad, India
Post Reply