How to print graphic characters

How to print graphic characters

Postby Enrico Maria Giordano » Sun Dec 20, 2020 3:55 pm

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

Code: Select all  Expand view
#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
Enrico Maria Giordano
 
Posts: 8709
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to print graphic characters

Postby karinha » Sun Dec 20, 2020 4:27 pm

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


Code: Select all  Expand view

// 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 - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7794
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: How to print graphic characters

Postby Enrico Maria Giordano » Sun Dec 20, 2020 5:44 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8709
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to print graphic characters

Postby nageswaragunupudi » Mon Dec 21, 2020 2:08 am

Please define the font with OEM charset like this:
Code: Select all  Expand view

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India



Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 21 guests