Languages

Menu
Sites
Language
Can not use fonts in styles in edc files since last update of Gear S3 watch

Hi,

I can not use own fonts anymore in edc files in styles.
I only get a standard font. I worked before last update of the Gear S3 watch.

Code below used to work but does not any more.

fonts {
   font: "Segment14.ttf" "segment";
   font: "Gabriele.ttf" "Gabriele";
}

styles {   
    style {
        name: "battery_textblock_style";
        base: "font=segment align=right style=glow font_size="22" color=#BAFCFA glow_color=#1A8888";
   }
}

It works in the emulator but not on the watch.
Any idées on how to make it work again ?

I want to use the style for the font.

/Christian

Edited by: Christian Westlin on 07 Jun, 2019

Responses

5 Replies
Christian Westlin

Found a way around this problem:

Moved the font to folder:
<app>/res/fonts

Then added this before creation of the watchface:

 data_get_resource_path("fonts/", font_path, sizeof(font_path));
 evas_font_path_global_append(font_path);

/Christian

Paul L

Hi, doesnt work for me.

evas_font_path_global_append - is commented in Evas.h file.

I can uncomment and compaile the app but font is not changed.

Christian Westlin

Hi,

Ok, try to add this:

      base: "font=Sans:style=Regular font=Segment14 align=right style=glow font_size="22" color=#BAFCFA glow_color=#1A8888 text_class=battery_text_class";

I did forget to write that in the first comment but it should work without above but I need it also to make it work.

/Christian

Christian Westlin

Sorry it shall be like this:

base: "font=Sans:style=Regular font=segment align=right style=glow font_size="22" color=#BAFCFA glow_color=#1A8888 text_class=battery_text_class";

/Christian

Paul L

Hi, thank you for help. Doesnt work for me. 

font=Sans:style=Regular font=segment

you use 2x font argument, is it correct?