mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 06:21:16 +01:00
Port the glyphy-demo to use the hb-gpu API. Builds as util/hb-gpu and requires GLEW, GLFW3, and OpenGL 3.3. Includes default text and embedded font for quick testing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
47 lines
781 B
C
47 lines
781 B
C
/*
|
|
* Copyright 2026 Behdad Esfahbod. All Rights Reserved.
|
|
*/
|
|
|
|
#ifndef DEMO_FONT_H
|
|
#define DEMO_FONT_H
|
|
|
|
#include "demo-common.h"
|
|
#include "demo-atlas.h"
|
|
|
|
typedef struct {
|
|
demo_extents_t extents;
|
|
double advance;
|
|
hb_bool_t is_empty;
|
|
unsigned int upem;
|
|
unsigned int atlas_offset;
|
|
} glyph_info_t;
|
|
|
|
|
|
typedef struct demo_font_t demo_font_t;
|
|
|
|
demo_font_t *
|
|
demo_font_create (hb_face_t *face,
|
|
demo_atlas_t *atlas);
|
|
|
|
void
|
|
demo_font_destroy (demo_font_t *font);
|
|
|
|
|
|
hb_face_t *
|
|
demo_font_get_face (demo_font_t *font);
|
|
|
|
hb_font_t *
|
|
demo_font_get_font (demo_font_t *font);
|
|
|
|
|
|
void
|
|
demo_font_lookup_glyph (demo_font_t *font,
|
|
unsigned int glyph_index,
|
|
glyph_info_t *glyph_info);
|
|
|
|
void
|
|
demo_font_print_stats (demo_font_t *font);
|
|
|
|
|
|
#endif /* DEMO_FONT_H */
|