master ohmu/fastfetch-openbsd / src / common / font.h
ohmu  ·  2026-10-15
 1#pragma once
 2
 3#include "common/FFstrbuf.h"
 4#include "common/FFlist.h"
 5
 6typedef struct FFfont {
 7    FFstrbuf pretty;
 8    FFstrbuf name;
 9    FFstrbuf size;
10    FFlist styles;
11} FFfont;
12
13void ffFontInit(FFfont* font);
14void ffFontInitQt(FFfont* font, const char* data);
15void ffFontInitPango(FFfont* font, const char* data);
16void ffFontInitValues(FFfont* font, const char* name, const char* size);
17void ffFontInitXlfd(FFfont* font, const char* xlfd);
18void ffFontInitXft(FFfont* font, const char* xft);
19void ffFontInitMoveValues(FFfont* font, FFstrbuf* name, FFstrbuf* size, FFstrbuf* style);
20void ffFontInitWithSpace(FFfont* font, const char* rawName);
21void ffFontDestroy(FFfont* font);
22
23static inline void ffFontInitCopy(FFfont* font, const char* name) {
24    ffFontInitValues(font, name, nullptr);
25}