aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeff Becker <ampernand@gmail.com>2017-01-13 07:51:54 -0500
committerJeff Becker <ampernand@gmail.com>2017-01-13 07:51:54 -0500
commit013faf3e50f80d162dff47f6efde274fcd123250 (patch)
tree9aa743dbf40150afab84a16aaba1269461eecc8b /src
parent6dce6ff7cb12ce5f6456d571b023aa5f81cfb437 (diff)
downloadwterm-013faf3e50f80d162dff47f6efde274fcd123250.zip
wterm-013faf3e50f80d162dff47f6efde274fcd123250.tar.gz
wterm-013faf3e50f80d162dff47f6efde274fcd123250.tar.bz2
more
Diffstat (limited to 'src')
-rw-r--r--src/st.c2
-rw-r--r--src/wld/font.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/st.c b/src/st.c
index 0014d21..0bccd10 100644
--- a/src/st.c
+++ b/src/st.c
@@ -2850,7 +2850,7 @@ tputc(Rune u)
void
tresize(int col, int row)
{
- int i;
+ int i;
int minrow = MIN(row, term.row);
int mincol = MIN(col, term.col);
int *bp;
diff --git a/src/wld/font.c b/src/wld/font.c
index a43c3e6..23992fc 100644
--- a/src/wld/font.c
+++ b/src/wld/font.c
@@ -35,6 +35,8 @@ struct wld_font_context * wld_font_create_context()
if (!context)
goto error0;
+ context->config = FcInitLoadConfigAndFonts();
+
if (FT_Init_FreeType(&context->library) != 0)
{
DEBUG("Failed to initialize FreeType library\n");
@@ -67,10 +69,10 @@ struct wld_font * wld_font_open_name(struct wld_font_context * context,
DEBUG("Opening font with name: %s\n", name);
pattern = FcNameParse((const FcChar8 *) name);
- FcConfigSubstitute(NULL, pattern, FcMatchPattern);
+ FcConfigSubstitute(context->config, pattern, FcMatchPattern);
FcDefaultSubstitute(pattern);
- match = FcFontMatch(NULL, pattern, &result);
+ match = FcFontMatch(context->config, pattern, &result);
if (!match)
return NULL;