diff --git a/selfdrive/assets/fonts/opensans_bold.ttf b/selfdrive/assets/fonts/opensans_bold.ttf index 7b5294560..e69de29bb 100644 Binary files a/selfdrive/assets/fonts/opensans_bold.ttf and b/selfdrive/assets/fonts/opensans_bold.ttf differ diff --git a/selfdrive/assets/fonts/opensans_regular.ttf b/selfdrive/assets/fonts/opensans_regular.ttf index 2e31d0242..e69de29bb 100644 Binary files a/selfdrive/assets/fonts/opensans_regular.ttf and b/selfdrive/assets/fonts/opensans_regular.ttf differ diff --git a/selfdrive/ui/ui.c b/selfdrive/ui/ui.c index 48c6cb6d2..3af051709 100644 --- a/selfdrive/ui/ui.c +++ b/selfdrive/ui/ui.c @@ -202,8 +202,6 @@ typedef struct UIState { int font_sans_regular; int font_sans_semibold; int font_sans_bold; - int font_miui_regular; - int font_miui_bold; int img_wheel; int img_turn; int img_face; @@ -530,16 +528,12 @@ static void ui_init(UIState *s) { s->font_courbd = nvgCreateFont(s->vg, "courbd", "../assets/fonts/courbd.ttf"); assert(s->font_courbd >= 0); - s->font_sans_regular = nvgCreateFont(s->vg, "sans-regular", "../assets/fonts/opensans_regular.ttf"); + s->font_sans_regular = nvgCreateFont(s->vg, "sans-regular", "../assets/fonts/NotoSansCJKtc-Regular.otf"); assert(s->font_sans_regular >= 0); s->font_sans_semibold = nvgCreateFont(s->vg, "sans-semibold", "../assets/fonts/opensans_semibold.ttf"); assert(s->font_sans_semibold >= 0); - s->font_sans_bold = nvgCreateFont(s->vg, "sans-bold", "../assets/fonts/opensans_bold.ttf"); + s->font_sans_bold = nvgCreateFont(s->vg, "sans-bold", "../assets/fonts/NotoSansCJKtc-Bold.otf"); assert(s->font_sans_bold >= 0); - s->font_miui_regular = nvgCreateFont(s->vg, "miui-regular", "../assets/fonts/NotoSansCJKtc-Regular.otf"); - assert(s->font_miui_regular >= 0); - s->font_miui_bold = nvgCreateFont(s->vg, "miui-bold", "../assets/fonts/NotoSansCJKtc-Bold.otf"); - assert(s->font_miui_bold >= 0); assert(s->img_wheel >= 0); s->img_wheel = nvgCreateImage(s->vg, "../assets/img_chffr_wheel.png", 1); @@ -1542,12 +1536,12 @@ static int bb_ui_draw_measure(UIState *s, const char* bb_value, const char* bb_ dx = (int)(bb_uomFontSize*2.5/2); } //print value - nvgFontFace(s->vg, "miui-bold"); + nvgFontFace(s->vg, "sans-bold"); nvgFontSize(s->vg, bb_valueFontSize*2.5); nvgFillColor(s->vg, bb_valueColor); nvgText(s->vg, bb_x-dx/2, bb_y+ (int)(bb_valueFontSize*2.5)+5, bb_value, NULL); //print label - nvgFontFace(s->vg, "miui-regular"); + nvgFontFace(s->vg, "sans-regular"); nvgFontSize(s->vg, bb_labelFontSize*2.5); nvgFillColor(s->vg, bb_labelColor); nvgText(s->vg, bb_x, bb_y + (int)(bb_valueFontSize*2.5)+5 + (int)(bb_labelFontSize*2.5)+5, bb_label, NULL); @@ -1558,7 +1552,7 @@ static int bb_ui_draw_measure(UIState *s, const char* bb_value, const char* bb_ int ry = bb_y + (int)(bb_valueFontSize*2.5/2)+25; nvgTranslate(s->vg,rx,ry); nvgRotate(s->vg, -1.5708); //-90deg in radians - nvgFontFace(s->vg, "miui-regular"); + nvgFontFace(s->vg, "sans-regular"); nvgFontSize(s->vg, (int)(bb_uomFontSize*2.5)); nvgFillColor(s->vg, bb_uomColor); nvgText(s->vg, 0, 0, bb_uom, NULL); @@ -1788,23 +1782,23 @@ static void ui_draw_vision_alert(UIState *s, int va_size, int va_color, nvgTextAlign(s->vg, NVG_ALIGN_CENTER | NVG_ALIGN_BASELINE); if (va_size == ALERTSIZE_SMALL) { - nvgFontFace(s->vg, "miui-bold"); + nvgFontFace(s->vg, "sans-bold"); nvgFontSize(s->vg, 40*2.5); nvgText(s->vg, alr_x+alr_w/2, alr_y+alr_h/2+15, va_text1, NULL); } else if (va_size== ALERTSIZE_MID) { - nvgFontFace(s->vg, "miui-bold"); + nvgFontFace(s->vg, "sans-bold"); nvgFontSize(s->vg, 48*2.5); nvgText(s->vg, alr_x+alr_w/2, alr_y+alr_h/2-45, va_text1, NULL); - nvgFontFace(s->vg, "miui-regular"); + nvgFontFace(s->vg, "sans-regular"); nvgFontSize(s->vg, 36*2.5); nvgText(s->vg, alr_x+alr_w/2, alr_y+alr_h/2+75, va_text2, NULL); } else if (va_size== ALERTSIZE_FULL) { nvgFontSize(s->vg, (longAlert1?72:96)*2.5); - nvgFontFace(s->vg, "miui-bold"); + nvgFontFace(s->vg, "sans-bold"); nvgTextAlign(s->vg, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE); nvgTextBox(s->vg, alr_x, alr_y+(longAlert1?360:420), alr_w-60, va_text1, NULL); nvgFontSize(s->vg, 48*2.5); - nvgFontFace(s->vg, "miui-regular"); + nvgFontFace(s->vg, "sans-regular"); nvgTextAlign(s->vg, NVG_ALIGN_CENTER | NVG_ALIGN_BOTTOM); nvgTextBox(s->vg, alr_x, alr_h-(longAlert1?300:360), alr_w-60, va_text2, NULL); }