Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    PanelDue font header format change proposal

    Scheduled Pinned Locked Moved
    Firmware wishlist
    3
    5
    873
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Sv2kundefined
      Sv2k
      last edited by

      Current header:

      extern const uint8_t glcd28x32[] =
      {
      28, // character width in pixels
      32, // row height in pixels
      3, // space columns between characters before kerning
      0x20, // first character code
      0xFF, // last character code

      Proposal:

      extern const uint8_t glcd28x32[] =
      {
      28, // character width in pixels
      32, // row height in pixels
      3, // space columns between characters before kerning
      2, // character ranges (1-255)
      0x20, 0x00, // first character code (16-bit little-endian value, range 1)
      0xFF, 0x00, // last character code (16-bit little-endian value, range 1)
      0x10, 0x04, // first character code (16-bit little-endian value, range 2)
      0x4F, 0x04, // last character code (16-bit little-endian value, range 2)

      Offset of first character is (number of ranges)*4 + 4.

      The goal of this proposal is to enable more locales (cyrillic, eastern, etc) but save flash memory by not including complete unicode fonts, only certain ranges

      1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators
        last edited by

        That looks good to me. When you add new characters, make sure they come from open source fonts.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        1 Reply Last reply Reply Quote 0
        • Sv2kundefined
          Sv2k
          last edited by

          Proof-of-concept implementation of non-continuous unicode fonts for PanelDue. In this patch I added Russian alphabet (Unicode characters from 1040 (0x0410) to 1103 (0x044F)) to the glcd28x32 font. I used the same Liberation Sans font (Windows size 22) and it looks great. I replaced Control button label with first and last chars from second font range and it works okay.

          Firmware size is still acceptable (~101kb) so I can make a full Russian locale now.

          1 Reply Last reply Reply Quote 0
          • Sv2kundefined
            Sv2k
            last edited by

            Any ideas how to place more locale labels on screen? There is a room for 4 locales, what if I want to add 5th or 6th?

            1 Reply Last reply Reply Quote 0
            • T3P3Tonyundefined
              T3P3Tony administrators
              last edited by

              Can you have the locale button open a scrollable dialog box (like we have for selecting g-code files)? that way you can have as many locales as you like.

              www.duet3d.com

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Unless otherwise noted, all forum content is licensed under CC-BY-SA