Georgian Script

Hello,

I am not able to read messages sent in Georgian script (en.wikipedia.org/.../Georgian_scripts) on my Fenix 5. Is there any way to fix this? 

  • This should just be a matter of creating a custom font with the glyphs in it and then creating UTF8 strings with the correct encoded values.

  • Seems to work just fine for me.


    import Toybox.Application;
    import Toybox.Graphics;
    import Toybox.Lang;
    import Toybox.WatchUi;
    
    class AnalogView extends WatchUi.View {
    
        hidden var _cx;
        hidden var _cy;
        hidden var _font;
        hidden var _font_height;
        hidden var _justification;
        
        function initialize() {
            View.initialize();
        }
    
        function onLayout(dc as Dc) {
            _cx = dc.getWidth() / 2;
            _cy = dc.getHeight() / 2;
            _font = WatchUi.loadResource(Rez.Fonts.Asomtavruli);
            _justification = Graphics.TEXT_JUSTIFY_CENTER | Graphics.TEXT_JUSTIFY_CENTER;
            
            _font_height = dc.getFontHeight(_font);
        }
        
        function onUpdate(dc as Dc) {
            dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_BLACK);
            dc.clear();
            
            var lines = [
                "ႠႡႢႣႤႥႦჁ",
                "ႧႨႩႪႫႬჂႭ",
                "ႮႯႰႱႲჃႭჃ",
                "ႳႴႵႶႷႸႹႺ",
                "ႻႼႽႾჄႿჀჅ",
            ];
            
            var y = _cy - (lines.size() * _font_height) / 2;
            
            for (var i = 0; i < lines.size(); ++i) {
                dc.drawText(_cx, y, _font, lines[i], _justification);
                y += _font_height;
            }
        }
    }
    
    class AnalogWatch extends Application.AppBase {
    
        public function initialize() {
            AppBase.initialize();
        }
    
        public function getInitialView() {
            return [ new AnalogView() ];
        }
    }
    

  • Dear Travis,

    Thank you very much for reply. The only problem I don't have idea how to do all of this :)) Do you mind to give me step by step instruction? Or am I asking too much. Have a nice day!

  • The thing here is he's using a custom font (named Asomtavruli).  Generally people use bmfont to create one and include the characters needed.  See the 'Fonts" section here: https://developer.garmin.com/connect-iq/core-topics/resources/

    You should find more about using custom fonts by just searching in this forum. Up top where you see the magnifying glass and "search" type in custom font.

  • The Analog sample app included with the SDK (look in C:\Users\<username>\AppData\Roaming\Garmin\ConnectIQ\Sdks\<sdk>\samples) uses a custom font file.

    You just need to find a TTF font file that has the Georgian glyphs in it (I just did a google search for Asomtavruli font) and then use the BMFont tool to generate a .fnt and .png file. This is covered in the Fonts section of the documentation here:

    https://developer.garmin.com/connect-iq/core-topics/resources/

    Once you have that, you can update the Analog sample to use your font.

  • Dear Travis,

    Thank you very much for your detailed answer. Now I understand how to install new font. But I have a following question: I don't want to change interface language (English). With installing the Georgian font, will I be able to keep English interface and use Georgian font only for seeing notifications (FB Messenger, SMS) which are in Georgian language?

    Best regards,

    David

  • What you seeing here is using a custom font for a specific CIQ app.  It doesn't install a new font on the watch itself, so if you are set to English, all other things (except this app) will be in English.  So it won't change how notifications work.  Changing the firmware font can't be done in CIQ.

  • გამარჯობა დავით, 

    პირველ რიგში მინდა გითხრა რომ გამეხარდა რომ მარტო მე არ მინდა ქართული ენის ნახვა გარმინზე :D 
    ჰოდა მაინტერესებს თუ მოახეტხე საბოლოო ჯამში ქართულის ჩაწერა? თუ კი, იქნებ მეც დამეხმარო? 
    ტრევისის ჩაგდებულ ლინკზე გადავედი მარა ბევრი ვერაფერი გავიგე, პროგრამირება ჩემი ძლიერი მხარე არაა...

    მოკითხვები
    ვაჟა

    Hi David, 
    If you've managed to add Georgian to your watch, can you help me out with the same, please?
    Regards, 
    Vazha