display of Cyrillics

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
vlad1451
Posts: 22
Joined: Sun Sep 07, 2014 6:02 am
Has thanked: 1 time
Been thanked: 1 time

display of Cyrillics

Post by vlad1451 »

Hello. prompt please, it is possible to change the FC5_AVR_gLCD component for display of Cyrillics? Or for this purpose there is other way? It is very necessary!

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: display of Cyrillics

Post by Benj »

Hello,

Yes I think the v5 gLCD component should have a setting as part of the EXT properties to allow you to create your own custom font. Note that custom fonts will not simulate in v5 but will in v6.
CostomFont.jpg
CostomFont.jpg (55.53 KiB) Viewed 8587 times
The font is a 5 x 8 pixel font starting from ASCII 32 " " through to ASCII 126 "~".

See here for the definition of the ASCII characters.

http://www.asciitable.com/

For each character you should be able to replace the Aplhanumeric character with a Cyrillics character.

The second entry is currently the "!" character so lets look at how the value is put together.
Character.jpg
Character.jpg (18.48 KiB) Viewed 8587 times
We go from left to right with bit 0 of each byte representing the top row and bit 7 representing the bottom row.

vlad1451
Posts: 22
Joined: Sun Sep 07, 2014 6:02 am
Has thanked: 1 time
Been thanked: 1 time

Re: display of Cyrillics

Post by vlad1451 »

Thanks of course for the link, but in this table isn't present Cyrillics. The matter is that I place codes of symbols of Cyrillics in an additional code, but the compiler Flowcode ignores input of symbols of table 128-255. As a result on the screen - garbage.
Attachments
font.JPG
font.JPG (101.97 KiB) Viewed 8583 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: display of Cyrillics

Post by Benj »

Hello,

In v6 it will be possible to add extra characters but in v5 there is a fixed font size so you probably have to overwrite existing characters for the code to work correctly. Do you need both English and Russian characters at the same time?

vlad1451
Posts: 22
Joined: Sun Sep 07, 2014 6:02 am
Has thanked: 1 time
Been thanked: 1 time

Re: display of Cyrillics

Post by vlad1451 »

Yes, I need both English and Russian symbols in one project.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: display of Cyrillics

Post by Benj »

Hello,
Yes, I need both English and Russian symbols in one project.
In that case how many Russian characters do you need? You could potentially add them in two different ways.

1) Override some of the unneeded parts of the English font data, by far the easiest method. For example you could use characters such as "!~^,.<>' ... and replace with Russian characters. If you only need Uppercase or Lowercase English characters then this would give you an additional 26 characters you can override as Russian.

2) Create your own character set external to the GLCD component and a macro routine to draw your own font a pixel at a time using the pixel functions of the gLCD. This is how the print routine inside the component works.

vlad1451
Posts: 22
Joined: Sun Sep 07, 2014 6:02 am
Has thanked: 1 time
Been thanked: 1 time

Re: display of Cyrillics

Post by vlad1451 »

The first option not absolutely approaches. It is inconvenient to type the necessary text, constantly it is necessary to have before itself the table of a ratio of special symbols and Cyrillics.
As for the second then I not absolutely understood what you meant.
As I understand, at a symbol conclusion, the program transfers this symbol to decimal system of measurement (0-256). But the program is made so that values more than 127 - are IGNORED! How to make that all tablisa of elements was perceived?

Post Reply