Menu

Oled German Umlauts

Help
bed
2020-04-30
2020-05-03
  • bed

    bed - 2020-04-30

    Hello Great Cow BASIC experts.
    A few questions about the fonts in the glcd universe.
    Is there a way to use german umlauts ä;ü;ö;ß;Ä;Ö;Ü in the standard font? My minor research on this shows that it is not possible?

    Especially the small Oled Displays 128x64 ssd1306 modules
    If I use the Oled Fonts and define my own, the font is too small. Also, ticker tape fails then

     
    • Anobium

      Anobium - 2020-04-30

      Use the extended GCB fonts and create your own font set.

      The C:\GCB@Syn \GreatCowBasic\Demos\glcd_solutions\glcd_extended_fonts_solutions shows how to achieve this in Greek.

       

      Last edit: Anobium 2020-04-30
  • stan cartwright

    stan cartwright - 2020-04-30

    How do we redefine chars? Where are the greek chars kept in gcb before being loaded to pic so they can be redefined.
    This info, I cannot find.
    "The C:\GCB@Syn \GreatCowBasic\Demos\glcd_solutions\glcd_extended_fonts_solutions shows how to achieve this in Greek."
    Yes, but not how to redefine the characters, just use the predefined Greek chars.

     
    • Anobium

      Anobium - 2020-04-30

      Look in the demos.... some more... there is code to show how to swap chars in the existing font sets.

      But, for extended fonts redefine the following tables from Greek to the chars required.

      GLCDCharCol3Extended1
      GLCDCharCol4Extended1
      GLCDCharCol5Extended1
      GLCDCharCol6Extended1
      GLCDCharCol7Extended1
      
       
  • stan cartwright

    stan cartwright - 2020-04-30

    yes. how to in demos.
    so we have

    '''Greek characters are placed in the fontset, the first Greek character starts 190 ASCII and the counting goes on until the last Greek letter omega.
    '''This is how the numeration of the letters begins in Greek fonts that Greek Windows use.
    '''?here must be the necessary character match for displaying correctly in the source program to the support ASCII characters.
    

    I thought a normal ascii char set started at 32 for a space.
    Bed wants to change ä;ü;ö;ß;Ä;Ö;Ü and probably want to use a normal english charset so how?
    IMHO not clear howto.
    Using glcd the char set is not what I'm used to where chars are different sizes and drawn.

    '''This program demonstrates adding an additional font for use on the GLCD.
    '''Multiple fonts can be added - this example shows adding one font.
    '''Adding a new fontset uses the global variable GLCDfntDefault where 0 is normal font, 1 is our new font). Font 1 addresses the new font table, see code.
    '''To add additional fonts requires a replacement AltGLCDDrawChar subroutine, the instruction '#define GLCDDrawChar AltGLCDDrawChar' and the Table(s) of the fonts definitions.
    '''By adding the new subroutine this redirects GLCD character writing routines to enable the additional font handling.
    '''To select a Font use GLCDfntDefault = 0 for the standard,, or GLCDfntDefault = 1 for the alternative font.
    '''This supports the KS0108 and the ST7920. The subroutine can be easily adapted to support other GLCD displays.
    also

      #define OLEDFont1Data myOLEDFont1Data                        'Redefine the OLEDFont1Data
      Table myOLEDFont1Data                                        'alternatice font set
    
        1, 0x00                   ' Space
        1, 0x5E                   ' !
        3, 0x06, 0x00, 0x06     ' "
        5, 0x06, 0x09, 0x06, 0x00, 0x00   ' degree                 'Change the # to a degree sign! here!!
        5, 0x24, 0x2A, 0x7F, 0x2A, 0x10 ' 
    
     
  • Anobium

    Anobium - 2020-04-30

    Stan. What it the goal?

    Dimi may be better to help as I am trying to get the release sorted.

     
    • stan cartwright

      stan cartwright - 2020-04-30

      Understanding gcb as Bed is trying to do. quote "My minor research on this shows that it is not possible?"
      It is possible but not obvious.
      last time I changed a charset was in the 80's and chars were 8x8 pixels and usesd 8 bytes where each byte represented 8 pixels.
      the char set was in rom but there was a 16bit sys variable that pointed to the char set. If you changed this to point to ram you could poke a char set into ram and use that instead. not so with gcb...more relearning.

       
      • bed

        bed - 2020-04-30

        Thank You Stan for second me :-)
        Tomorrow is a public holiday in Germany, maybe I will be able to deal with it :-)
        And I will use this for Creation, Anobium had pointed this long ago: http://dotmatrixtool.com/#

         
        • stan cartwright

          stan cartwright - 2020-04-30

          @bed, I am like you with gcb glcd support. To make matters more complex, the ssd1306 uses a 1K buffer for the display.
          the standard ascii set is http://www.asciitable.com/
          quote from gcb demo code to use greek chars "the first Greek character starts 190 ASCII and the counting goes on until the last Greek letter omega."
          This does not help me...or you.
          What we need is a standard char set with chars we don't want and a way to change those chars. It is not obvious how to do this IMHO.
          edit the ssd1306 is nice but I prefer ili9341.
          same problem with charsets for me. I thought this was more "normal".
          It is very good, the way the glcd has evolved to support many displays with universal code.
          When I understand it...then I will, in theory, be able to use any supported display.....
          that is the plan.

           

          Last edit: stan cartwright 2020-04-30
        • stan cartwright

          stan cartwright - 2020-04-30

          no 5 pixel char option as used in glcd.
          looks like a space invader :)

           

          Last edit: stan cartwright 2020-04-30
        • stan cartwright

          stan cartwright - 2020-04-30

          is ß the same as ss?
          German was my choice of second languge to learn when I was in school.
          It was that or Welsh..the native language of my country that only a few people speak. It is much more difficult to learn than German. everything has a gender. like German..in fact Welsh is a Germanic language.
          If you ask evan, he will give you my email..if you want to discuss ideas about gcb..or maybe facebook.

           
          👍
          1
          • bed

            bed - 2020-05-01

            The ß is not that important, some Germans, including myself, do not know anymore exactly when to use it and when not to use it ;-) Many thanks to the spelling reform, they wanted to omit the ß, but didn't have enough guts in their bones! Now we live with a partial change.

            The main problem is that the umlauts are all above 127 in ASCII code. They were ignored in a design decision when creating the fonts for GCBASIC.
            I don't want to criticize this, after all the German language is not that important, English is often much shorter anyway, so you have less difficulties when designing a user interface. I only came up with this idea because I wanted to make my menu system in German. With "Menü" with German "ü" I save one character compared to "Menue". That is the real reason. :-)

            Welsh is in fact a language spoken by only a few people, similar to Danish. I can sympathise with Danish, it sounds a bit like a mixture of English, German and something else :-)
            But Welsh sounds very strange to me, I already have my problems with English :-)
            Well, on the subject, I will build my menu without German umlauts.

             

            Last edit: bed 2020-05-01
            • Chris Roper

              Chris Roper - 2020-05-01

              Just my observation but I am not so sure that they were ignored as they are not actually part of the ASCII Character Set.

              ASCII is a 7bit code from the 1960 that was used for teletype machines.

              With the introduction of home computers Extended ASCII started to make an appearance but most of the extended characters were for line drawing, simple graphic creation and mathematical symbols.

              Several extended character sets were subsequently produced that were language specific but they were an ANSI standard and not part of the ASCII standard.

              The solution chosen by the Display manufacturers was to hard code the 7 bit ASCII Character set and allow some or all of the extended characters to be user definable.

              Most PC operating systems now us UNICODE Character sets with the original ASCII codes mapped to the first 127 values of unicode.

               
              • bed

                bed - 2020-05-01

                Yes, the first 7Bit is the origin of ASCII as it was once defined, everything about it developed later. However, UTF-8 for microcontrollers would be a bit exaggerated, too.
                It is as it is, I had my mail rather for confirmation, not for someone to come around the corner and say: But there is a simple way to use the umlauts in the standard font :-) (Translated with deepl.com) Hopefully my sentences makes sense

                 
  • stan cartwright

    stan cartwright - 2020-05-01

    also wir haben
    To select a Font use GLCDfntDefault = 0 for the standard,, or GLCDfntDefault = 1 for the alternative font.
    Then we have-

      #define OLEDFont1Data myOLEDFont1Data                        'Redefine the OLEDFont1Data
      Table myOLEDFont1Data                                        'alternatice font set
    
        1, 0x00                   ' Space
        1, 0x5E                   ' !
        3, 0x06, 0x00, 0x06     ' "
        5, 0x06, 0x09, 0x06, 0x00, 0x00   ' degree                 'Change the # to a degree sign! here!!
        5, 0x24, 0x2A, 0x7F, 0x2A, 0x10 ' 
    

    so just define the chars you want using

     #define OLEDFont1Data myOLEDFont1Data
    

    then when you need to use those chars use GLCDfntDefault = 1

    so a space would be what you defined it and ! would be what you defined it, etc.
    Use GLCDfntDefault = 0 to use normal font.
    I have not tried this, it is just a thought. What does anobium think?

     
  • stan cartwright

    stan cartwright - 2020-05-02

    You could just print aouBAUO and pset 2 pixels over the chars...if there is space. Easiest way.

     
    • bed

      bed - 2020-05-03

      Great idea!
      But I can't implement that, because I'm already scratching the memory limit with Character_only mode. In the beginning I used the graphic mode, but then I got away from it quickly. I'm not building a game, but a shutter control, so graphics is nice, but it's a pain to bear :-)

       
      • Anobium

        Anobium - 2020-05-03

        I think this is as simple as changing a few values in the standard font set.
        ä;ü;ö;ß;Ä;Ö;Ü

        What chars between 32 and 127 do you want to give up on? Then, change the seven your give up.

        How about giving up 0x5e to 0x60 and 0x7b to 0x7e
        0x7e = ä
        0x7d = ü
        0x7c = ö
        0x7b = ßÄ
        0x60 = Ä
        0x5f = ;Ö
        0x5e = Ü

        So, which font set are you wanting to adapt? GCB old fonts? OLED fonts? If OLED which sizes?

         
  • stan cartwright

    stan cartwright - 2020-05-03

    There seems to be 2 demos of changing fonts.
    One uses pset so would not work if bed is using non-graphics mode.
    I did not follow the other demo which changed # to degree sign. There is a charset table but where is it read in the code?

     
    • Anobium

      Anobium - 2020-05-03

      You just change the Tables. Same code.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.