Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
textspan.c File Reference

textspan_size More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cdt/cdt.h>
#include <common/render.h>
#include <common/textspan_lut.h>
#include <util/alloc.h>
#include <util/strcasecmp.h>
#include "ps_font_equiv.h"
Include dependency graph for textspan.c:

Go to the source code of this file.

Functions

static void estimate_textspan_size (textspan_t *span, char **fontpath)
 
static int fontcmpf (const void *a, const void *b)
 
static PostscriptAliastranslate_postscript_fontname (char *fontname)
 
pointf textspan_size (GVC_t *gvc, textspan_t *span)
 Estimates size of a textspan, in points.
 
static void * textfont_makef (void *obj, Dtdisc_t *disc)
 
static void textfont_freef (void *obj)
 
static int textfont_comparf (void *key1, void *key2)
 
void textfont_dict_open (GVC_t *gvc)
 
void textfont_dict_close (GVC_t *gvc)
 

Variables

static PostscriptAlias postscript_alias []
 

Function Documentation

◆ estimate_textspan_size()

static void estimate_textspan_size ( textspan_t span,
char **  fontpath 
)
static

Definition at line 30 of file textspan.c.

References estimate_text_width_1pt(), flags, textfont_t::flags, textspan_t::font, textspan_t::free_layout, HTML_BF, HTML_IF, textspan_t::layout, LINESPACING, textfont_t::name, NULL, textfont_t::size, textspan_t::size, textspan_t::str, pointf_s::x, pointf_s::y, textspan_t::yoffset_centerline, and textspan_t::yoffset_layout.

Referenced by textspan_size().

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

◆ fontcmpf()

static int fontcmpf ( const void *  a,
const void *  b 
)
static

Definition at line 59 of file textspan.c.

Referenced by translate_postscript_fontname().

Here is the caller graph for this function:

◆ textfont_comparf()

static int textfont_comparf ( void *  key1,
void *  key2 
)
static

Definition at line 137 of file textspan.c.

References textfont_t::color, textfont_t::flags, textfont_t::name, and textfont_t::size.

Referenced by textfont_dict_open().

Here is the caller graph for this function:

◆ textfont_dict_close()

void textfont_dict_close ( GVC_t gvc)

Definition at line 165 of file textspan.c.

References dtclose(), gvc, and GVC_s::textfont_dt.

Referenced by gvFreeContext().

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

◆ textfont_dict_open()

void textfont_dict_open ( GVC_t gvc)

Definition at line 160 of file textspan.c.

References DTDISC, dtopen(), Dtoset, gvc, textfont_comparf(), GVC_s::textfont_disc, GVC_s::textfont_dt, textfont_freef(), and textfont_makef().

Referenced by gvconfig().

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

◆ textfont_freef()

static void textfont_freef ( void *  obj)
static

Definition at line 129 of file textspan.c.

References textfont_t::color, free(), and textfont_t::name.

Referenced by textfont_dict_open().

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

◆ textfont_makef()

static void * textfont_makef ( void *  obj,
Dtdisc_t disc 
)
static

Definition at line 111 of file textspan.c.

References textfont_t::color, disc, textfont_t::flags, gv_alloc(), gv_strdup(), textfont_t::name, textfont_t::postscript_alias, and textfont_t::size.

Referenced by textfont_dict_open().

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

◆ textspan_size()

pointf textspan_size ( GVC_t gvc,
textspan_t span 
)

Definition at line 79 of file textspan.c.

References emit_once(), estimate_textspan_size(), font, textspan_t::font, gvc, gvtextlayout(), NULL, textspan_t::size, translate_postscript_fontname(), and Verbose.

Referenced by size_html_txt(), storeline(), and xdotBB().

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

◆ translate_postscript_fontname()

static PostscriptAlias * translate_postscript_fontname ( char *  fontname)
static

Definition at line 64 of file textspan.c.

References fontcmpf(), free(), gv_strdup(), NULL, and postscript_alias.

Referenced by textspan_size().

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

Variable Documentation

◆ postscript_alias

PostscriptAlias postscript_alias[]
static
Initial value:
= {
}

Definition at line 55 of file textspan.c.

Referenced by translate_postscript_fontname().