summaryrefslogtreecommitdiff
path: root/src/text.h
blob: ec0b4fe1f6a464f3f22d9bf8eeeaf22421c751c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once

#include "freetype/freetype.h"

enum font_context_error_e {
  FONT_CONTEXT_ERROR_NONE,
  FONT_CONTEXT_ERROR_LIBRARY,
};

struct font_context_s {
  FT_Library library;
};

enum font_context_error_e wayc_font_context_init(struct font_context_s* ctx);
void wayc_font_context_deinit(struct font_context_s* ctx);

enum font_error_e {
  FONT_ERROR_NONE,
  FONT_ERROR_LOAD,
};

struct font_s {
  FT_Face face;
};

enum font_error_e wayc_font_init(struct font_s* font,
                                 struct font_context_s* ctx, const char* path);
void wayc_font_deinit(struct font_s* font);