## Font Properties

Font Properties — Fontconfig property configuration

## Functions

FontManagerFontProperties * | font_manager_font_properties_new ()
gboolean | font_manager_font_properties_load ()
gboolean | font_manager_font_properties_save ()
gboolean | font_manager_font_properties_discard ()
gchar * | font_manager_font_properties_get_filepath ()
void | font_manager_font_properties_reset ()

## Properties

gboolean | antialias | Read / Write
gboolean | autohint | Read / Write
char * | config-dir | Read / Write
double | dpi | Read / Write
gboolean | embeddedbitmap | Read / Write
gboolean | hinting | Read / Write
int | hintstyle | Read / Write
int | lcdfilter | Read / Write
double | less | Read / Write
double | more | Read / Write
int | rgba | Read / Write
double | scale | Read / Write
char * | target-file | Read / Write
int | type | Read / Write

## Types and Values

#define | FONT_MANAGER_TYPE_FONT_PROPERTIES
struct | FontManagerFontPropertiesClass
enum | FontManagerFontPropertiesType
#define | FONT_MANAGER_TYPE_PROPERTIES_TYPE
| FontManagerFontProperties

## Object Hierarchy

        GEnum
        ╰── FontManagerFontPropertiesType
        GObject
        ╰── FontManagerFontProperties

## Includes

    #include <font-manager-font-properties.h>

## Description

Base class for generating fontconfig configuration files which modify font properties.

## Functions

### font_manager_font_properties_new ()

    FontManagerFontProperties *
    font_manager_font_properties_new (void);

#### Returns

A newly created FontManagerFontProperties Free the returned object using ``g_object_unref()``.

[transfer full]

### font_manager_font_properties_load ()

    gboolean
    font_manager_font_properties_load (FontManagerFontProperties *self);

#### Parameters

self | FontManagerFontProperties |

#### Returns

`TRUE` if current configuration file was successfully loaded

### font_manager_font_properties_save ()

    gboolean
    font_manager_font_properties_save (FontManagerFontProperties *self);

#### Parameters

self | FontManagerFontProperties |

#### Returns

`TRUE` if current configuration was successfully saved to file

### font_manager_font_properties_discard ()

    gboolean
    font_manager_font_properties_discard (FontManagerFontProperties *self);

#### Parameters

self | FontManagerFontProperties |

#### Returns

`TRUE` if current configuration was successfully discarded

### font_manager_font_properties_get_filepath ()

    gchar *
    font_manager_font_properties_get_filepath
                                   (FontManagerFontProperties *self);

#### Parameters

self | FontManagerFontProperties |

#### Returns

a newly allocated string containing the full filepath to current configuration file or `NULL`. Free the result using ``g_free()``.

[transfer full][nullable]

### font_manager_font_properties_reset ()

    void
    font_manager_font_properties_reset (FontManagerFontProperties *self);

Reset all base properties to their default values

#### Parameters

self | FontManagerFontProperties |

## Types and Values

### FONT_MANAGER_TYPE_FONT_PROPERTIES

    #define FONT_MANAGER_TYPE_FONT_PROPERTIES (font_manager_font_properties_get_type())

### struct FontManagerFontPropertiesClass

    struct FontManagerFontPropertiesClass {
        GObjectClass parent_class;

        gboolean (* load) (FontManagerFontProperties *self);
        gboolean (* save) (FontManagerFontProperties *self);

        void (* parse_test_node) (FontManagerFontProperties *self, xmlNode *test_node);
        void (* parse_edit_node) (FontManagerFontProperties *self, xmlNode *edit_node);
        void (* add_match_criteria) (FontManagerFontProperties *self, FontManagerXmlWriter *writer);
    };

#### Members

`load` () | load configuration from file |
`save` () | save configuration to file |
`parse_test_node` () | parse a fontconfig test node |
`parse_edit_node` () | parse a fontconfig edit node |
`add_match_criteria` () | add additional test elements |

### enum FontManagerFontPropertiesType

#### Members

FONT_MANAGER_FONT_PROPERTIES_TYPE_DEFAULT | Fontconfig font properties |
FONT_MANAGER_FONT_PROPERTIES_TYPE_DISPLAY | Fontconfig display properties |

### FONT_MANAGER_TYPE_PROPERTIES_TYPE

    #define FONT_MANAGER_TYPE_PROPERTIES_TYPE (font_manager_font_properties_type_get_type ())

### FontManagerFontProperties

    typedef struct _FontManagerFontProperties FontManagerFontProperties;

## Property Details

### The `“antialias”` property

      “antialias”                gboolean

Whether to use anti-aliasing or not.

Owner: FontManagerFontProperties

Flags: Read / Write

Default value: FALSE

### The `“autohint”` property

      “autohint”                 gboolean

Whether to use autohinting or not.

Owner: FontManagerFontProperties

Flags: Read / Write

Default value: FALSE

### The `“config-dir”` property

      “config-dir”               char *

Fontconfig configuration directory.

Owner: FontManagerFontProperties

Flags: Read / Write

Default value: NULL

### The `“dpi”` property

      “dpi”                      double

Screen DPI.

Owner: FontManagerFontProperties

Flags: Read / Write

Allowed values: >= 0

Default value: 96

### The `“embeddedbitmap”` property

      “embeddedbitmap”           gboolean

Whether to use embedded bitmaps or not.

Owner: FontManagerFontProperties

Flags: Read / Write

Default value: FALSE

### The `“hinting”` property

      “hinting”                  gboolean

Whether to use hinting or not.

Owner: FontManagerFontProperties

Flags: Read / Write

Default value: FALSE

### The `“hintstyle”` property

      “hintstyle”                int

Fontconfig hintstyle.

Owner: FontManagerFontProperties

Flags: Read / Write

Allowed values: [0,5]

Default value: 0

### The `“lcdfilter”` property

      “lcdfilter”                int

Fontconfig LCD filter.

Owner: FontManagerFontProperties

Flags: Read / Write

Allowed values: [0,3]

Default value: 0

### The `“less”` property

      “less”                     double

Lower size limit.

Owner: FontManagerFontProperties

Flags: Read / Write

Allowed values: >= 0

Default value: 0

### The `“more”` property

      “more”                     double

Upper size limit.

Owner: FontManagerFontProperties

Flags: Read / Write

Allowed values: >= 0

Default value: 0

### The `“rgba”` property

      “rgba”                     int

Fontconfig RGBA.

Owner: FontManagerFontProperties

Flags: Read / Write

Allowed values: [0,5]

Default value: 0

### The `“scale”` property

      “scale”                    double

Scale factor.

Owner: FontManagerFontProperties

Flags: Read / Write

Allowed values: >= 0

Default value: 1

### The `“target-file”` property

      “target-file”              char *

Name of fontconfig configuration file.

Owner: FontManagerFontProperties

Flags: Read / Write

Default value: NULL

### The `“type”` property

      “type”                     int

FontManagerFontPropertiesType.

Owner: FontManagerFontProperties

Flags: Read / Write

Allowed values: [0,1]

Default value: 0