mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-23 05:33:57 -04:00
Merge branch 'fcft-0.2.0'
This commit is contained in:
commit
f15a2af0b8
8 changed files with 27 additions and 30 deletions
4
PKGBUILD
4
PKGBUILD
|
|
@ -4,8 +4,8 @@ pkgrel=1
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
url=https://codeberg.org/dnkl/foot
|
url=https://codeberg.org/dnkl/foot
|
||||||
license=(mit)
|
license=(mit)
|
||||||
makedepends=('meson' 'ninja' 'scdoc' 'python' 'ncurses')
|
makedepends=('meson' 'ninja' 'scdoc' 'python' 'ncurses' 'tllist>=1.0.0')
|
||||||
depends=('libxkbcommon' 'wayland' 'pixman' 'tllist>=1.0.0' 'fcft>=0.1.0')
|
depends=('libxkbcommon' 'wayland' 'pixman' 'fcft>=0.2.0')
|
||||||
source=()
|
source=()
|
||||||
|
|
||||||
pkgver() {
|
pkgver() {
|
||||||
|
|
|
||||||
23
main.c
23
main.c
|
|
@ -63,21 +63,18 @@ term_shutdown_cb(void *data, int exit_code)
|
||||||
static bool
|
static bool
|
||||||
initialize_fonts(const struct config *conf, struct font *fonts[4])
|
initialize_fonts(const struct config *conf, struct font *fonts[4])
|
||||||
{
|
{
|
||||||
font_list_t font_names = tll_init();
|
const size_t count = tll_length(conf->fonts);
|
||||||
|
const char *names[count];
|
||||||
|
|
||||||
|
size_t i = 0;
|
||||||
tll_foreach(conf->fonts, it)
|
tll_foreach(conf->fonts, it)
|
||||||
tll_push_back(font_names, it->item);
|
names[i++] = it->item;
|
||||||
|
|
||||||
if ((fonts[0] = font_from_name(font_names, "dpi=96")) == NULL ||
|
return (
|
||||||
(fonts[1] = font_from_name(font_names, "dpi=96:weight=bold")) == NULL ||
|
(fonts[0] = font_from_name(names, count, "dpi=96")) != NULL &&
|
||||||
(fonts[2] = font_from_name(font_names, "dpi=96:slant=italic")) == NULL ||
|
(fonts[1] = font_from_name(names, count, "dpi=96:weight=bold")) != NULL &&
|
||||||
(fonts[3] = font_from_name(font_names, "dpi=96:weight=bold:slant=italic")) == NULL)
|
(fonts[2] = font_from_name(names, count, "dpi=96:slant=italic")) != NULL &&
|
||||||
{
|
(fonts[3] = font_from_name(names, count, "dpi=96:weight=bold:slant=italic")) != NULL);
|
||||||
tll_free(font_names);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
tll_free(font_names);
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ wayland_cursor = dependency('wayland-cursor')
|
||||||
xkb = dependency('xkbcommon')
|
xkb = dependency('xkbcommon')
|
||||||
|
|
||||||
tllist = dependency('tllist', version: '>=1.0.0', fallback: ['tllist', 'tllist'])
|
tllist = dependency('tllist', version: '>=1.0.0', fallback: ['tllist', 'tllist'])
|
||||||
fcft = dependency('fcft', version: ['>=0.1.0', '<0.2.0'], fallback: ['fcft', 'fcft'])
|
fcft = dependency('fcft', version: ['>=0.2.0', '<0.3.0'], fallback: ['fcft', 'fcft'])
|
||||||
|
|
||||||
wayland_protocols_datadir = wayland_protocols.get_pkgconfig_variable('pkgdatadir')
|
wayland_protocols_datadir = wayland_protocols.get_pkgconfig_variable('pkgdatadir')
|
||||||
|
|
||||||
|
|
|
||||||
1
search.c
1
search.c
|
|
@ -1,5 +1,6 @@
|
||||||
#include "search.h"
|
#include "search.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#include <wctype.h>
|
#include <wctype.h>
|
||||||
|
|
||||||
|
|
|
||||||
1
server.c
1
server.c
|
|
@ -1,5 +1,6 @@
|
||||||
#include "server.h"
|
#include "server.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 97ded50d8f14e1fd55aac1f2ff1b46bc56c6fd8b
|
Subproject commit e4352f2c4c6b301b42c15e13ef34f1d734598ce7
|
||||||
23
terminal.c
23
terminal.c
|
|
@ -368,21 +368,18 @@ initialize_render_workers(struct terminal *term)
|
||||||
static bool
|
static bool
|
||||||
initialize_fonts(struct terminal *term, const struct config *conf)
|
initialize_fonts(struct terminal *term, const struct config *conf)
|
||||||
{
|
{
|
||||||
font_list_t font_names = tll_init();
|
const size_t count = tll_length(conf->fonts);
|
||||||
|
const char *names[count];
|
||||||
|
|
||||||
|
size_t i = 0;
|
||||||
tll_foreach(conf->fonts, it)
|
tll_foreach(conf->fonts, it)
|
||||||
tll_push_back(font_names, it->item);
|
names[i++] = it->item;
|
||||||
|
|
||||||
if ((term->fonts[0] = font_from_name(font_names, "dpi=96")) == NULL ||
|
return (
|
||||||
(term->fonts[1] = font_from_name(font_names, "dpi=96:weight=bold")) == NULL ||
|
(term->fonts[0] = font_from_name(names, count, "dpi=96")) != NULL &&
|
||||||
(term->fonts[2] = font_from_name(font_names, "dpi=96:slant=italic")) == NULL ||
|
(term->fonts[1] = font_from_name(names, count, "dpi=96:weight=bold")) != NULL &&
|
||||||
(term->fonts[3] = font_from_name(font_names, "dpi=96:weight=bold:slant=italic")) == NULL)
|
(term->fonts[2] = font_from_name(names, count, "dpi=96:slant=italic")) != NULL &&
|
||||||
{
|
(term->fonts[3] = font_from_name(names, count, "dpi=96:weight=bold:slant=italic")) != NULL);
|
||||||
tll_free(font_names);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
tll_free(font_names);
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct terminal *
|
struct terminal *
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#include "wayland.h"
|
#include "wayland.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue