Announcement

Collapse
No announcement yet.

How to use fonts

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

  • baxter stockman
    replied
    ahh okk, thanks !

    Leave a comment:


  • ESPsupport
    replied
    It means just what it says, many people create huge GCIs without realizing that they have made a mistake with the number of values in a gauge.

    In your case this may be correct, as an large Arial Unicode font could exceed 200MB. I created a 40point unicode font and it came in at 355MB.

    You can change the file size at which this message occurs in File, Options, Warnings

    Leave a comment:


  • baxter stockman
    replied
    Hi,

    I'm playing around with this according to this thread. The settings of the strings field I changed to Unicode and as a font I am using Arial Unicode MS.

    So now I am getting this message:GCI file expected to exceed 200MB, have you inadvertedly created a gauge with a large number of values, perhaps? Do you want to continue?

    What does that mean?


    Thanks !

    Leave a comment:


  • Hobbex
    replied
    Oh, sorry, i didn't see your reply until now, when you mentioned it on the other thread. Too bad the forum don't send out notifications on ones threads, maybe it's a setting, i'll check it out.

    However, thanx alot for your info. Now i know all my testing and investigation wasn't in vain. It's just not possible to use unicode characters directly, not in an easy way anyway.

    I did my own script in Excel, that does the same thing as your app. So we we're on the same path.
    Sorry for wasting your time in vain.

    Leave a comment:


  • ESPsupport
    replied
    Hmm, ok. Judging from what you have posted it looks like you are using Arduino.

    After looking and googling and looking some more it appears that Arduino uses UTF8 for it's encoding. At least it stores the cryllic characters that way in the source and then they 'flow' through and come out that way at the other end (i.e. 0xD09F rather than 0x041F).

    For some reason they don't see the need to support unicode (UTF8 is not Unicode) and seem to expect 'you' to convert from UTF8 to Unicode on your target system, even though a) Arduino doesn't actually use UTF8, b) UTF8 is not a font, c) why add another layer on your target system, etc.

    I suspect UTF8 is more of a *nix thing and maybe that's why they cling to it, no idea.

    Anyway, I have written a small app to 'help' Arduino do the right thing for you. Type your Cryllic (or whatever) into the app and it will create a 'proper Unicode' representation that can be pasted into Arduino.

    Let me know how you get on with it
    Attached Files

    Leave a comment:


  • Hobbex
    replied
    some progress...
    The values above, is in UTF-8, while the cyrillic ASCII-codes (unicode) needs to be in UTF-16. So i guess i'm needing some sort of UTF-8 to UTF-16 convertion function.

    The Arduino serial monitor doesn't support UTF-8 at all, hence the wierd characters,

    more info here:
    http://playground.arduino.cc/Code/UTF-8

    Leave a comment:


  • Hobbex
    replied
    Thanks Mark,
    yes, i've tried everything.

    I think the problem is with the font-mappings, depending on how the font are created.

    Let me ask you this way: What font do you recommend? I only need to get the cyrllic fonts working so the font doesn't really matter.

    All Unicode fonts should work, right?

    (sorry: fonts and character-encoding is not my strength of area)

    Leave a comment:


  • ESPsupport
    replied
    PutChar takes an integer, or word. It's sort of working, as shown by the display of the Chinese letters, just need to figure out why those and not the expected result.

    If I look up 0xD09F using Windows Character Map and the Arial Unicode font I get the Chinese character as shown on the display.

    If I try to look up 0xD09F using Windows Character Map and the Andika font I get 'nothing', which indicates that 0xD09f does not exist in this font. (This just means when Font Tool builds the font Windows gives it 'what it can find' for 0xD09F, so it probably takes the Arial Unicode character, but you can never tell for sure).

    If I paste

    word str[] = {'П','A','П','р','и','в','е','т'};

    into Notepad, save it as Unicode and then look at the contents I get

    0x041F for П

    If I then look up 0x041f in character map I get the correct character.

    So I suspect whatever you have typed the 'str' into has either pulled a fast one with the font or has done something odd when building your code. See if you can alter its 'Display Font' to be Andika and 'repaste', or maybe find out what its display font is and use that on the display.

    HTH

    After I reread your post I see, that you have perhaps already worked out most of this. Hope my 'Angle' might help solve it

    Leave a comment:


  • Hobbex
    replied
    I'm using Serial, with Arduino....

    putChar only takes one byte, while Unicode is two bytes. If so, How do i solve that issue?



    I'm using a font called Andika, a Unicode font, available here:

    http://scripts.sil.org/cms/scripts/p...nload#1fd0063a
    Direct link: http://scripts.sil.org/cms/scripts/r...dika-5.000.zip

    I used UNICODE-setting in the font-tool.



    In the code, i'm doing something like this:

    word str[] = {'П','A','П','р','и','в','е','т'};

    for(int i=0;i<sizeof(str);i++)
    {
    Display.putCH(str[i]);
    }


    The output on the display is (chineese letters?):

    20141121_005053.jpg



    And some debug-prints:
    Serial.print("str[i]=");Serial.write(str[i]);Serial.print("\t"); Serial.print(str[i]);Serial.print("\t");Serial.println(str[i],HEX);

    Gives:

    str[i]=Ÿ 53407 D09F

    str[i]=A 65 41 <- ANSII A ???

    str[i]=Ÿ 53407 D09F

    str[i]=€ 53632 D180

    str[i]=¸ 53432 D0B8

    str[i]=² 53426 D0B2

    str[i]=µ 53429 D0B5

    str[i]=‚ 53634 D182

    str[i]=ð 240 F0

    The HEX value seems to be the "URL escape"-value and not the real HEX value (should be 0x041F for the first letter).




    Here's a great site for ASCII-conversions etc:
    http://rishida.net/tools/conversion/

    Specific for Russian/Cyrillic with the Text in the code:

    http://rishida.net/uniview/?charlist...B2%D0%B5%D1%82

    (Tip: click on the letters on the left side for more info).


    I hope you can help me with this one..



    Leave a comment:


  • ESPsupport
    replied
    If you are just sending dynamic strings, then yes, you will need to set the dropdown to Unicode. If you paste a string containing unicode then it will be automagically set for you.

    As for your source code, that depends on what your source code is and how it is written. If you are using Genie then you need to send the unicode string using Write_StrU. If you are using Serial you need to write the string a character at a time using putCH (and thus have a subroutine in your code that writes the whole string a putCH at a time)

    Leave a comment:


  • Hobbex
    replied
    Originally posted by ESPsupport View Post
    The file that was there is, in many ways, outdated.

    Have a look at this app note and see if it can solve your problem http://www.4dsystems.com.au/appnote/4D-AN-00089/

    Thanx, but i'm beyond that point. I can manage to install a new Cyrillic font and use it serially.
    The problem is this:


    i'd like to copy&paste my russian text into the source-code (or read from a file), and display the russian letters on the display.

    Right now, when i write an ANSI "A", it gets translated to the russian "A" etc.

    ANSI A has an ASCII value of 65(DEC), while the russian A in the Unicode has the code 0x410 (1040DEC).

    Does this have to do with what font i'm using?
    In the Workshop/font-editor, theres a dropdownlist where i can choose Unicode or ANSI. Does this have to do with it?


    Example of a Russian text i'd like to use in my code, to print on the display. "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШ"

    Please advice...





    Leave a comment:


  • ESPsupport
    replied
    The file that was there is, in many ways, outdated.

    Have a look at this app note and see if it can solve your problem http://www.4dsystems.com.au/appnote/4D-AN-00089/

    Leave a comment:


  • Hobbex
    replied
    I'm struggeling with the exact same thing. I want to use Cyrillic font in Serial Mode.

    The link to the zip-file above is not working, could you please give me a new link? I'd like to see that demo-project to see if it answers my questions..

    Regards,
    H

    Leave a comment:


  • ESPsupport
    replied


    Not sure if you've seen this and/or used this



    http://www.4dsystems.com.au/downloads/Share/unicode%20font%20demo%2021022011.zip



    But that will enable everything you want, you might even like to put the entire unicode font on uSD and reference the cryllic characters directly.



    The 2.9 PmmC allows you to use putc to directly put unicode characters, without using the mapping.



    So have a try and see how you get on with it.

    Leave a comment:


  • Atys
    replied


    I'm using the 4DFont tool to fill the character generator of a PICASO card. It works fine.Now I have to change the characters to cyrillic. There are some desirable fonts in the Win TTF fonts, but the cyrillic chars appear only on the UNICODE part (0x409 and up).The 4DFont tool displays only the first 256 characters.Is there a tool or method to move the cyrillics to the 0-255 area? Or any way to get them into the 4DFont utility's input area ?
    Thanks,
    Csaba

    Leave a comment:

Working...
X