Graphviz 12.0.1~dev.20240715.2254
Loading...
Searching...
No Matches
textspan_lut.h File Reference

lookup table for textspan More...

#include <stdbool.h>
Include dependency graph for textspan_lut.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

double estimate_text_width_1pt (const char *font_name, const char *text, bool bold, bool italic)
 

Function Documentation

◆ estimate_text_width_1pt()

double estimate_text_width_1pt ( const char *  font_name,
const char *  text,
bool  bold,
bool  italic 
)
Parameters
texta single line of ASCII text which should contain no control characters.
Returns
The estimated width of text in 1 point. A value is always returned, falling back to Times-Roman metrics if there is no hard-coded lookup table for the given font_name.

Definition at line 830 of file textspan_lut.c.

References estimate_character_width_canonical(), FontFamilyMetrics::font_name, get_metrics_for_font_family(), get_metrics_for_font_variant(), and FontFamilyMetrics::units_per_em.

Referenced by estimate_textspan_size().

Here is the call graph for this function:
Here is the caller graph for this function: