Visual TFT Cyrillic

General discussion on Visual TFT Software.
Author
Message
RomanT
Posts: 185
Joined: 15 Aug 2012 04:37
Location: Russia, Perm
Contact:

Re: Visual TFT Cyrillic

#16 Post by RomanT » 17 Jun 2013 16:56

Обрати внимание у него свой шрифт, и печатает на лат. раскладке,
так что вполне возможно и на TFT он будет кирилическим...
Ты лучше попроси у него этот шрифт :lol:
HW: µM Plus for STM32, µM for ATMEGA, µM for XMEGA, MINI-AT, µProgSTM32, ConnectEVE.
SW: mikroC AVR, ARM, VisualTFT.
Clicks: WiFi+, GSM, GSM2, Bluetooth, ADC, DAC, RTC, IrThermo,
FM, OSD, GPS-L10, GYRO, Altitude, Compass, nRF C, USB adapter, SpeakUp.

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: Visual TFT Cyrillic

#17 Post by janko.kaljevic » 18 Jun 2013 15:34

Hello,

As said in my previous post:
Font which have Cyrillic or any other letters in first 255 characters, will work with our tools.
Their font table will be generated and they will be displayed on the screen.

Best regards.

KAZi
Posts: 19
Joined: 04 Feb 2013 16:20
Location: RUSSIA

Re: Visual TFT Cyrillic

#18 Post by KAZi » 06 Jul 2013 15:33

janko.kaljevic wrote:Hello,

As said in my previous post:
Font which have Cyrillic or any other letters in first 255 characters, will work with our tools.
Their font table will be generated and they will be displayed on the screen.

Best regards.
Пездеть не мешки таскать...
Нихуя не работает..Сама прога пишет кирилицу.. А когда скомпилишь и всунешь в медиа,..то там полная хэйня...
Да там хоть 12555555 включай..на экране ЖКИ один хрен будет билеперда!!

KAZi
Posts: 19
Joined: 04 Feb 2013 16:20
Location: RUSSIA

Re: Visual TFT Cyrillic

#19 Post by KAZi » 15 Aug 2013 13:36

In general, you are going to deal with the problem with the Cyrillic ?
A lot of time has passed , and nothing has been done !

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: Visual TFT Cyrillic

#20 Post by janko.kaljevic » 16 Aug 2013 09:59

Hello,

We have in plan to provide support for unicode, but I really can not make any promises regarding release dates.

At the moment only way to implement other language scripts is as described in previous posts.
Also here you can find attached project with simple example and used font.

Best regards.
Attachments
DSC00686.JPG
DSC00686.JPG (40.11 KiB) Viewed 9351 times
cyrillic.rar
(55.13 KiB) Downloaded 401 times

KAZi
Posts: 19
Joined: 04 Feb 2013 16:20
Location: RUSSIA

Re: Visual TFT Cyrillic

#21 Post by KAZi » 24 Aug 2013 11:51

I'll wait for the release.
I do not want to be a monkey , which adapts to the weird font !
I need to work , as well as other work is not paying attention to the font of the country !

aCkO
Posts: 1119
Joined: 14 Feb 2011 04:07
Location: Bar, Montenegro

Re: Visual TFT Cyrillic

#22 Post by aCkO » 27 Aug 2013 06:45

RomanT wrote:Это только мы с тобой понимаем, что это на самом деле кидалово, а для них это нормальный бизнес-продукт ...
Самое смешное, что в Сербии по идее тоже кириллица, но походу как их посетили америкосы, так они забыли свой язык ...
I assure you that we have not forgotten our language, nor have we forgotten Cyrillic alphabet.

What you all seem to forget is that non-Unicode programs stayed in use long after Unicode was adopted as a standard. The purpose of Unicode is to provide multilingual processing, but there is another way that predates Unicode by more than 15 years.

When ASCII was created by the Americans, it defined mapping of characters from 0 to 127 (7-bit coding scheme) which were most frequently used in English. One bit was left for the rest of the world so that other countries could implement their own writing systems through extensions called "Code Pages". Even DOS had this implemented. One of the popular code pages that covers Cyrillic alphabet for Russian, Serbian, Bulgarian and Macedonian is Windows-1251 (http://en.wikipedia.org/wiki/Windows-1251).

In Windows, changing default system code page (system locale) can be done through Control Panel:

Code: Select all

1. Region and Language -> Administrative -> Language for non-Unicode programs -> Change system locale
2. Select Russian
3. Reboot PC
Now open Visual TFT, place some controls and edit their captions:
VTFT_Cyrillic.png
VTFT_Cyrillic.png (77.95 KiB) Viewed 9288 times
You can also use Cyrillic script in your compiler's IDE:
mC_Cyrillic.png
mC_Cyrillic.png (15.76 KiB) Viewed 9288 times
The only problem remaining is that Visual TFT, i.e. GLCDFontCreatorDLL.dll generates code for characters based on the Unicode character table with 255 as the max char code. Open up Windows Character Map utility and you will see that Cyrillic letters are way out of byte range (0-255). Luckily, there is a free tool called GLCD Font Creator that allows you to import system fonts and choose wider range of characters. Unfortunately, this range must be contiguous and you cannot remap characters to match different code pages.

With the help of Microchip AN1182 which describes the font format used by Visual TFT, I created a simple application that does exactly that. It parses the code generated by GLCD Font Creator and generates the Windows-1251 compliant code. I didn't want to spend too much time on it so the code page is implemented partially (letters A-я or characters 192-255) which should be enough. The application practically uses a big font table (more than 1000 chars) generated by GLCD Font Creator (chars 32-1103), maps the Cyrillic letters in 192-255 range and recalculates offsets for the glyphs.

Here's the end result for the above example:
Cyrillic.jpg
Cyrillic.jpg (182.83 KiB) Viewed 9288 times

aCkO
Posts: 1119
Joined: 14 Feb 2011 04:07
Location: Bar, Montenegro

Re: Visual TFT Cyrillic

#23 Post by aCkO » 27 Aug 2013 06:59

You will find the application in the attachment.

Instructions:

1. Open GLCD Font Creator
2. File -> New Font -> Import An Exististing System Font
GLCD_Font_Creator_01.png
GLCD_Font_Creator_01.png (21.98 KiB) Viewed 9288 times
3. Specify characters in range 32-1103. If you choose to optimize imported font be warned that this could take a while for 1000 characters
GLCD_Font_Creator_02.png
GLCD_Font_Creator_02.png (55.44 KiB) Viewed 9288 times
4. In the toolbar click "Export for TFT and new GLCD (new library)"
5. Paste the generated code (all compilers supported) into the application from attachment
cpFontTool.png
cpFontTool.png (42.04 KiB) Viewed 9288 times
6. Copy generated Windows-1251 compliant code and replace the font resources in the source file

Keep in mind that I wrote this app in about an hour, so I didn't have time to properly code a full blown parser or exception handling. As long as you copy the generated code and stick to these instructions you probably won't get any run-time errors. The application is attached in the next post because of the 3-file attachment limit.
Last edited by aCkO on 27 Aug 2013 07:06, edited 2 times in total.

aCkO
Posts: 1119
Joined: 14 Feb 2011 04:07
Location: Bar, Montenegro

Re: Visual TFT Cyrillic

#24 Post by aCkO » 27 Aug 2013 07:01

Regards
Attachments
cpFontTool.zip
(12.45 KiB) Downloaded 557 times

aCkO
Posts: 1119
Joined: 14 Feb 2011 04:07
Location: Bar, Montenegro

Re: Visual TFT Cyrillic

#25 Post by aCkO » 02 Sep 2013 03:13

Check this topic for an updated version: http://www.mikroe.com/forum/viewtopic.php?f=160&t=56146

Regards

zetikh
Posts: 1
Joined: 02 Feb 2021 18:49

Re: Visual TFT Cyrillic

#26 Post by zetikh » 02 Feb 2021 19:03

Hello everyone, and thanks for your advaces (especially aCko!).

But we still have one question: how could we do a text with smoothing on FT800?
With the help of discussed topics above we can only write angular textes, so we want to make it a little bit more buitiful :D

Post Reply

Return to “Visual TFT General”