From 013faf3e50f80d162dff47f6efde274fcd123250 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Fri, 13 Jan 2017 07:51:54 -0500 Subject: more --- Makefile | 25 ++++++++++++++++++++++--- README.md | 8 ++++++-- config.def.h | 2 +- contrib/logo/wterm.svg | 6 +++--- include/wld/wld-private.h | 11 ++++------- include/wld/wld.h | 1 + src/st.c | 2 +- src/wld/font.c | 6 ++++-- 8 files changed, 42 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index 249625f..eaf7fbe 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,8 @@ SOURCES += $(WAYLAND_SRC) OBJECTS = $(SOURCES:.c=.o) +BIN_PREFIX = $(PREFIX) +SHARE_PREFIX = $(PREFIX) all: wterm @@ -52,7 +54,24 @@ wterm: $(OBJECTS) clean: rm -f $(OBJECTS) $(HDRS) $(WAYLAND_SRC) include/config.h -install: wterm +install-icons: + mkdir -p $(SHARE_PREFIX)/share/icons/hicolor/scalable/apps/ + cp contrib/logo/wterm.svg $(SHARE_PREFIX)/share/icons/hicolor/scalable/apps/wterm.svg + mkdir -p $(SHARE_PREFIX)/share/icons/hicolor/128x128/apps/ + cp contrib/logo/wterm.png $(SHARE_PREFIX)/share/icons/hicolor/128x128/apps/wterm.png + +install-bin: wterm tic -s wterm.info - mkdir -p $(PREFIX)/bin/ - cp wterm $(PREFIX)/bin/ + mkdir -p $(BIN_PREFIX)/bin/ + cp wterm $(BIN_PREFIX)/bin/ + +install: install-bin install-icons + +uninstall-icons: + rm -f $(SHARE_PREFIX)/share/icons/hicolor/128x128/apps/wterm.png + rm -f $(sHARE_PREFIX)/share/icons/hicolor/scalable/apps/wterm.svg + +uninstall-bin: + rm -f $(BIN_PREFIX)/bin/wterm + +uninstall: uninstall-bin uninstall-icons diff --git a/README.md b/README.md index 66bc9c4..4e6b76e 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,13 @@ originally made by suckless. * pixman * libdrm -## Install +## build - make clean install + make + +## install + + sudo make install See the man page for additional details. diff --git a/config.def.h b/config.def.h index 8c6f41c..b55e34c 100644 --- a/config.def.h +++ b/config.def.h @@ -5,7 +5,7 @@ * * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html */ -static char font[] = "Liberation Mono:pixelsize=12:antialias=false:autohint=false"; +static char font[] = "Ubuntu Mono:pixelsize=14:antialias=true:hinting=true:hintstyle=hintfull"; static int borderpx = 2; /* diff --git a/contrib/logo/wterm.svg b/contrib/logo/wterm.svg index 8387c4d..a9359ac 100644 --- a/contrib/logo/wterm.svg +++ b/contrib/logo/wterm.svg @@ -9,14 +9,14 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - height="512" - width="512" + height="64" + width="64" id="svg3164" version="1.1" inkscape:version="0.91 r13725" viewBox="0 0 64 64" sodipodi:docname="wterm.svg" - inkscape:export-filename="/home/jeff/git/wterm/wterm-logo.svg.png" + inkscape:export-filename="/home/jeff/git/wterm/contrib/logo/wterm.png" inkscape:export-xdpi="180" inkscape:export-ydpi="180"> #include #include +#include #define WLD_USER_ID (0xff << 24) 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; -- cgit v1.1