Announcement

Collapse
No announcement yet.

Use custom font for Diablo 16 in Designer mode

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

  • Use custom font for Diablo 16 in Designer mode

    I'm trying to develop a dashboard display for use in the automotive sector, but the default fonts included in the Diablo 16 processor are too small. Increasing their height or width does not yield esthetically pleasing results. Therefore I want to add a custom font and use it.

    I'm currently using the Designer environment with images stored on a RAW uSD. How can I get a custom font on this ad card?

  • #2
    Hi,

    You can implement it with raw partitioning. You might want to check this forum thread for additional information.

    Best regards,
    Vince_4D

    Comment


    • #3
      How can I convert a Windows font to a 'Diablo 16' compatible font and then put it on the RAW uSD?

      Comment


      • #4
        Hello,

        The thread suggested above might have used an old Font utility.

        Font tool:
        http://old.4dsystems.com.au/prod.php?id=80

        Here's another suplementary thread that may help you.

        Custom fonts:
        https://forum.4dsystems.com.au/node/38066

        Also, may I know why you need your uSD card to be in RAW format? or how much of it needs to be in RAW format?

        Another suggestion is to Format your uSD Card or some Partition of your uSD card into FAT16 so you could store font files in FAT16 format and access it as shown on this application note.

        ViSi Displaying Third Party Fonts FAT16:
        https://www.4dsystems.com.au/appnote/4D-AN-00080/

        General Partitioning a micro-SD into FAT and RAW Components:
        https://www.4dsystems.com.au/appnote/4D-AN-00042/

        I hope this helps.

        Best regards,
        Michael

        Comment


        • #5
          Thanks for replying. I don't necessarily need the uSD in RAW. I have put some images on the SD card in raw, using the Graphics composer. That's why I preferred to have the fonts stored in RAW as well.

          Anyhow, I've added a FAT16 partition to the SD card, so I now have both FAT16 and RAW as an option. I tried to used the Font Tool, but I'm not sure in what way I should export it. Is it correct to assume that you export the font somehow and then put the files onto the FAT16 partition? You then use file_LoadImageControl() to load the font and set the handle as the fontID. Is this procedure correct?

          If so, how do I export the font using the Font Tool? What export option should I choose? What files should I put on the FAT16 partition to be able to load the font?

          Thanks in advance.
          ​​​

          Comment


          • #6
            Hi,

            Export it as GCI. Then, follow the instructions on this thread - post #2.
            If you have any question regarding its implementation, feel free to ask.

            Best regards,
            Vince_4D

            Comment


            • #7
              If I put the GCI file on the FAT16 partition, how can I read it from the Diablo16 processor? Does file_loadImageControl suffice? It seems I also need to provide a .dat file as parameter, but there is none when I export it.

              Comment


              • #8
                Hi,

                Let me clarify some key points.

                If you're planning on loading the font data (font.gci) in RAW partition, you will need to create a .dat file in FAT16 partition with contents similar as shown below:
                Code:
                "myfontName" 0200 3B50 00 00
                Note: You must include the " ". The start sector depends on what you set on WRITEUSD.4DSCRIPT. Getting the values are discussed on the referred link on the previous post.

                With this setup, you will need to use the function file_loadImageControl("myfont.dat", "",2) to use the loaded font.

                But if you want to store the font.gci in the FAT16 partition, there should also be a .dat file in FAT16 parition containing similar as shown below:
                Code:
                "myfontName" 0000 0000 00 00
                With this, the file_LoadImageControl("font.dat", "font.gci", 1) must be utilized to use the font.

                Hope this will help.

                Best regards,



                Vince_4D

                Comment


                • #9
                  If I want to do the second thing (store gci file on FAT16 partition), how do I create the dat file for the gci file? Using the Font Tool, I only get the gci file, no .dat file.

                  Comment


                  • #10
                    Hi,

                    You can manually create it using any text editor.
                    Notepad would do.

                    Best regards,
                    Vince_4D

                    Comment


                    • #11
                      What should be the contents of the dat file?

                      I assume that

                      Code:
                       "myfontName" 0000 0000 00 00
                      will not work, because I need the correct address (LSB and MSB)? How do I get those?

                      Comment


                      • #12
                        Hi,

                        I have an easy way for you to generate a font data file (dat, d01, etc) as well as the font hex file (gci, go1, etc).
                        Just create a dummy ViSi project with a string object.
                        Customise the string object by double-clicking the Strings property.

                        Select the font of your choice and click ok. Refer to the image below (in this case Segoe Print is selected).

                        Click image for larger version

Name:	settings.PNG
Views:	81
Size:	7.4 KB
ID:	67055


                        Then, load the program. You should see generated files in the SD card. The generated files for the font are filename.d01 and filename.g01.
                        You can now copy the files and use them on your main project file.

                        For your convenience, attached is sample project for you to test.
                        ​​​​​​​Hope this helps and best regards,


                        Vince_4D

                        Comment

                        Working...
                        X