NetSurf
Functions | Variables
font.c File Reference
#include "amiga/os3support.h"
#include <proto/diskfont.h>
#include <proto/exec.h>
#include <proto/graphics.h>
#include "utils/log.h"
#include "utils/nsoption.h"
#include "netsurf/browser.h"
#include "netsurf/layout.h"
#include "amiga/font.h"
#include "amiga/font_bullet.h"
#include "amiga/font_diskfont.h"
#include "amiga/font_scan.h"
Include dependency graph for font.c:

Go to the source code of this file.

Functions

ULONG ami_font_dpi_get_devicedpi (void)
 
ULONG ami_font_dpi_get_xdpi (void)
 
void ami_font_setdevicedpi (int id)
 
struct TextFont * ami_font_open_disk_font (struct TextAttr *tattr)
 
void ami_font_close_disk_font (struct TextFont *tfont)
 
void ami_font_init (void)
 
void ami_font_fini (void)
 
static nserror ami_font_width (const plot_font_style_t *fstyle, const char *string, size_t length, int *width)
 
static nserror ami_font_position (const plot_font_style_t *fstyle, const char *string, size_t length, int x, size_t *char_offset, int *actual_x)
 
static nserror ami_font_split (const plot_font_style_t *fstyle, const char *string, size_t length, int x, size_t *char_offset, int *actual_x)
 

Variables

static ULONG ami_devicedpi = 72
 
static ULONG ami_xdpi = 72
 
static struct gui_layout_table layout_table
 
struct gui_layout_tableami_layout_table = &layout_table
 

Function Documentation

◆ ami_font_close_disk_font()

void ami_font_close_disk_font ( struct TextFont *  tfont)

Definition at line 107 of file font.c.

Referenced by ami_gui_splash_open().

Here is the caller graph for this function:

◆ ami_font_dpi_get_devicedpi()

ULONG ami_font_dpi_get_devicedpi ( void  )

Definition at line 38 of file font.c.

References ami_devicedpi, and ami_xdpi.

Referenced by ami_open_outline_font().

Here is the caller graph for this function:

◆ ami_font_dpi_get_xdpi()

ULONG ami_font_dpi_get_xdpi ( void  )

Definition at line 43 of file font.c.

References ami_xdpi.

◆ ami_font_fini()

void ami_font_fini ( void  )

Definition at line 122 of file font.c.

References ami_font_bullet_fini(), ami_font_diskfont_fini(), and nsoption_bool.

Referenced by ami_gui_opts_use(), and gui_quit().

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

◆ ami_font_init()

void ami_font_init ( void  )

Definition at line 113 of file font.c.

References ami_font_bullet_init(), ami_font_diskfont_init(), and nsoption_bool.

Referenced by ami_gui_opts_use(), and main().

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

◆ ami_font_open_disk_font()

struct TextFont * ami_font_open_disk_font ( struct TextAttr *  tattr)

Definition at line 101 of file font.c.

Referenced by ami_gui_splash_open().

Here is the caller graph for this function:

◆ ami_font_position()

static nserror ami_font_position ( const plot_font_style_t fstyle,
const char *  string,
size_t  length,
int  x,
size_t *  char_offset,
int *  actual_x 
)
static

Definition at line 140 of file font.c.

References ami_nsfont, and ami_font_functions::posn.

◆ ami_font_setdevicedpi()

void ami_font_setdevicedpi ( int  id)

Definition at line 48 of file font.c.

References ami_devicedpi, ami_xdpi, browser_set_dpi(), NSLOG, nsoption_bool, nsoption_int, and nsoption_set_int.

Referenced by ami_gui_opts_use(), ami_openscreen(), and main().

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

◆ ami_font_split()

static nserror ami_font_split ( const plot_font_style_t fstyle,
const char *  string,
size_t  length,
int  x,
size_t *  char_offset,
int *  actual_x 
)
static

Definition at line 148 of file font.c.

References ami_nsfont, and ami_font_functions::split.

◆ ami_font_width()

static nserror ami_font_width ( const plot_font_style_t fstyle,
const char *  string,
size_t  length,
int *  width 
)
static

Definition at line 132 of file font.c.

References ami_nsfont, ami_font_functions::width, and width.

Variable Documentation

◆ ami_devicedpi

ULONG ami_devicedpi = 72
static

Definition at line 35 of file font.c.

Referenced by ami_font_dpi_get_devicedpi(), and ami_font_setdevicedpi().

◆ ami_layout_table

struct gui_layout_table* ami_layout_table = &layout_table

Definition at line 162 of file font.c.

Referenced by ami_print(), and main().

◆ ami_xdpi

ULONG ami_xdpi = 72
static

Definition at line 36 of file font.c.

Referenced by ami_font_dpi_get_devicedpi(), ami_font_dpi_get_xdpi(), and ami_font_setdevicedpi().

◆ layout_table

struct gui_layout_table layout_table
static
Initial value:
= {
.width = ami_font_width,
.position = ami_font_position,
.split = ami_font_split,
}
static nserror ami_font_position(const plot_font_style_t *fstyle, const char *string, size_t length, int x, size_t *char_offset, int *actual_x)
Definition: font.c:140
static nserror ami_font_width(const plot_font_style_t *fstyle, const char *string, size_t length, int *width)
Definition: font.c:132
static nserror ami_font_split(const plot_font_style_t *fstyle, const char *string, size_t length, int x, size_t *char_offset, int *actual_x)
Definition: font.c:148

Definition at line 156 of file font.c.

Referenced by layout_flex_item().