NetSurf
Functions | Variables
font.h File Reference

RISC OS font interface. More...

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

Go to the source code of this file.

Functions

void nsfont_init (void)
 Initialize font handling. More...
 
bool nsfont_exists (const char *font_family)
 Check if a font family is available. More...
 
const char * nsfont_fallback_font (void)
 Retrieve the fallback font name. More...
 
bool nsfont_paint (const struct plot_font_style *fstyle, const char *string, size_t length, int x, int y)
 
void nsfont_read_style (const struct plot_font_style *fstyle, const char **font_family, unsigned int *font_size, rufl_style *font_style)
 
void ro_gui_wimp_get_desktop_font (void)
 Retrieve the current desktop font family, size and style from the WindowManager in a form suitable for passing to rufl. More...
 

Variables

struct gui_layout_tableriscos_layout_table
 
char ro_gui_desktop_font_family []
 desktop font, size and style being used More...
 
int ro_gui_desktop_font_size
 
rufl_style ro_gui_desktop_font_style
 

Detailed Description

RISC OS font interface.

Definition in file font.h.

Function Documentation

◆ nsfont_exists()

bool nsfont_exists ( const char *  font_family)

Check if a font family is available.

Parameters
font_familyname of font family
Returns
true if the family is available

Definition at line 199 of file font.c.

References nsfont_list_cmp().

Referenced by nsfont_check_option(), nsfont_fallback_font(), and ro_gui_options_fonts_default().

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

◆ nsfont_fallback_font()

const char * nsfont_fallback_font ( void  )

Retrieve the fallback font name.

Returns
Fallback font name

Definition at line 165 of file font.c.

References nsfont_exists(), and NSLOG.

Referenced by nsfont_init(), and ro_gui_options_fonts_default().

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

◆ nsfont_init()

void nsfont_init ( void  )

Initialize font handling.

Exits through die() on error.

Definition at line 116 of file font.c.

References die(), nsfont_check_fonts(), nsfont_check_option(), nsfont_fallback_font(), NSLOG, nsoption_charp, nsoption_int, nsoption_set_int, PLOT_FONT_FAMILY_CURSIVE, PLOT_FONT_FAMILY_FANTASY, PLOT_FONT_FAMILY_MONOSPACE, PLOT_FONT_FAMILY_SANS_SERIF, and PLOT_FONT_FAMILY_SERIF.

Referenced by gui_init().

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

◆ nsfont_paint()

bool nsfont_paint ( const struct plot_font_style fstyle,
const char *  string,
size_t  length,
int  x,
int  y 
)

◆ nsfont_read_style()

void nsfont_read_style ( const struct plot_font_style fstyle,
const char **  font_family,
unsigned int *  font_size,
rufl_style *  font_style 
)

◆ ro_gui_wimp_get_desktop_font()

void ro_gui_wimp_get_desktop_font ( void  )

Retrieve the current desktop font family, size and style from the WindowManager in a form suitable for passing to rufl.

Definition at line 607 of file font.c.

References ro_gui_desktop_font_family, ro_gui_desktop_font_size, ro_gui_desktop_font_style, and ro_gui_wimp_desktop_font().

Referenced by gui_init(), and ro_gui_user_message().

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

Variable Documentation

◆ riscos_layout_table

struct gui_layout_table* riscos_layout_table
extern

Definition at line 622 of file font.c.

Referenced by main().

◆ ro_gui_desktop_font_family

char ro_gui_desktop_font_family[]
extern

desktop font, size and style being used

Definition at line 45 of file font.c.

Referenced by ro_gui_status_bar_redraw(), and ro_gui_wimp_get_desktop_font().

◆ ro_gui_desktop_font_size

int ro_gui_desktop_font_size
extern

Definition at line 46 of file font.c.

Referenced by ro_gui_status_bar_redraw(), and ro_gui_wimp_get_desktop_font().

◆ ro_gui_desktop_font_style

rufl_style ro_gui_desktop_font_style
extern

Definition at line 47 of file font.c.

Referenced by ro_gui_status_bar_redraw(), and ro_gui_wimp_get_desktop_font().