cr-fonts.c File Reference

#include "cr-fonts.h"
#include <string.h>

Go to the source code of this file.

Functions

CRFontFamilycr_font_family_new (enum CRFontFamilyType a_type, guchar *a_name)
 cr_font_family_new: : the type of font family to create.
guchar * cr_font_family_to_string (CRFontFamily *a_this, gboolean a_walk_font_family_list)
 cr_font_family_to_string: : the current instance of CRFontFamily.
enum CRStatus cr_font_family_set_name (CRFontFamily *a_this, guchar *a_name)
 cr_font_family_set_name: : the current instance of CRFontFamily.
CRFontFamilycr_font_family_append (CRFontFamily *a_this, CRFontFamily *a_family_to_append)
 cr_font_family_append: : the current instance of CRFontFamily.
CRFontFamilycr_font_family_prepend (CRFontFamily *a_this, CRFontFamily *a_family_to_prepend)
 cr_font_family_prepend: : the current instance CRFontFamily.
enum CRStatus cr_font_family_destroy (CRFontFamily *a_this)
 cr_font_family_destroy: : the current instance of CRFontFamily.
CRFontSizecr_font_size_new (void)
 cr_font_size_new:
enum CRStatus cr_font_size_clear (CRFontSize *a_this)
 cr_font_size_clear: : the current instance of CRFontSize
enum CRStatus cr_font_size_copy (CRFontSize *a_dst, CRFontSize *a_src)
 cr_font_size_copy: : the destination CRFontSize (where to copy to).
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: : the current instance of CRFontSize.
enum CRStatus cr_font_size_set_relative_font_size (CRFontSize *a_this, enum CRRelativeFontSize a_relative)
 cr_font_size_set_relative_font_size: : the current instance of CRFontSize : the new relative font size
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: : the current instance of CRFontSize : the type of number to set.
enum CRStatus cr_font_size_set_to_inherit (CRFontSize *a_this)
 cr_font_size_set_to_inherit: : the current instance of CRFontSize
gboolean cr_font_size_is_set_to_inherit (CRFontSize *a_this)
 cr_font_size_is_set_to_inherit: : the current instance of CRFontSize.
gchar * cr_font_size_to_string (CRFontSize *a_this)
 cr_font_size_to_string: : the current instance of CRFontSize
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: : the font size to consider.
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: : the font size to consider.
gboolean cr_font_size_is_predefined_absolute_font_size (enum CRPredefinedAbsoluteFontSize a_font_size)
 cr_font_size_is_predefined_absolute_font_size: : the font size to consider.
gchar * cr_font_size_adjust_to_string (CRFontSizeAdjust *a_this)
 cr_font_size_adjust_to_string: : the instance of CRFontSizeAdjust.
const gchar * cr_font_style_to_string (enum CRFontStyle a_code)
 cr_font_style_to_string: the current instance of CRFontStyle
const gchar * cr_font_variant_to_string (enum CRFontVariant a_code)
 cr_font_variant_to_string: : the current instance of CRFontVariant.
enum CRFontWeight cr_font_weight_get_bolder (enum CRFontWeight a_weight)
 cr_font_weight_get_bolder: : the CRFontWeight to consider.
const gchar * cr_font_weight_to_string (enum CRFontWeight a_code)
 cr_font_weight_to_string: : the font weight to consider.
const gchar * cr_font_stretch_to_string (enum CRFontStretch a_code)
 cr_font_stretch_to_string: : the instance of CRFontStretch to consider.
void cr_font_size_destroy (CRFontSize *a_font_size)
 cr_font_size_destroy: : the font size to destroy
CRFontSizeAdjustcr_font_size_adjust_new (void)
 cr_font_size_adjust_new:
void cr_font_size_adjust_destroy (CRFontSizeAdjust *a_this)
 cr_font_size_adjust_destroy: : the current instance of CRFontSizeAdjust.


Function Documentation

CRFontFamily* cr_font_family_append CRFontFamily a_this,
CRFontFamily a_family_to_append
 

cr_font_family_append: : the current instance of CRFontFamily.

: 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: : the current instance of CRFontFamily.

Returns CR_OK upon sucessful completion, an error code otherwise.

Definition at line 298 of file cr-fonts.c.

References CR_BAD_PARAM_ERROR, _CRFontFamily::name, _CRFontFamily::next, and _CRFontFamily::prev.

CRFontFamily* cr_font_family_new enum CRFontFamilyType  a_type,
guchar *  a_name
 

cr_font_family_new: : the type of font family to create.

: 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: : the current instance CRFontFamily.

: the font family to prepend to the list.

Returns the font family list.

Definition at line 277 of file cr-fonts.c.

References CR_OK, _CRFontFamily::next, and _CRFontFamily::prev.

enum CRStatus cr_font_family_set_name CRFontFamily a_this,
guchar *  a_name
 

cr_font_family_set_name: : the current instance of CRFontFamily.

: the new name

Returns CR_OK upon sucessful completion, an error code otherwise.

Definition at line 221 of file cr-fonts.c.

References CR_BAD_PARAM_ERROR, CR_OK, FONT_FAMILY_NON_GENERIC, _CRFontFamily::name, and _CRFontFamily::type.

Referenced by cr_font_family_new().

guchar* cr_font_family_to_string CRFontFamily a_this,
gboolean  a_walk_font_family_list
 

cr_font_family_to_string: : the current instance of CRFontFamily.

: 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.

References CR_OK.

void cr_font_size_adjust_destroy CRFontSizeAdjust a_this  ) 
 

cr_font_size_adjust_destroy: : the current instance of CRFontSizeAdjust.

Definition at line 938 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 918 of file cr-fonts.c.

References cr_utils_trace_info.

gchar* cr_font_size_adjust_to_string CRFontSizeAdjust a_this  ) 
 

cr_font_size_adjust_to_string: : 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: : the current instance of CRFontSize

Returns CR_OK upon successful completion, an error code otherwise.

Definition at line 356 of file cr-fonts.c.

References ABSOLUTE_FONT_SIZE, CR_BAD_PARAM_ERROR, CR_OK, CR_UNKNOWN_TYPE_ERROR, INHERITED_FONT_SIZE, PREDEFINED_ABSOLUTE_FONT_SIZE, RELATIVE_FONT_SIZE, and _CRFontSize::type.

Referenced by cr_font_size_copy(), and cr_font_size_set_to_inherit().

enum CRStatus cr_font_size_copy CRFontSize a_dst,
CRFontSize a_src
 

cr_font_size_copy: : the destination CRFontSize (where to copy to).

: the source CRFontSize (where to copy from).

Returns CR_OK upon successful completion, an error code otherwise.

Definition at line 386 of file cr-fonts.c.

References _CRFontSize::absolute, ABSOLUTE_FONT_SIZE, CR_BAD_PARAM_ERROR, cr_font_size_clear(), cr_num_copy(), CR_OK, CR_UNKNOWN_TYPE_ERROR, INHERITED_FONT_SIZE, PREDEFINED_ABSOLUTE_FONT_SIZE, RELATIVE_FONT_SIZE, _CRFontSize::type, and _CRFontSize::value.

void cr_font_size_destroy CRFontSize a_font_size  ) 
 

cr_font_size_destroy: : the font size to destroy

Definition at line 901 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: : the font size to consider.

: out parameter. the font size considered larger than .

Definition at line 607 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: : the font size to consider.

: out parameter. The a smaller value than .

Definition at line 554 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: : the font size to consider.

Returns TRUE if the instance is an predefined absolute font size, FALSE otherwise.

Definition at line 659 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 a_this  ) 
 

cr_font_size_is_set_to_inherit: : 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   ) 
 

cr_font_size_new:

Returns the newly created font size.

Definition at line 335 of file cr-fonts.c.

References cr_utils_trace_info.

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: : the current instance of CRFontSize : the type of number to set.

: the actual value to set.

Returns CR_OK upon succesful completion, an error code otherwise.

Definition at line 463 of file cr-fonts.c.

References _CRFontSize::absolute, ABSOLUTE_FONT_SIZE, CR_BAD_PARAM_ERROR, cr_num_set(), CR_OK, NB_NUM_TYPE, NUM_AUTO, _CRFontSize::type, and _CRFontSize::value.

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: : the current instance of CRFontSize.

: what to set.

Returns CR_OK upon sucessful completion, an error code otherwise.

Definition at line 419 of file cr-fonts.c.

References CR_BAD_PARAM_ERROR, CR_OK, NB_FONT_SIZE_TYPE, _CRFontSize::predefined, PREDEFINED_ABSOLUTE_FONT_SIZE, _CRFontSize::type, and _CRFontSize::value.

enum CRStatus cr_font_size_set_relative_font_size CRFontSize a_this,
enum CRRelativeFontSize  a_relative
 

cr_font_size_set_relative_font_size: : the current instance of CRFontSize : the new relative font size

Returns CR_OK upon successful completion, an error code otherwise.

Definition at line 441 of file cr-fonts.c.

References CR_BAD_PARAM_ERROR, CR_OK, FONT_SIZE_LARGER, NB_RELATIVE_FONT_SIZE, _CRFontSize::relative, RELATIVE_FONT_SIZE, _CRFontSize::type, and _CRFontSize::value.

enum CRStatus cr_font_size_set_to_inherit CRFontSize a_this  ) 
 

cr_font_size_set_to_inherit: : the current instance of CRFontSize

Returns CR_OK upon succesful completion, an error code otherwise.

Definition at line 485 of file cr-fonts.c.

References CR_BAD_PARAM_ERROR, cr_font_size_clear(), CR_OK, INHERITED_FONT_SIZE, and _CRFontSize::type.

gchar* cr_font_size_to_string CRFontSize a_this  ) 
 

cr_font_size_to_string: : 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 _CRFontSize::absolute, ABSOLUTE_FONT_SIZE, cr_num_to_string(), INHERITED_FONT_SIZE, _CRFontSize::predefined, PREDEFINED_ABSOLUTE_FONT_SIZE, _CRFontSize::relative, RELATIVE_FONT_SIZE, _CRFontSize::type, and _CRFontSize::value.

const gchar* cr_font_stretch_to_string enum CRFontStretch  a_code  ) 
 

cr_font_stretch_to_string: : the instance of CRFontStretch to consider.

Returns the serialized form of CRFontStretch.

Definition at line 850 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: 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: : 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: : the CRFontWeight to consider.

Returns a font weight bolder than

Definition at line 767 of file cr-fonts.c.

References cr_utils_trace_info, FONT_WEIGHT_900, FONT_WEIGHT_BOLDER, FONT_WEIGHT_NORMAL, and NB_FONT_WEIGHTS.

const gchar* cr_font_weight_to_string enum CRFontWeight  a_code  ) 
 

cr_font_weight_to_string: : the font weight to consider.

Returns the serialized form of CRFontWeight.

Definition at line 789 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.


Generated on Wed Mar 15 18:23:56 2006 for Libcroco by  doxygen 1.4.6