mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-24 00:11:14 +01:00
Adjust coverage at small sizes to compensate for gamma washing out thin stems. Dark-on-light gets pow(cov, 0.7) to fatten, light-on-dark gets pow(cov, 1.4) to thin. Smoothly transitions to no effect above 48ppem. Applied before gamma correction so it works with sRGB, gamma 2.2, and none. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
47 lines
862 B
C
47 lines
862 B
C
/*
|
|
* Copyright 2026 Behdad Esfahbod. All Rights Reserved.
|
|
*/
|
|
|
|
#ifndef DEMO_GLSTATE_H
|
|
#define DEMO_GLSTATE_H
|
|
|
|
#include "demo-common.h"
|
|
#include "demo-buffer.h"
|
|
|
|
#include "demo-atlas.h"
|
|
#include "demo-shader.h"
|
|
|
|
typedef struct demo_glstate_t demo_glstate_t;
|
|
|
|
demo_glstate_t *
|
|
demo_glstate_create (void);
|
|
|
|
void
|
|
demo_glstate_destroy (demo_glstate_t *st);
|
|
|
|
|
|
void
|
|
demo_glstate_setup (demo_glstate_t *st);
|
|
|
|
demo_atlas_t *
|
|
demo_glstate_get_atlas (demo_glstate_t *st);
|
|
|
|
void
|
|
demo_glstate_set_matrix (demo_glstate_t *st, float mat[16]);
|
|
|
|
void
|
|
demo_glstate_set_gamma (demo_glstate_t *st, float gamma);
|
|
|
|
void
|
|
demo_glstate_set_foreground (demo_glstate_t *st,
|
|
float r, float g, float b, float a);
|
|
|
|
void
|
|
demo_glstate_set_debug (demo_glstate_t *st, bool enabled);
|
|
|
|
void
|
|
demo_glstate_set_stem_darkening (demo_glstate_t *st, bool enabled);
|
|
|
|
|
|
#endif /* DEMO_GLSTATE_H */
|