GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions
gp_text_style.h File Reference

A text style. More...

#include <text/gp_font.h>

Go to the source code of this file.

Data Structures

struct  gp_text_style
 A text style. More...
 

Macros

#define GP_DEFAULT_TEXT_STYLE
 A default text style initializer.
 

Typedefs

typedef struct gp_text_style gp_text_style
 A text style.
 

Functions

static void gp_text_style_normal (gp_text_style *style, const gp_font_face *font, int mul)
 Sets normal text style flags.
 
static void gp_text_style_embold (gp_text_style *style, const gp_font_face *font, int mul)
 Sets style flags to embold a font.
 

Detailed Description

A text style.

Definition in file gp_text_style.h.

Typedef Documentation

◆ gp_text_style

typedef struct gp_text_style gp_text_style

A text style.

This structure describes how a text should be rendered. It includes a font, and a few transformations.

Default font

Default font xspace=1, yspace=2, xmul=2, ymul=2

Default font xspace=-1, yspace=-1, xmul=2, ymul=2 (embolding)

Function Documentation

◆ gp_text_style_embold()

static void gp_text_style_embold ( gp_text_style style,
const gp_font_face font,
int  mul 
)
inlinestatic

Sets style flags to embold a font.

Creates a bold variant of a bitmap font on the expense of slower rendering.

Parameters
styleA text style to intialize.
fontA font face to use in the style.
mulA text style pixel multiplier.

Definition at line 108 of file gp_text_style.h.

References gp_text_style::font, gp_text_style::pixel_xmul, gp_text_style::pixel_xspace, gp_text_style::pixel_ymul, and gp_text_style::pixel_yspace.

◆ gp_text_style_normal()

static void gp_text_style_normal ( gp_text_style style,
const gp_font_face font,
int  mul 
)
inlinestatic

Sets normal text style flags.

Parameters
styleA text style to intialize.
fontA font face to use in the style.
mulA text style pixel multiplier.

Definition at line 90 of file gp_text_style.h.

References gp_text_style::font, gp_text_style::pixel_xmul, gp_text_style::pixel_xspace, gp_text_style::pixel_ymul, and gp_text_style::pixel_yspace.