Degree symbol in Guix

In a project for a touch screen board with R7FS7G27H micro I am using E2studio, and Guix for the graphics. 

If I use the symbol ° (degree) in a label, this symbol is not printed on the screen.

Thank you

  • Hi stage,

    Have you tried using ASCII code instead of typing the symbol ° (degree)?

    Herald
    RenesasRulz Forum Moderator

    https://renesasrulz.com/
    https://academy.renesas.com/
    en-us.knowledgebase.renesas.com/
  • In reply to Herald:

    I tried. In both cases the symbol is not even displayed on the Guix preview of the window that contains this string.
  • In reply to stage:

    It looks like the default font doesn't include the degree symbol. If i choose one of the other fonts and set a user defined page to include the degree symbol, I can get the degree symbol to be displayed in the GUIX preview :-

     

  • In reply to stage:

    Hi stage,

    Have you checked Jeremy's reply?
    Check if this will help you.

    Herald
    RenesasRulz Forum Moderator

    https://renesasrulz.com/
    https://academy.renesas.com/
    en-us.knowledgebase.renesas.com/
  • In reply to Herald:

    Thank you. I followed the example but when I build I have this error:
    "The symbol GX_EXTENDED_UNICODE_SUPPORT must be defined to support the Studio project settings".
    If I define it in e2studio, every time that I generate the output files from Guix it is deleted, so it seems that I have to define it in Guix but I can't find this option.
  • In reply to stage:

    Have a look at the atached project. A slight tweak to my answer above :-

    no need to check "Support Extended Character Range" or set a user defined page.

    SSP_1_7_8_S7G2_SK_GUIX_Degree_Symbol.zip

  • In reply to Jeremy:

    When I open your Guix project the degree symbol is not displayed, but the software displays a message that says that it was created with a newer version than mine. Maybe I only need to update my software version? How can I do it?
  • In reply to stage:

    Hi stage are you referring to the latest GUIX studio software? You can get it here: www.renesas.com/.../guix-studio.html


    Herald
    RenesasRulz Forum Moderator

    https://renesasrulz.com/
    https://academy.renesas.com/
    en-us.knowledgebase.renesas.com/
  • In reply to Herald:

    Thank you! With the updated version I solved the problem.
  • It looks like you figured it out, so I'll just add a few things I discovered:

    To use the degree symbol in a string (instead of a string id), you need the sequence "\xc2\xb0". So
    strcpy (string, "\xc2\xb0");
    gx_multi_line_text_view_text_set (widget, string);
    will cause your degree symbol to appear on-screen (assuming it's defined in your font).

    I also found this issue when defining the character ranges for fonts in GUIX Studio: If a character appears in two different ranges - even an unused range! - it will be double-defined in the _resource.c file so as to be included in two different glyph pages. To prevent this, find the duplicate character range and edit it to not include the desired character (even when the character range is not checked and thus not used).