2017-03-10 20:44:42 +00:00
|
|
|
/*
|
|
|
|
* Mr. 4th Dimention - Allen Webster
|
|
|
|
*
|
|
|
|
* ??.??.2016
|
|
|
|
*
|
|
|
|
* For getting the font files on Linux.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
// TOP
|
|
|
|
|
|
|
|
// TODO(allen): Get system fonts
|
2016-06-20 20:34:48 +00:00
|
|
|
|
|
|
|
internal b32
|
2017-02-12 06:01:01 +00:00
|
|
|
win32_ft_font_load(Partition *part, Render_Font *rf, char *name, i32 pt_size, i32 tab_width, b32 use_hinting){
|
2016-06-21 14:00:07 +00:00
|
|
|
Temp_Memory temp = begin_temp_memory(part);
|
|
|
|
char* filename = push_array(part, char, 256);
|
2017-03-10 20:44:42 +00:00
|
|
|
b32 result = false;
|
2016-06-21 18:13:28 +00:00
|
|
|
if (filename != 0){
|
2016-08-28 04:31:06 +00:00
|
|
|
String str = make_string_cap(filename, 0, 256);
|
2016-06-21 18:13:28 +00:00
|
|
|
sysshared_to_binary_path(&str, name);
|
2016-07-03 22:29:07 +00:00
|
|
|
result = font_load_freetype(part, rf, filename, pt_size, tab_width, use_hinting);
|
2016-06-20 20:34:48 +00:00
|
|
|
}
|
2016-06-21 14:00:07 +00:00
|
|
|
end_temp_memory(temp);
|
2016-06-21 18:13:28 +00:00
|
|
|
return(result);
|
2016-06-20 20:34:48 +00:00
|
|
|
}
|
2016-06-21 18:13:28 +00:00
|
|
|
|
2017-03-10 20:44:42 +00:00
|
|
|
// BOTTOM
|
2016-06-21 18:13:28 +00:00
|
|
|
|