extend font provider backend with ability to independently toggle hinting & full anti-aliasing; fix up ui text measurement/placement; introduce per-window settings for adjusting font rendering parameters

This commit is contained in:
Ryan Fleury
2024-06-28 15:31:27 -07:00
parent b0259b7a49
commit 38090b6273
22 changed files with 903 additions and 614 deletions
+2 -2
View File
@@ -577,7 +577,7 @@ DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(text)
}
code_slice_params.font = df_font_from_slot(DF_FontSlot_Code);
code_slice_params.font_size = ui_top_font_size();
code_slice_params.tab_size = f_column_size_from_tag_size(code_slice_params.font, code_slice_params.font_size)*df_setting_val_from_code(DF_SettingCode_TabWidth).s32;
code_slice_params.tab_size = f_column_size_from_tag_size(code_slice_params.font, code_slice_params.font_size)*df_setting_val_from_code(ws, DF_SettingCode_TabWidth).s32;
code_slice_params.line_height_px = ui_top_font_size()*1.5f;
code_slice_params.priority_margin_width_px = 0;
code_slice_params.catchall_margin_width_px = 0;
@@ -740,7 +740,7 @@ DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(disasm)
}
code_slice_params.font = df_font_from_slot(DF_FontSlot_Code);
code_slice_params.font_size = ui_top_font_size();
code_slice_params.tab_size = f_column_size_from_tag_size(code_slice_params.font, code_slice_params.font_size)*df_setting_val_from_code(DF_SettingCode_TabWidth).s32;
code_slice_params.tab_size = f_column_size_from_tag_size(code_slice_params.font, code_slice_params.font_size)*df_setting_val_from_code(ws, DF_SettingCode_TabWidth).s32;
code_slice_params.line_height_px = ui_top_font_size()*1.5f;
code_slice_params.priority_margin_width_px = 0;
code_slice_params.catchall_margin_width_px = 0;