Debian Codegraph @

lib/common/textspan_lut.h

raw
1 /// \file
2 /// \brief lookup table for textspan
3 /// \ingroup common_render
4
5 #pragma once
6
7 #include <stdbool.h>
8
9 // LUT is short for lookup table.
10
11 /// \param text a single line of ASCII text which should contain no control
12 /// characters.
13 /// \return The estimated width of `text` in 1 point. A value is always
14 /// returned, falling back to Times-Roman metrics if there is no hard-coded
15 /// lookup table for the given `font_name`.
16 double estimate_text_width_1pt(const char *font_name, const char *text,
17 bool bold, bool italic);