gpforge
An advanced bitmap font editor
Loading...
Searching...
No Matches
embolden.h File Reference

Generates bold letters. More...

#include "font.h"

Go to the source code of this file.

Functions

int gpf_embolden (struct gpf_glyph *self, int cell_width)
 Emboldens a glyph.

Detailed Description

Generates bold letters.

Definition in file embolden.h.

Function Documentation

◆ gpf_embolden()

int gpf_embolden ( struct gpf_glyph * self,
int cell_width )

Emboldens a glyph.

Smears the ink one pixel right in place, every set pixel sets the pixel to its right. The ink box grows one pixel wider and the bearings and the advance do not change.

Parameters
selfA glyph to embolden.
cell_widthCell width for monospaced fonts. If non-zero and the wider ink box would not fit the cell, the box keeps its width and the smear out of it is dropped.
Returns
Non-zero if the allocation failed, zero otherwise.

Definition at line 10 of file embolden.c.

References gpf_glyph::bearing_x, gpf_glyph::bits, gpf_glyph::height, and gpf_glyph::width.