Use Inter as the default editor font, features enabled
This commit is contained in:
@ -101,13 +101,13 @@ TEST_CASE("[FontFile] Create font file and check data") {
|
||||
ERR_PRINT_ON
|
||||
|
||||
// Load a valid file.
|
||||
CHECK(font_file->load_dynamic_font("thirdparty/fonts/NotoSans_Regular.woff2") == OK);
|
||||
CHECK(font_file->load_dynamic_font("thirdparty/fonts/Inter_Regular.woff2") == OK);
|
||||
|
||||
// Check fontfile data.
|
||||
CHECK_MESSAGE(font_file->get_data().is_empty() == false, "Fontfile should have been loaded.");
|
||||
CHECK_MESSAGE(font_file->get_font_name() == "Noto Sans", "Loaded correct font name.");
|
||||
CHECK_MESSAGE(font_file->get_font_name() == "Inter", "Loaded correct font name.");
|
||||
CHECK_MESSAGE(font_file->get_font_style_name() == "Regular", "Loaded correct font style.");
|
||||
CHECK_MESSAGE(font_file->get_data().size() == 148480llu, "Whole fontfile was loaded.");
|
||||
CHECK_MESSAGE(font_file->get_data().size() == 111268llu, "Whole fontfile was loaded.");
|
||||
|
||||
// Valid glyphs.
|
||||
CHECK_MESSAGE(font_file->get_glyph_index(2, 'a', 0) != 0, "Glyph index for 'a' is valid.");
|
||||
|
||||
@ -50,7 +50,7 @@ TEST_SUITE("[TextServer]") {
|
||||
}
|
||||
|
||||
RID font = ts->create_font();
|
||||
ts->font_set_data_ptr(font, _font_NotoSans_Regular, _font_NotoSans_Regular_size);
|
||||
ts->font_set_data_ptr(font, _font_Inter_Regular, _font_Inter_Regular_size);
|
||||
CHECK_FALSE_MESSAGE(font == RID(), "Loading font failed.");
|
||||
ts->free_rid(font);
|
||||
}
|
||||
@ -66,7 +66,7 @@ TEST_SUITE("[TextServer]") {
|
||||
}
|
||||
|
||||
RID font1 = ts->create_font();
|
||||
ts->font_set_data_ptr(font1, _font_NotoSans_Regular, _font_NotoSans_Regular_size);
|
||||
ts->font_set_data_ptr(font1, _font_Inter_Regular, _font_Inter_Regular_size);
|
||||
ts->font_set_allow_system_fallback(font1, false);
|
||||
RID font2 = ts->create_font();
|
||||
ts->font_set_data_ptr(font2, _font_NotoSansThai_Regular, _font_NotoSansThai_Regular_size);
|
||||
@ -118,7 +118,7 @@ TEST_SUITE("[TextServer]") {
|
||||
}
|
||||
|
||||
RID font1 = ts->create_font();
|
||||
ts->font_set_data_ptr(font1, _font_NotoSans_Regular, _font_NotoSans_Regular_size);
|
||||
ts->font_set_data_ptr(font1, _font_Inter_Regular, _font_Inter_Regular_size);
|
||||
RID font2 = ts->create_font();
|
||||
ts->font_set_data_ptr(font2, _font_Vazirmatn_Regular, _font_Vazirmatn_Regular_size);
|
||||
|
||||
@ -167,7 +167,7 @@ TEST_SUITE("[TextServer]") {
|
||||
}
|
||||
|
||||
RID font1 = ts->create_font();
|
||||
ts->font_set_data_ptr(font1, _font_NotoSans_Regular, _font_NotoSans_Regular_size);
|
||||
ts->font_set_data_ptr(font1, _font_Inter_Regular, _font_Inter_Regular_size);
|
||||
ts->font_set_allow_system_fallback(font1, false);
|
||||
RID font2 = ts->create_font();
|
||||
ts->font_set_data_ptr(font2, _font_NotoSansThai_Regular, _font_NotoSansThai_Regular_size);
|
||||
@ -565,7 +565,7 @@ TEST_SUITE("[TextServer]") {
|
||||
// 5^ 10^
|
||||
|
||||
RID font1 = ts->create_font();
|
||||
ts->font_set_data_ptr(font1, _font_NotoSans_Regular, _font_NotoSans_Regular_size);
|
||||
ts->font_set_data_ptr(font1, _font_Inter_Regular, _font_Inter_Regular_size);
|
||||
RID font2 = ts->create_font();
|
||||
ts->font_set_data_ptr(font2, _font_NotoSansThai_Regular, _font_NotoSansThai_Regular_size);
|
||||
|
||||
@ -620,7 +620,7 @@ TEST_SUITE("[TextServer]") {
|
||||
}
|
||||
|
||||
RID font1 = ts->create_font();
|
||||
ts->font_set_data_ptr(font1, _font_NotoSans_Regular, _font_NotoSans_Regular_size);
|
||||
ts->font_set_data_ptr(font1, _font_Inter_Regular, _font_Inter_Regular_size);
|
||||
RID font2 = ts->create_font();
|
||||
ts->font_set_data_ptr(font2, _font_Vazirmatn_Regular, _font_Vazirmatn_Regular_size);
|
||||
|
||||
@ -931,7 +931,7 @@ TEST_SUITE("[TextServer]") {
|
||||
}
|
||||
|
||||
RID font1 = ts->create_font();
|
||||
ts->font_set_data_ptr(font1, _font_NotoSans_Regular, _font_NotoSans_Regular_size);
|
||||
ts->font_set_data_ptr(font1, _font_Inter_Regular, _font_Inter_Regular_size);
|
||||
|
||||
Array font = { font1 };
|
||||
RID ctx = ts->create_shaped_text();
|
||||
|
||||
Reference in New Issue
Block a user