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

The gfxprim C font export. More...

#include <stdio.h>
#include "font.h"

Go to the source code of this file.

Functions

int gpf_export_c (struct gpf_font *font, const char *font_id, const char *name, FILE *f, char *err, size_t err_len)
 Exports the font into a C source.

Detailed Description

The gfxprim C font export.

Writes the font as a compiled-in gfxprim font.

Definition in file format_c.h.

Function Documentation

◆ gpf_export_c()

int gpf_export_c ( struct gpf_font * font,
const char * font_id,
const char * name,
FILE * f,
char * err,
size_t err_len )

Exports the font into a C source.

Writes the C font to f. font_id names the C symbols and the faces, name is the family name gfxprim looks fonts up by — "haxor_narrow_18" and "haxor-narrow-18". Returns zero on success.

Parameters
fontA font.
font_idA font id, the suffix of the C symbols and the face names.
nameA font family name as stored in the C structure.
fA file to write the font into.
errA buffer to write an error into.
err_lenA length of the err buffer.
Returns
Zero on success, non-zero otherwise.

Definition at line 538 of file format_c.c.

References gpf_font::authors, gpf_author::email, GPF_MONO, GPF_VARIANTS, gpf_family_meta::license, gpf_font::meta, gpf_author::name, gpf_font::variants, and gpf_author::years.