gtk/gsk/gskprivate.h
Matthias Clasen 0127217e10 gsk: Add a way to get a (un)hinted font
Add a function to change the cairo font options of a font to
to the given values while keeping everything else the same.

We use pango api for this if available.

Note that this is not a fully general api, but tailored to the
needs of GSK. We don't allow setting hint-metrics (because it
only influences layout, not rendering) or subpixel-mode (since
we don't have component alpha available).
2024-03-02 18:39:14 -05:00

20 lines
445 B
C

#pragma once
#include <glib.h>
#include <pango/pango.h>
#include <cairo.h>
G_BEGIN_DECLS
void gsk_ensure_resources (void);
PangoFont *gsk_get_scaled_font (PangoFont *font,
float scale);
PangoFont *gsk_get_hinted_font (PangoFont *font,
cairo_hint_style_t hint_style,
cairo_antialias_t antialias);
G_END_DECLS