aboutsummaryrefslogtreecommitdiff
path: root/font.c
diff options
context:
space:
mode:
authorRiley Beckett <rbeckettvt@gmail.com>2025-10-20 00:34:14 -0400
committerRiley Beckett <rbeckettvt@gmail.com>2025-10-20 00:34:14 -0400
commite5ca1d93d52b2a5cfe99f5f2197e2b215fe694fe (patch)
tree7589f5c9a0057e7b3877252f8d6dfef8c46fdd6c /font.c
parent5ce5fd4f047ba3a0531ffbfd9797f2406a9b5ceb (diff)
maybe this works
Diffstat (limited to 'font.c')
-rw-r--r--font.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/font.c b/font.c
index c67e427..9d9fc6d 100644
--- a/font.c
+++ b/font.c
@@ -3,6 +3,7 @@
#include "font.h"
#include "array.h"
#include "config.h"
+#include <freetype/ftmodapi.h>
const float ATLAS_PADDING = 3.0f;
@@ -56,6 +57,9 @@ bool freetype_init(client_state* state, const char* file) {
fprintf(stderr, "Failed to intalize FreeType Library\n");
return false;
}
+ FT_Bool no_stem_darkening = true;
+ FT_Property_Set(state->ft_library, "cff",
+ "no-stem-darkening", &no_stem_darkening );
if (FT_New_Face(state->ft_library, file, 0, &state->ft_face)) {
fprintf(stderr, "Failed to create font\n");
return false;
@@ -64,7 +68,7 @@ bool freetype_init(client_state* state, const char* file) {
fprintf(stderr, "Failed to set font size\n");
return false;
}
- state->load_flags = FT_LOAD_RENDER;
+ state->load_flags = FT_LOAD_RENDER | FT_LOAD_TARGET_NORMAL;
state->line_height = state->ft_face->size->metrics.height >> 6;
state->horizontal_spacing = state->line_height / 2.0f;