Announcement

Collapse
No announcement yet.

Line graphic characters with GRAPHIC PRINT?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Line graphic characters with GRAPHIC PRINT?

    Hi,

    for the console (DOS world) we have ASCII characters for line graphic in the
    range above 128, such as CHR$(218) for top left corner.
    Under Windows these characters are still available - now as UNICODE - but are
    coded with numbers above 255.
    Since PB does not (yet?) support UNICODE for the GRAPHIC PRINT command,
    I wonder if someone has an idea how to get such line graphic characters onto
    a graphic screen?
    As a last chance, they could be drawn by GRAPHIC LINE statements. But isn't
    there may be an easier way with GRAPHIC PRINT?

    Best regards,
    Gert Voland.
    Gert Voland

  • #2
    "Generic DOS" font looks promising...

    Comment


    • #3
      Sounds like you want to select an OEM font for the graphic window...

      Comment


      • #4
        MS Linedraw might be worth looking into also. Both MS Linedraw and Generic DOS fonts were suggested by lance for use with his dllprint program also.
        Client Writeup for the CPA

        buffs.proboards2.com

        Links Page

        Comment


        • #5
          >As a last chance, they could be drawn by GRAPHIC LINE statements

          As a LAST chance?

          Call me naive but I would think the GRAPHIC LINE statement was included so you could, um, er, well, draw lines.
          Michael Mattias
          Tal Systems (retired)
          Port Washington WI USA
          [email protected]
          http://www.talsystems.com

          Comment


          • #6
            Well, I don't have "Generic Dos" or "MS Linedraw" fonts installed on my Windows XP (no .ttf either).

            Does anyone know a (free) source?

            By the way, somehow I missed the meaning of the parameter charset& in FONT NEW, when you have to supply a fontname$:
            FONT NEW fontname$ [,points!, style&, charset&, pitch&, escapement&] TO fhndl?
            In PBCC Help there is this list with numbers between 0 and 255, but how does it work?

            Thanks,
            Gert Voland.
            Gert Voland

            Comment


            • #7
              Terminal font has them.

              Paul.

              Comment


              • #8
                Call me naive but I would think the GRAPHIC LINE statement was included so you could, um, er, well, draw lines.
                Don't worry, I won't call you anything ...

                Sure any replacement for line characters could be constructed. It would have to be called character by character - and would work primarily with fixed width fonts. I was just looking for an easier way ...

                I'm just testing different possibilities to (a) read in text files with frames based on line characters, (b) do some editing, (c) putting them on a GRAPHIC screen, (d) getting them on a printer AND (e) writing them back as .txt (which then can be read and translated to UniCode by Word).

                GV.
                Gert Voland

                Comment


                • #9
                  Gert,
                  the following code works here:
                  Code:
                  'PBCC5.02 program
                  FUNCTION PBMAIN () AS LONG
                  
                  LOCAL hWin, hFont AS DWORD
                  GRAPHIC WINDOW "Test", 300, 300, 600, 400 TO hWin
                  GRAPHIC ATTACH hWin, 0
                  
                  FONT NEW "Terminal",20 TO hFont
                  GRAPHIC SET FONT hFont
                  GRAPHIC PRINT "ÉÍËÍ»"
                  GRAPHIC PRINT "ÌÍÎ͹"
                  GRAPHIC PRINT "ÈÍÊͼ"
                  GRAPHIC PRINT "  ÚÄÄÄÄ¿"
                  GRAPHIC PRINT "  ÀÄÄÄÄÙ"
                  
                  GRAPHIC WAITKEY$
                  
                  END FUNCTION
                  Paul.

                  Comment


                  • #10
                    Also, do not forget good old 8514OEM and the newer aSwit Mono 437
                    Old QB45 Programmer

                    Comment


                    • #11
                      Paul,
                      Terminal font has them.
                      Yes, Terminal works well. The only drawback, it is a very roughly "pixeled"
                      font and can't be scaled well ...

                      Strange, though, that Terminal is available for most Window programs (Excel, TextPad, PB etc.) but not in Word (at least not in mine).


                      Guy,
                      ... good old 8514OEM and the newer aSwit Mono 437
                      Where could I get them from?


                      Rgds,
                      Gert.


                      PS: I still don't know what charset& is for in FONT NEW.
                      Gert Voland

                      Comment


                      • #12
                        Gert,
                        The only drawback, it is a very roughly "pixeled"
                        Then use Terminal for the boxes and another suitable font for the characters:
                        Code:
                        'PBCC5.02 program
                        FUNCTION PBMAIN () AS LONG
                        
                        LOCAL hWin, hFont1, hFont2 AS DWORD
                        GRAPHIC WINDOW "Test", 300, 300, 600, 400 TO hWin
                        GRAPHIC ATTACH hWin, 0
                        
                        FONT NEW "Terminal",70 TO hFont1
                        FONT NEW "Courier New",50,1 TO hFont2
                        
                        GRAPHIC SET FONT hFont1
                        GRAPHIC PRINT "  ÚÄÄÄÄ¿"
                        GRAPHIC PRINT "  ÀÄÄÄÄÙ"
                        GRAPHIC SET FONT hFont2
                        GRAPHIC SET POS (150,50)
                        
                        GRAPHIC PRINT "Hello"
                        GRAPHIC WAITKEY$
                        
                        END FUNCTION

                        Comment


                        • #13
                          >I'm just testing different possibilities to (a) ...

                          Um, you might want to look at either...
                          A. Creating a dialog to handle the "present text with frames for editing"
                          OR
                          B. Looking to see if a PB/WIndows license is in the cards. (DIALOG NEW + CONTROL ADD TEXTBOX)

                          ... and with either compiler, XPRINT is probably the most straightforward way to handle the printing.

                          The GRAPHIC WINDOW is not a substitute for a genuine window/dialog with real controls on it.

                          MCM
                          Michael Mattias
                          Tal Systems (retired)
                          Port Washington WI USA
                          [email protected]
                          http://www.talsystems.com

                          Comment


                          • #14
                            Gert,
                            and can't be scaled well ...
                            I hadn't realised that, I now see it only scales in large increments.

                            Paul.

                            Comment


                            • #15
                              Gert, if you need thos fonts (ms linedraw and generic dos), I have them and will gladly send them to you. email me.
                              Client Writeup for the CPA

                              buffs.proboards2.com

                              Links Page

                              Comment


                              • #16
                                Gert,

                                You can download the aSwit Mono 437 for free at http://www.aswit.com/english.htm

                                It is the best font for the PBCC IDE editor text
                                Goes from 8 to 36 size and has smooth pixel

                                If you download the PrintFil printing utility you will also get it
                                Old QB45 Programmer

                                Comment

                                Working...
                                X