Allen Webster 2017-11-21 13:25:31 -05:00
commit e15451976e
2 changed files with 7 additions and 8 deletions

View File

@ -514,6 +514,9 @@ Sys_Font_Path(name, parameters){
}
}
Partition *part = &shared_vars.font_scratch;
path.temp = begin_temp_memory(part);
b32 got_font = false;
if (pattern_styled != 0){
if (FcConfigSubstitute(fc_config, pattern_styled, FcMatchPattern)){
@ -526,8 +529,6 @@ Sys_Font_Path(name, parameters){
if (font != 0){
FcPatternGetString(font, FC_FILE, 0, &filename);
if (filename != 0){
Partition *part = &shared_vars.font_scratch;
path.temp = begin_temp_memory(part);
i32 len = str_size((char*)filename);
char *buffer = push_array(part, char, len + 1);
if (buffer == 0){
@ -563,8 +564,6 @@ Sys_Font_Path(name, parameters){
if (font != 0){
FcPatternGetString(font, FC_FILE, 0, &filename);
if (filename != 0){
Partition *part = &shared_vars.font_scratch;
path.temp = begin_temp_memory(part);
i32 len = str_size((char*)filename);
char *buffer = push_array(part, char, len + 1);
if (buffer == 0){

View File

@ -346,12 +346,12 @@ Sys_Font_Path(name, parameters){
}
OSX_Font_Match match = osx_get_font_match(name, pt_size, italic, bold);
Font_Path path = {0};
Partition *part = &shared_vars.font_scratch;
path.temp = begin_temp_memory(part);
if (match.path != 0){
Partition *part = &shared_vars.font_scratch;
path.temp = begin_temp_memory(part);
i32 len = str_size(match.path);
char *buffer = push_array(part, char, len + 1);
if (buffer == 0){