NetSurf
Data Structures | Typedefs | Functions
fontplot.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  s_font_driver_table_entry
 
struct  s_font_plotter
 

Typedefs

typedef struct s_font_plotterFONT_PLOTTER
 
typedef int(* _fpmf_str_width) (FONT_PLOTTER self, const plot_font_style_t *fstyle, const char *str, size_t length, int *width)
 
typedef int(* _fpmf_str_split) (FONT_PLOTTER self, const plot_font_style_t *fstyle, const char *string, size_t length, int x, size_t *char_offset, int *actual_x)
 
typedef int(* _fpmf_pixel_pos) (FONT_PLOTTER self, const plot_font_style_t *fstyle, const char *string, size_t length, int x, size_t *char_offset, int *actual_x)
 
typedef int(* _fpmf_text) (FONT_PLOTTER self, int x, int y, const char *text, size_t length, const plot_font_style_t *fstyle)
 
typedef void(* _fpmf_draw_glyph) (FONT_PLOTTER self, GRECT *clip, GRECT *loc, uint8_t *pixdata, int pitch, uint32_t colour)
 
typedef int(* _fpmf_dtor) (FONT_PLOTTER self)
 

Functions

FONT_PLOTTER plot_get_text_plotter (void)
 
void plot_set_text_plotter (FONT_PLOTTER font_plotter)
 
void dump_font_drivers (void)
 
FONT_PLOTTER new_font_plotter (int vdihandle, char *name, unsigned long flags, int *error)
 Create an new text plotter object. More...
 
int delete_font_plotter (FONT_PLOTTER p)
 

Typedef Documentation

◆ _fpmf_draw_glyph

typedef void(* _fpmf_draw_glyph) (FONT_PLOTTER self, GRECT *clip, GRECT *loc, uint8_t *pixdata, int pitch, uint32_t colour)

Definition at line 43 of file fontplot.h.

◆ _fpmf_dtor

typedef int(* _fpmf_dtor) (FONT_PLOTTER self)

Definition at line 45 of file fontplot.h.

◆ _fpmf_pixel_pos

typedef int(* _fpmf_pixel_pos) (FONT_PLOTTER self, const plot_font_style_t *fstyle, const char *string, size_t length, int x, size_t *char_offset, int *actual_x)

Definition at line 37 of file fontplot.h.

◆ _fpmf_str_split

typedef int(* _fpmf_str_split) (FONT_PLOTTER self, const plot_font_style_t *fstyle, const char *string, size_t length, int x, size_t *char_offset, int *actual_x)

Definition at line 34 of file fontplot.h.

◆ _fpmf_str_width

typedef int(* _fpmf_str_width) (FONT_PLOTTER self, const plot_font_style_t *fstyle, const char *str, size_t length, int *width)

Definition at line 32 of file fontplot.h.

◆ _fpmf_text

typedef int(* _fpmf_text) (FONT_PLOTTER self, int x, int y, const char *text, size_t length, const plot_font_style_t *fstyle)

Definition at line 40 of file fontplot.h.

◆ FONT_PLOTTER

typedef struct s_font_plotter* FONT_PLOTTER

Definition at line 22 of file fontplot.h.

Function Documentation

◆ delete_font_plotter()

int delete_font_plotter ( FONT_PLOTTER  p)

Definition at line 121 of file fontplot.c.

References s_font_plotter::dtor.

Referenced by plot_finalise().

Here is the caller graph for this function:

◆ dump_font_drivers()

void dump_font_drivers ( void  )

Definition at line 44 of file fontplot.c.

References s_font_driver_table_entry::flags, font_driver_table, and s_font_driver_table_entry::name.

Referenced by plot_init().

Here is the caller graph for this function:

◆ new_font_plotter()

FONT_PLOTTER new_font_plotter ( int  vdihandle,
char *  name,
unsigned long  flags,
int *  error 
)

Create an new text plotter object.

Available: "vdi", "freetype", "internal"

Parameters
vdihandlethe vdi handle to act upon,
nameselector ID (string) of the font plotter.
flagsconfigration flags of the plotter, available flags: FONTPLOT_FLAG_MONOGLYPH - Enable 1 bit font plotting
errorset to != 0 when errors occur
Returns
the new font plotter instance on success, or NULL on failure.

Definition at line 67 of file fontplot.c.

References s_font_driver_table_entry::ctor, ERR_NO_MEM, ERR_PLOTTER_NOT_AVAILABLE, s_font_driver_table_entry::flags, s_font_plotter::flags, font_driver_table, fplotter, s_font_driver_table_entry::name, s_font_plotter::name, s_font_plotter::vdi_handle, and vdihandle.

Referenced by plot_init().

Here is the caller graph for this function:

◆ plot_get_text_plotter()

FONT_PLOTTER plot_get_text_plotter ( void  )

Definition at line 1953 of file plot.c.

References fplotter.

◆ plot_set_text_plotter()

void plot_set_text_plotter ( FONT_PLOTTER  font_plotter)

Definition at line 1959 of file plot.c.

References fplotter.