|
Libcroco
|
Various type declarations about font selection related properties. More...
Go to the source code of this file.
Data Structures | |
| struct | _CRFontFamily |
| struct | _CRFontSize |
| struct | _CRFontSizeAdjust |
Typedefs | |
| typedef struct _CRFontFamily | CRFontFamily |
| typedef struct _CRFontSize | CRFontSize |
| typedef struct _CRFontSizeAdjust | CRFontSizeAdjust |
Functions | |
| CRFontFamily * | cr_font_family_new (enum CRFontFamilyType a_type, guchar *a_name) |
| cr_font_family_new: @a_type: the type of font family to create. More... | |
| CRFontFamily * | cr_font_family_append (CRFontFamily *a_this, CRFontFamily *a_family_to_append) |
| cr_font_family_append: @a_this: the current instance of CRFontFamily. More... | |
| guchar * | cr_font_family_to_string (CRFontFamily const *a_this, gboolean a_walk_font_family_list) |
| cr_font_family_to_string: @a_this: the current instance of CRFontFamily. More... | |
| CRFontFamily * | cr_font_family_prepend (CRFontFamily *a_this, CRFontFamily *a_family_to_prepend) |
| cr_font_family_prepend: @a_this: the current instance CRFontFamily. More... | |
| enum CRStatus | cr_font_family_destroy (CRFontFamily *a_this) |
| cr_font_family_destroy: @a_this: the current instance of CRFontFamily. More... | |
| enum CRStatus | cr_font_family_set_name (CRFontFamily *a_this, guchar *a_name) |
| cr_font_family_set_name: @a_this: the current instance of CRFontFamily. More... | |
| CRFontSize * | cr_font_size_new (void) |
| cr_font_size_new: More... | |
| enum CRStatus | cr_font_size_clear (CRFontSize *a_this) |
| cr_font_size_clear: @a_this: the current instance of CRFontSize More... | |
| enum CRStatus | cr_font_size_copy (CRFontSize *a_dst, CRFontSize const *a_src) |
| cr_font_size_copy: @a_dst: the destination CRFontSize (where to copy to). More... | |
| enum CRStatus | cr_font_size_set_predefined_absolute_font_size (CRFontSize *a_this, enum CRPredefinedAbsoluteFontSize a_predefined) |
| cr_font_size_set_predefined_absolute_font_size: @a_this: the current instance of CRFontSize. More... | |
| enum CRStatus | cr_font_size_set_relative_font_size (CRFontSize *a_this, enum CRRelativeFontSize a_relative) |
| cr_font_size_set_relative_font_size: @a_this: the current instance of CRFontSize @a_relative: the new relative font size More... | |
| enum CRStatus | cr_font_size_set_absolute_font_size (CRFontSize *a_this, enum CRNumType a_num_type, gdouble a_value) |
| cr_font_size_set_absolute_font_size: @a_this: the current instance of CRFontSize @a_num_type: the type of number to set. More... | |
| enum CRStatus | cr_font_size_set_to_inherit (CRFontSize *a_this) |
| cr_font_size_set_to_inherit: @a_this: the current instance of CRFontSize More... | |
| gboolean | cr_font_size_is_set_to_inherit (CRFontSize const *a_this) |
| cr_font_size_is_set_to_inherit: @a_this: the current instance of CRFontSize. More... | |
| gchar * | cr_font_size_to_string (CRFontSize const *a_this) |
| cr_font_size_to_string: @a_this: the current instance of CRFontSize More... | |
| void | cr_font_size_destroy (CRFontSize *a_font_size) |
| cr_font_size_destroy: @a_font_size: the font size to destroy More... | |
| CRFontSizeAdjust * | cr_font_size_adjust_new (void) |
| cr_font_size_adjust_new: More... | |
| gchar * | cr_font_size_adjust_to_string (CRFontSizeAdjust const *a_this) |
| cr_font_size_adjust_to_string: @a_this: the instance of CRFontSizeAdjust. More... | |
| void | cr_font_size_adjust_destroy (CRFontSizeAdjust *a_this) |
| cr_font_size_adjust_destroy: @a_this: the current instance of CRFontSizeAdjust. More... | |
| void | cr_font_size_get_smaller_predefined_font_size (enum CRPredefinedAbsoluteFontSize a_font_size, enum CRPredefinedAbsoluteFontSize *a_smaller_size) |
| cr_font_size_get_smaller_predefined: @a_font_size: the font size to consider. More... | |
| void | cr_font_size_get_larger_predefined_font_size (enum CRPredefinedAbsoluteFontSize a_font_size, enum CRPredefinedAbsoluteFontSize *a_larger_size) |
| cr_font_size_get_larger_predefined_font_size: @a_font_size: the font size to consider. More... | |
| gboolean | cr_font_size_is_predefined_absolute_font_size (enum CRPredefinedAbsoluteFontSize a_font_size) |
| cr_font_size_is_predefined_absolute_font_size: @a_font_size: the font size to consider. More... | |
| const gchar * | cr_font_style_to_string (enum CRFontStyle a_code) |
| cr_font_style_to_string: @a_code: the current instance of CRFontStyle . More... | |
| const gchar * | cr_font_weight_to_string (enum CRFontWeight a_code) |
| cr_font_weight_to_string: @a_code: the font weight to consider. More... | |
| enum CRFontWeight | cr_font_weight_get_bolder (enum CRFontWeight a_weight) |
| cr_font_weight_get_bolder: @a_weight: the CRFontWeight to consider. More... | |
| const gchar * | cr_font_variant_to_string (enum CRFontVariant a_code) |
| cr_font_variant_to_string: @a_code: the current instance of CRFontVariant. More... | |
| const gchar * | cr_font_stretch_to_string (enum CRFontStretch a_code) |
| cr_font_stretch_to_string: @a_code: the instance of CRFontStretch to consider. More... | |
Various type declarations about font selection related properties.
Definition in file cr-fonts.h.
| typedef struct _CRFontFamily CRFontFamily |
Definition at line 37 of file cr-fonts.h.
| typedef struct _CRFontSize CRFontSize |
Definition at line 37 of file cr-fonts.h.
| typedef struct _CRFontSizeAdjust CRFontSizeAdjust |
Definition at line 37 of file cr-fonts.h.
| enum CRFontFamilyType |
| Enumerator | |
|---|---|
| FONT_FAMILY_SANS_SERIF | |
| FONT_FAMILY_SERIF | |
| FONT_FAMILY_CURSIVE | |
| FONT_FAMILY_FANTASY | |
| FONT_FAMILY_MONOSPACE | |
| FONT_FAMILY_NON_GENERIC | |
| FONT_FAMILY_INHERIT | |
| NB_FONT_FAMILIE_TYPES | |
Definition at line 40 of file cr-fonts.h.
| enum CRFontSizeAdjustType |
| Enumerator | |
|---|---|
| FONT_SIZE_ADJUST_NONE | |
| FONT_SIZE_ADJUST_NUMBER | |
| FONT_SIZE_ADJUST_INHERIT | |
Definition at line 164 of file cr-fonts.h.
| enum CRFontSizeType |
The type of font-size property.
Used to define the type of CRFontSize . See css2 spec chapter 15.2.4 to understand.
| Enumerator | |
|---|---|
| PREDEFINED_ABSOLUTE_FONT_SIZE | If the type of CRFontSize is PREDEFINED_ABSOLUTE_FONT_SIZE, the CRFontSize::value.predefined_absolute field will be defined. |
| ABSOLUTE_FONT_SIZE | If the type of CRFontSize is ABSOLUTE_FONT_SIZE, the CRFontSize::value.absolute field will be defined. |
| RELATIVE_FONT_SIZE | If the type of CRFontSize is RELATIVE_FONT_SIZE, the CRFontSize::value.relative field will be defined. |
| INHERITED_FONT_SIZE | If the type of CRFontSize is INHERITED_FONT_SIZE, the None of the field of the CRFontSize::value enum will be defined. |
| NB_FONT_SIZE_TYPE | |
Definition at line 118 of file cr-fonts.h.
| enum CRFontStretch |
Definition at line 211 of file cr-fonts.h.
| enum CRFontStyle |
| Enumerator | |
|---|---|
| FONT_STYLE_NORMAL | |
| FONT_STYLE_ITALIC | |
| FONT_STYLE_OBLIQUE | |
| FONT_STYLE_INHERIT | |
Definition at line 177 of file cr-fonts.h.
| enum CRFontVariant |
| Enumerator | |
|---|---|
| FONT_VARIANT_NORMAL | |
| FONT_VARIANT_SMALL_CAPS | |
| FONT_VARIANT_INHERIT | |
Definition at line 185 of file cr-fonts.h.
| enum CRFontWeight |
Definition at line 192 of file cr-fonts.h.
The different types of absolute font size.
This is used by the 'font-size' property defined in css2 spec in chapter 15.2.4 . These values a indexes of table of size so please, do not change their definition order unless you know what you are doing.
| Enumerator | |
|---|---|
| FONT_SIZE_XX_SMALL | |
| FONT_SIZE_X_SMALL | |
| FONT_SIZE_SMALL | |
| FONT_SIZE_MEDIUM | |
| FONT_SIZE_LARGE | |
| FONT_SIZE_X_LARGE | |
| FONT_SIZE_XX_LARGE | |
| FONT_SIZE_INHERIT | |
| NB_PREDEFINED_ABSOLUTE_FONT_SIZES | |
Definition at line 82 of file cr-fonts.h.
| enum CRRelativeFontSize |
The different types of relative font size.
This is used by the 'font-size' property defined in css2 spec in chapter 15.2.4 . These values a indexes of table of size so please, do not change their definition order unless you know what you are doing.
| Enumerator | |
|---|---|
| FONT_SIZE_LARGER | |
| FONT_SIZE_SMALLER | |
| NB_RELATIVE_FONT_SIZE | |
Definition at line 106 of file cr-fonts.h.
| CRFontFamily* cr_font_family_append | ( | CRFontFamily * | a_this, |
| CRFontFamily * | a_family_to_append | ||
| ) |
cr_font_family_append: @a_this: the current instance of CRFontFamily.
@a_family_to_append: the font family to append to the list
Returns the new font family list.
Definition at line 250 of file cr-fonts.c.
References _CRFontFamily::next, and _CRFontFamily::prev.
| enum CRStatus cr_font_family_destroy | ( | CRFontFamily * | a_this | ) |
cr_font_family_destroy: @a_this: the current instance of CRFontFamily.
Returns CR_OK upon sucessful completion, an error code otherwise.
Definition at line 277 of file cr-fonts.c.
References _CRFontFamily::next, and _CRFontFamily::prev.
| CRFontFamily* cr_font_family_new | ( | enum CRFontFamilyType | a_type, |
| guchar * | a_name | ||
| ) |
cr_font_family_new: @a_type: the type of font family to create.
@a_name: the name of the font family.
create a font family.
Returns the newly built font family.
Definition at line 154 of file cr-fonts.c.
References cr_font_family_set_name(), cr_utils_trace_info, and _CRFontFamily::type.
| CRFontFamily* cr_font_family_prepend | ( | CRFontFamily * | a_this, |
| CRFontFamily * | a_family_to_prepend | ||
| ) |
cr_font_family_prepend: @a_this: the current instance CRFontFamily.
@a_family_to_prepend: the font family to prepend to the list.
Returns the font family list.
Definition at line 277 of file cr-fonts.c.
| enum CRStatus cr_font_family_set_name | ( | CRFontFamily * | a_this, |
| guchar * | a_name | ||
| ) |
cr_font_family_set_name: @a_this: the current instance of CRFontFamily.
@a_name: the new name
Returns CR_OK upon sucessful completion, an error code otherwise.
Definition at line 182 of file cr-fonts.c.
References CR_OK.
Referenced by cr_font_family_new().
| guchar* cr_font_family_to_string | ( | CRFontFamily const * | a_this, |
| gboolean | a_walk_font_family_list | ||
| ) |
cr_font_family_to_string: @a_this: the current instance of CRFontFamily.
@a_walk_font_family_list: wether the serialize the entire list.
Returns the seriliazed font family. The caller has to free it using g_free().
Definition at line 182 of file cr-fonts.c.
| void cr_font_size_adjust_destroy | ( | CRFontSizeAdjust * | a_this | ) |
cr_font_size_adjust_destroy: @a_this: the current instance of CRFontSizeAdjust.
Definition at line 941 of file cr-fonts.c.
References cr_num_destroy(), FONT_SIZE_ADJUST_NUMBER, _CRFontSizeAdjust::num, and _CRFontSizeAdjust::type.
| CRFontSizeAdjust* cr_font_size_adjust_new | ( | void | ) |
cr_font_size_adjust_new:
Returns a newly built instance of CRFontSizeAdjust
Definition at line 921 of file cr-fonts.c.
References cr_utils_trace_info.
| gchar* cr_font_size_adjust_to_string | ( | CRFontSizeAdjust const * | a_this | ) |
cr_font_size_adjust_to_string: @a_this: the instance of CRFontSizeAdjust.
Returns the serialized form of CRFontSizeAdjust
Definition at line 676 of file cr-fonts.c.
References cr_num_to_string(), FONT_SIZE_ADJUST_INHERIT, FONT_SIZE_ADJUST_NONE, FONT_SIZE_ADJUST_NUMBER, _CRFontSizeAdjust::num, and _CRFontSizeAdjust::type.
| enum CRStatus cr_font_size_clear | ( | CRFontSize * | a_this | ) |
cr_font_size_clear: @a_this: the current instance of CRFontSize
Returns CR_OK upon successful completion, an error code otherwise.
Definition at line 335 of file cr-fonts.c.
References cr_utils_trace_info.
| enum CRStatus cr_font_size_copy | ( | CRFontSize * | a_dst, |
| CRFontSize const * | a_src | ||
| ) |
cr_font_size_copy: @a_dst: the destination CRFontSize (where to copy to).
@a_src: the source CRFontSize (where to copy from).
Returns CR_OK upon successful completion, an error code otherwise.
Definition at line 335 of file cr-fonts.c.
| void cr_font_size_destroy | ( | CRFontSize * | a_font_size | ) |
cr_font_size_destroy: @a_font_size: the font size to destroy
Definition at line 904 of file cr-fonts.c.
| void cr_font_size_get_larger_predefined_font_size | ( | enum CRPredefinedAbsoluteFontSize | a_font_size, |
| enum CRPredefinedAbsoluteFontSize * | a_larger_size | ||
| ) |
cr_font_size_get_larger_predefined_font_size: @a_font_size: the font size to consider.
@a_larger_size: out parameter. the font size considered larger than @a_font_size.
Definition at line 606 of file cr-fonts.c.
References cr_utils_trace_info, FONT_SIZE_INHERIT, FONT_SIZE_LARGE, FONT_SIZE_MEDIUM, FONT_SIZE_SMALL, FONT_SIZE_X_LARGE, FONT_SIZE_X_SMALL, FONT_SIZE_XX_LARGE, FONT_SIZE_XX_SMALL, and NB_PREDEFINED_ABSOLUTE_FONT_SIZES.
| void cr_font_size_get_smaller_predefined_font_size | ( | enum CRPredefinedAbsoluteFontSize | a_font_size, |
| enum CRPredefinedAbsoluteFontSize * | a_smaller_size | ||
| ) |
cr_font_size_get_smaller_predefined: @a_font_size: the font size to consider.
@a_smaller_size: out parameter. The a smaller value than @a_font_size.
Definition at line 553 of file cr-fonts.c.
References cr_utils_trace_info, FONT_SIZE_INHERIT, FONT_SIZE_LARGE, FONT_SIZE_MEDIUM, FONT_SIZE_SMALL, FONT_SIZE_X_LARGE, FONT_SIZE_X_SMALL, FONT_SIZE_XX_LARGE, FONT_SIZE_XX_SMALL, and NB_PREDEFINED_ABSOLUTE_FONT_SIZES.
| gboolean cr_font_size_is_predefined_absolute_font_size | ( | enum CRPredefinedAbsoluteFontSize | a_font_size | ) |
cr_font_size_is_predefined_absolute_font_size: @a_font_size: the font size to consider.
Returns TRUE if the instance is an predefined absolute font size, FALSE otherwise.
Definition at line 658 of file cr-fonts.c.
References FONT_SIZE_XX_SMALL, and NB_PREDEFINED_ABSOLUTE_FONT_SIZES.
| gboolean cr_font_size_is_set_to_inherit | ( | CRFontSize const * | a_this | ) |
cr_font_size_is_set_to_inherit: @a_this: the current instance of CRFontSize.
Returns TRUE if the current instance is set to 'inherit'.
Definition at line 502 of file cr-fonts.c.
References INHERITED_FONT_SIZE, and _CRFontSize::type.
| CRFontSize* cr_font_size_new | ( | void | ) |
| enum CRStatus cr_font_size_set_absolute_font_size | ( | CRFontSize * | a_this, |
| enum CRNumType | a_num_type, | ||
| gdouble | a_value | ||
| ) |
cr_font_size_set_absolute_font_size: @a_this: the current instance of CRFontSize @a_num_type: the type of number to set.
@a_value: the actual value to set.
Returns CR_OK upon succesful completion, an error code otherwise.
Definition at line 335 of file cr-fonts.c.
| enum CRStatus cr_font_size_set_predefined_absolute_font_size | ( | CRFontSize * | a_this, |
| enum CRPredefinedAbsoluteFontSize | a_predefined | ||
| ) |
cr_font_size_set_predefined_absolute_font_size: @a_this: the current instance of CRFontSize.
@a_predefined: what to set.
Returns CR_OK upon sucessful completion, an error code otherwise.
Definition at line 335 of file cr-fonts.c.
| enum CRStatus cr_font_size_set_relative_font_size | ( | CRFontSize * | a_this, |
| enum CRRelativeFontSize | a_relative | ||
| ) |
cr_font_size_set_relative_font_size: @a_this: the current instance of CRFontSize @a_relative: the new relative font size
Returns CR_OK upon successful completion, an error code otherwise.
Definition at line 335 of file cr-fonts.c.
| enum CRStatus cr_font_size_set_to_inherit | ( | CRFontSize * | a_this | ) |
cr_font_size_set_to_inherit: @a_this: the current instance of CRFontSize
Returns CR_OK upon succesful completion, an error code otherwise.
Definition at line 335 of file cr-fonts.c.
| gchar* cr_font_size_to_string | ( | CRFontSize const * | a_this | ) |
cr_font_size_to_string: @a_this: the current instance of CRFontSize
Returns the serialized form of CRFontSize. The returned string has to bee freed using g_free().
Definition at line 517 of file cr-fonts.c.
References PREDEFINED_ABSOLUTE_FONT_SIZE, and _CRFontSize::type.
| const gchar* cr_font_stretch_to_string | ( | enum CRFontStretch | a_code | ) |
cr_font_stretch_to_string: @a_code: the instance of CRFontStretch to consider.
Returns the serialized form of CRFontStretch.
Definition at line 853 of file cr-fonts.c.
References FONT_STRETCH_CONDENSED, FONT_STRETCH_EXPANDED, FONT_STRETCH_EXTRA_CONDENSED, FONT_STRETCH_EXTRA_EXPANDED, FONT_STRETCH_INHERIT, FONT_STRETCH_NARROWER, FONT_STRETCH_NORMAL, FONT_STRETCH_SEMI_CONDENSED, FONT_STRETCH_SEMI_EXPANDED, FONT_STRETCH_ULTRA_CONDENSED, FONT_STRETCH_ULTRA_EXPANDED, and FONT_STRETCH_WIDER.
| const gchar* cr_font_style_to_string | ( | enum CRFontStyle | a_code | ) |
cr_font_style_to_string: @a_code: the current instance of CRFontStyle .
Returns the serialized CRFontStyle. The caller must free the returned string using g_free().
Definition at line 710 of file cr-fonts.c.
References FONT_STYLE_INHERIT, FONT_STYLE_ITALIC, FONT_STYLE_NORMAL, and FONT_STYLE_OBLIQUE.
| const gchar* cr_font_variant_to_string | ( | enum CRFontVariant | a_code | ) |
cr_font_variant_to_string: @a_code: the current instance of CRFontVariant.
Returns the serialized form of CRFontVariant. The caller has to free the returned string using g_free().
Definition at line 742 of file cr-fonts.c.
References FONT_VARIANT_INHERIT, FONT_VARIANT_NORMAL, and FONT_VARIANT_SMALL_CAPS.
| enum CRFontWeight cr_font_weight_get_bolder | ( | enum CRFontWeight | a_weight | ) |
cr_font_weight_get_bolder: @a_weight: the CRFontWeight to consider.
Returns a font weight bolder than @a_weight
Definition at line 742 of file cr-fonts.c.
| const gchar* cr_font_weight_to_string | ( | enum CRFontWeight | a_code | ) |
cr_font_weight_to_string: @a_code: the font weight to consider.
Returns the serialized form of CRFontWeight.
Definition at line 792 of file cr-fonts.c.
References FONT_WEIGHT_100, FONT_WEIGHT_200, FONT_WEIGHT_300, FONT_WEIGHT_400, FONT_WEIGHT_500, FONT_WEIGHT_600, FONT_WEIGHT_700, FONT_WEIGHT_800, FONT_WEIGHT_900, FONT_WEIGHT_BOLD, FONT_WEIGHT_BOLDER, FONT_WEIGHT_INHERIT, FONT_WEIGHT_LIGHTER, and FONT_WEIGHT_NORMAL.