## FoLibfoContext

FoLibfoContext — Collected information about the processing context

## Synopsis

    enum                FoFlagsFormat;
    #define             FO_TYPE_FLAGS_FORMAT
    enum                FoEnumFontEmbed;
    GType               fo_enum_font_embed_get_type         (void);
    #define             FO_TYPE_ENUM_FONT_EMBED
                        FoLibfoContextClass;
    GType               fo_libfo_context_get_type           (void);
    gboolean            fo_libfo_context_get_continue_after_error
                                                            (FoLibfoContext *libfo_context);
    void                fo_libfo_context_set_continue_after_error
                                                            (FoLibfoContext *libfo_context,
                                                             gboolean continue_after_error);
    FoFlagsFormat       fo_libfo_context_get_format         (FoLibfoContext *libfo_context);
    void                fo_libfo_context_set_format         (FoLibfoContext *libfo_context,
                                                             FoFlagsFormat format);
    FoEnumFontEmbed     fo_libfo_context_get_font_embed     (FoLibfoContext *libfo_context);
    void                fo_libfo_context_set_font_embed     (FoLibfoContext *libfo_context,
                                                             FoEnumFontEmbed font_embed);
    gboolean            fo_libfo_context_get_validation     (FoLibfoContext *libfo_context);
    void                fo_libfo_context_set_validation     (FoLibfoContext *libfo_context,
                                                             gboolean validation);
    FoWarningFlag       fo_libfo_context_get_warning_mode   (FoLibfoContext *libfo_context);
    void                fo_libfo_context_set_warning_mode   (FoLibfoContext *libfo_context,
                                                             FoWarningFlag warning_mode);
    FoDebugFlag         fo_libfo_context_get_debug_mode     (FoLibfoContext *libfo_context);
    void                fo_libfo_context_set_debug_mode     (FoLibfoContext *libfo_context,
                                                             FoDebugFlag debug_mode);

## Description

Collected information about the processing context in which to do the formatting.

This context contains parameters that are not part of the XML for the FO, e.g., whether or not to validate the input and whether or not to embed fonts in the output.

## Details

### enum FoFlagsFormat

    typedef enum {
      FO_FLAG_FORMAT_UNKNOWN = 0,
      FO_FLAG_FORMAT_AUTO = 1 << 0,
      FO_FLAG_FORMAT_PDF = 1 << 1,
      FO_FLAG_FORMAT_POSTSCRIPT = 1 << 2,
      FO_FLAG_FORMAT_SVG = 1 << 3
    } FoFlagsFormat;

Output file format. Used both for specifying which format to use and to identify formats supported by a particular backend.

`FO_FLAG_FORMAT_UNKNOWN` | Invalid format
`FO_FLAG_FORMAT_AUTO` | Choose based on output file name or other heuristic
`FO_FLAG_FORMAT_PDF` | PDF
`FO_FLAG_FORMAT_POSTSCRIPT` | PostScript
`FO_FLAG_FORMAT_SVG` | SVG

### FO_TYPE_FLAGS_FORMAT

    #define FO_TYPE_FLAGS_FORMAT fo_flags_format_get_type ()

### enum FoEnumFontEmbed

    typedef enum {
      FO_ENUM_FONT_EMBED_INVALID,
      FO_ENUM_FONT_EMBED_ALL,
      FO_ENUM_FONT_EMBED_NONBASE,
      FO_ENUM_FONT_EMBED_NONE
    } FoEnumFontEmbed;

Which categories of fonts to embed in the output file, useful only where the output format and the backend both support control of embedding or not embedding those fonts.

`FO_ENUM_FONT_EMBED_INVALID` | Invalid category
`FO_ENUM_FONT_EMBED_ALL` | Embed all fonts
`FO_ENUM_FONT_EMBED_NONBASE` | Embed all fonts except the PostScript base fonts
`FO_ENUM_FONT_EMBED_NONE` | Do not embed any fonts

### fo_enum_font_embed_get_type ()

    GType               fo_enum_font_embed_get_type         (void);

Returns : |

### FO_TYPE_ENUM_FONT_EMBED

    #define FO_TYPE_ENUM_FONT_EMBED fo_enum_font_embed_get_type ()

### FoLibfoContextClass

    typedef struct _FoLibfoContextClass FoLibfoContextClass;

### fo_libfo_context_get_type ()

    GType               fo_libfo_context_get_type           (void);

Register the FoLibfoContext type if not already registered and return its GType value.

Returns : | GType of FoLibfoContext.

### fo_libfo_context_get_continue_after_error ()

    gboolean            fo_libfo_context_get_continue_after_error
                                                            (FoLibfoContext *libfo_context);

Get the 'continue' property of `libfo_context`.

`libfo_context` : | FoLibfoContext.
Returns : | Value of the 'continue' property of `libfo_context`.

### fo_libfo_context_set_continue_after_error ()

    void                fo_libfo_context_set_continue_after_error
                                                            (FoLibfoContext *libfo_context,
                                                             gboolean continue_after_error);

Set the 'continue' property of `libfo_context`.

`libfo_context` : | FoLibfoContext.
`continue_after_error` : | New 'continue' value for `libfo_context`.

### fo_libfo_context_get_format ()

    FoFlagsFormat       fo_libfo_context_get_format         (FoLibfoContext *libfo_context);

Get the 'format' property of `libfo_context`.

`libfo_context` : | FoLibfoContext.
Returns : | Value of the 'format' property of `libfo_context`.

### fo_libfo_context_set_format ()

    void                fo_libfo_context_set_format         (FoLibfoContext *libfo_context,
                                                             FoFlagsFormat format);

Set the 'format' property of `libfo_context`.

If more that one flag value is set in `format`, only the first (lowest) set value will be used.

`libfo_context` : | FoLibfoContext.
`format` : | New 'format' value for `libfo_context`.

### fo_libfo_context_get_font_embed ()

    FoEnumFontEmbed     fo_libfo_context_get_font_embed     (FoLibfoContext *libfo_context);

Get the 'font-embed' property of `libfo_context`.

`libfo_context` : | FoLibfoContext.
Returns : | Value of the 'font-embed' property of `libfo_context`.

### fo_libfo_context_set_font_embed ()

    void                fo_libfo_context_set_font_embed     (FoLibfoContext *libfo_context,
                                                             FoEnumFontEmbed font_embed);

Set the 'font-embed' property of `libfo_context`.

`libfo_context` : | FoLibfoContext.
`font_embed` : | New 'font-embed' value for `libfo_context`.

### fo_libfo_context_get_validation ()

    gboolean            fo_libfo_context_get_validation     (FoLibfoContext *libfo_context);

Get the 'validation' property of `libfo_context`.

`libfo_context` : | FoLibfoContext.
Returns : | Value of the 'validation' property of `libfo_context`.

### fo_libfo_context_set_validation ()

    void                fo_libfo_context_set_validation     (FoLibfoContext *libfo_context,
                                                             gboolean validation);

Set the 'validation' property of `libfo_context`.

`libfo_context` : | FoLibfoContext.
`validation` : | New 'validation' value for `libfo_context`.

### fo_libfo_context_get_warning_mode ()

    FoWarningFlag       fo_libfo_context_get_warning_mode   (FoLibfoContext *libfo_context);

Get the 'warning_mode' property of `libfo_context`.

`libfo_context` : | FoLibfoContext.
Returns : | Value of the 'warning_mode' property of `libfo_context`.

### fo_libfo_context_set_warning_mode ()

    void                fo_libfo_context_set_warning_mode   (FoLibfoContext *libfo_context,
                                                             FoWarningFlag warning_mode);

Set the 'warning-mode' property of `libfo_context`.

`libfo_context` : | FoLibfoContext.
`warning_mode` : | New 'warning-mode' value for `libfo_context`.

### fo_libfo_context_get_debug_mode ()

    FoDebugFlag         fo_libfo_context_get_debug_mode     (FoLibfoContext *libfo_context);

Get the 'debug_mode' property of `libfo_context`.

`libfo_context` : | FoLibfoContext.
Returns : | Value of the 'debug_mode' property of `libfo_context`.

### fo_libfo_context_set_debug_mode ()

    void                fo_libfo_context_set_debug_mode     (FoLibfoContext *libfo_context,
                                                             FoDebugFlag debug_mode);

Set the 'debug-mode' property of `libfo_context`.

`libfo_context` : | FoLibfoContext.
`debug_mode` : | New 'debug-mode' value for `libfo_context`.