Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

cr-fonts.h File Reference

Various type declarations about font selection related properties. More...

#include "cr-utils.h"
#include "cr-num.h"

Go to the source code of this file.

Data Structures

struct  _CRFontFamily
struct  _CRFontSize
struct  _CRFontSizeAdjust

Typedefs

typedef _CRFontFamily CRFontFamily
typedef _CRFontSize CRFontSize
typedef _CRFontSizeAdjust CRFontSizeAdjust

Enumerations

enum  CRFontFamilyType {
  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
}
enum  CRPredefinedAbsoluteFontSize {
  FONT_SIZE_XX_SMALL = 0, 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
}
 The different types of absolute font size. More...
enum  CRRelativeFontSize { FONT_SIZE_LARGER, FONT_SIZE_SMALLER, NB_RELATIVE_FONT_SIZE }
 The different types of relative font size. More...
enum  CRFontSizeType {
  PREDEFINED_ABSOLUTE_FONT_SIZE, ABSOLUTE_FONT_SIZE, RELATIVE_FONT_SIZE, INHERITED_FONT_SIZE,
  NB_FONT_SIZE_TYPE
}
 The type of font-size property. More...
enum  CRFontSizeAdjustType { FONT_SIZE_ADJUST_NONE = 0, FONT_SIZE_ADJUST_NUMBER, FONT_SIZE_ADJUST_INHERIT }
enum  CRFontStyle { FONT_STYLE_NORMAL = 0, FONT_STYLE_ITALIC, FONT_STYLE_OBLIQUE, FONT_STYLE_INHERIT }
enum  CRFontVariant { FONT_VARIANT_NORMAL = 0, FONT_VARIANT_SMALL_CAPS, FONT_VARIANT_INHERIT }
enum  CRFontWeight {
  FONT_WEIGHT_NORMAL = 1, FONT_WEIGHT_BOLD = 1<<1, FONT_WEIGHT_BOLDER = 1<<2, FONT_WEIGHT_LIGHTER = 1<<3,
  FONT_WEIGHT_100 = 1<<4, FONT_WEIGHT_200 = 1<<5, FONT_WEIGHT_300 = 1<<6, FONT_WEIGHT_400 = 1<<7,
  FONT_WEIGHT_500 = 1<<8, FONT_WEIGHT_600 = 1<<9, FONT_WEIGHT_700 = 1<<10, FONT_WEIGHT_800 = 1<<11,
  FONT_WEIGHT_900 = 1<<12, FONT_WEIGHT_INHERIT = 1<<13, NB_FONT_WEIGHTS
}
enum  CRFontStretch {
  FONT_STRETCH_NORMAL = 0, FONT_STRETCH_WIDER, FONT_STRETCH_NARROWER, FONT_STRETCH_ULTRA_CONDENSED,
  FONT_STRETCH_EXTRA_CONDENSED, FONT_STRETCH_CONDENSED, FONT_STRETCH_SEMI_CONDENSED, FONT_STRETCH_SEMI_EXPANDED,
  FONT_STRETCH_EXPANDED, FONT_STRETCH_EXTRA_EXPANDED, FONT_STRETCH_ULTRA_EXPANDED, FONT_STRETCH_INHERIT
}

Functions

CRFontFamilycr_font_family_new (enum CRFontFamilyType a_type, guchar *a_name)
CRFontFamilycr_font_family_append (CRFontFamily *a_this, CRFontFamily *a_family_to_append)
guchar * cr_font_family_to_string (CRFontFamily *a_this, gboolean a_walk_font_family_list)
CRFontFamilycr_font_family_prepend (CRFontFamily *a_this, CRFontFamily *a_family_to_prepend)
enum CRStatus cr_font_family_destroy (CRFontFamily *a_this)
enum CRStatus cr_font_family_set_name (CRFontFamily *a_this, guchar *a_name)
CRFontSizecr_font_size_new (void)
enum CRStatus cr_font_size_clear (CRFontSize *a_this)
enum CRStatus cr_font_size_copy (CRFontSize *a_dst, CRFontSize *a_src)
enum CRStatus cr_font_size_set_predefined_absolute_font_size (CRFontSize *a_this, enum CRPredefinedAbsoluteFontSize a_predefined)
enum CRStatus cr_font_size_set_relative_font_size (CRFontSize *a_this, enum CRRelativeFontSize a_relative)
enum CRStatus cr_font_size_set_absolute_font_size (CRFontSize *a_this, enum CRNumType a_num_type, gdouble a_value)
enum CRStatus cr_font_size_set_to_inherit (CRFontSize *a_this)
gboolean cr_font_size_is_set_to_inherit (CRFontSize *a_this)
gchar * cr_font_size_to_string (CRFontSize *a_this)
void cr_font_size_destroy (CRFontSize *a_font_size)
CRFontSizeAdjustcr_font_size_adjust_new (void)
gchar * cr_font_size_adjust_to_string (CRFontSizeAdjust *a_this)
void cr_font_size_adjust_destroy (CRFontSizeAdjust *a_this)
void cr_font_size_get_smaller_predefined_font_size (enum CRPredefinedAbsoluteFontSize a_font_size, enum CRPredefinedAbsoluteFontSize *a_smaller_size)
void cr_font_size_get_larger_predefined_font_size (enum CRPredefinedAbsoluteFontSize a_font_size, enum CRPredefinedAbsoluteFontSize *a_larger_size)
gboolean cr_font_size_is_predefined_absolute_font_size (enum CRPredefinedAbsoluteFontSize a_font_size)
const gchar * cr_font_style_to_string (enum CRFontStyle a_code)
const gchar * cr_font_weight_to_string (enum CRFontWeight a_code)
enum CRFontWeight cr_font_weight_get_bolder (enum CRFontWeight a_weight)
const gchar * cr_font_variant_to_string (enum CRFontVariant a_code)
const gchar * cr_font_stretch_to_string (enum CRFontStretch a_code)


Detailed Description

Various type declarations about font selection related properties.

Definition in file cr-fonts.h.


Typedef Documentation

typedef struct _CRFontFamily CRFontFamily
 

Definition at line 54 of file cr-fonts.h.

Referenced by cr_font_family_append(), cr_font_family_destroy(), cr_font_family_new(), cr_font_family_prepend(), cr_font_family_set_name(), and cr_font_family_to_string().

typedef struct _CRFontSize CRFontSize
 

Definition at line 155 of file cr-fonts.h.

Referenced by cr_font_size_clear(), cr_font_size_copy(), cr_font_size_destroy(), cr_font_size_is_set_to_inherit(), cr_font_size_new(), cr_font_size_set_absolute_font_size(), cr_font_size_set_predefined_absolute_font_size(), cr_font_size_set_relative_font_size(), cr_font_size_set_to_inherit(), and cr_font_size_to_string().

typedef struct _CRFontSizeAdjust CRFontSizeAdjust
 

Definition at line 171 of file cr-fonts.h.

Referenced by cr_font_size_adjust_destroy(), cr_font_size_adjust_new(), and cr_font_size_adjust_to_string().


Enumeration Type Documentation

enum CRFontFamilyType
 

Enumeration values:
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 41 of file cr-fonts.h.

enum CRFontSizeAdjustType
 

Enumeration values:
FONT_SIZE_ADJUST_NONE 
FONT_SIZE_ADJUST_NUMBER 
FONT_SIZE_ADJUST_INHERIT 

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

Enumeration values:
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 119 of file cr-fonts.h.

enum CRFontStretch
 

Enumeration values:
FONT_STRETCH_NORMAL 
FONT_STRETCH_WIDER 
FONT_STRETCH_NARROWER 
FONT_STRETCH_ULTRA_CONDENSED 
FONT_STRETCH_EXTRA_CONDENSED 
FONT_STRETCH_CONDENSED 
FONT_STRETCH_SEMI_CONDENSED 
FONT_STRETCH_SEMI_EXPANDED 
FONT_STRETCH_EXPANDED 
FONT_STRETCH_EXTRA_EXPANDED 
FONT_STRETCH_ULTRA_EXPANDED 
FONT_STRETCH_INHERIT 

Definition at line 212 of file cr-fonts.h.

enum CRFontStyle
 

Enumeration values:
FONT_STYLE_NORMAL 
FONT_STYLE_ITALIC 
FONT_STYLE_OBLIQUE 
FONT_STYLE_INHERIT 

Definition at line 178 of file cr-fonts.h.

enum CRFontVariant
 

Enumeration values:
FONT_VARIANT_NORMAL 
FONT_VARIANT_SMALL_CAPS 
FONT_VARIANT_INHERIT 

Definition at line 186 of file cr-fonts.h.

enum CRFontWeight
 

Enumeration values:
FONT_WEIGHT_NORMAL 
FONT_WEIGHT_BOLD 
FONT_WEIGHT_BOLDER 
FONT_WEIGHT_LIGHTER 
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_INHERIT 
NB_FONT_WEIGHTS 

Definition at line 193 of file cr-fonts.h.

enum CRPredefinedAbsoluteFontSize
 

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.

Enumeration values:
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 83 of file cr-fonts.h.

Referenced by cr_font_size_get_larger_predefined_font_size(), and cr_font_size_get_smaller_predefined_font_size().

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.

Enumeration values:
FONT_SIZE_LARGER 
FONT_SIZE_SMALLER 
NB_RELATIVE_FONT_SIZE 

Definition at line 107 of file cr-fonts.h.


Function Documentation

CRFontFamily* cr_font_family_append CRFontFamily a_this,
CRFontFamily a_family_to_append
 

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

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

enum CRStatus cr_font_family_destroy CRFontFamily a_this  ) 
 

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

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

CRFontFamily* cr_font_family_new enum CRFontFamilyType  a_type,
guchar *  a_name
 

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

References cr_font_family_set_name(), cr_utils_trace_info, and CRFontFamily.

CRFontFamily* cr_font_family_prepend CRFontFamily a_this,
CRFontFamily a_family_to_prepend
 

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

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

enum CRStatus cr_font_family_set_name CRFontFamily a_this,
guchar *  a_name
 

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

References CR_BAD_PARAM_ERROR, CRFontFamily, and _CRFontFamily::name.

Referenced by cr_font_family_new().

guchar* cr_font_family_to_string CRFontFamily a_this,
gboolean  a_walk_font_family_list
 

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

References CR_OK, CRFontFamily, and CRStatus.

Referenced by cr_style_to_string().

void cr_font_size_adjust_destroy CRFontSizeAdjust a_this  ) 
 

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

References cr_num_destroy(), CRFontSizeAdjust, FONT_SIZE_ADJUST_NUMBER, and _CRFontSizeAdjust::num.

CRFontSizeAdjust* cr_font_size_adjust_new void   ) 
 

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

References cr_utils_trace_info, and CRFontSizeAdjust.

gchar* cr_font_size_adjust_to_string CRFontSizeAdjust a_this  ) 
 

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

References cr_num_to_string(), CRFontSizeAdjust, FONT_SIZE_ADJUST_INHERIT, FONT_SIZE_ADJUST_NONE, FONT_SIZE_ADJUST_NUMBER, and _CRFontSizeAdjust::num.

Referenced by cr_style_to_string().

enum CRStatus cr_font_size_clear CRFontSize a_this  ) 
 

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

References ABSOLUTE_FONT_SIZE, CR_BAD_PARAM_ERROR, CRFontSize, INHERITED_FONT_SIZE, PREDEFINED_ABSOLUTE_FONT_SIZE, and RELATIVE_FONT_SIZE.

Referenced by cr_font_size_copy(), cr_font_size_set_to_inherit(), and cr_style_set_props_to_default_values().

enum CRStatus cr_font_size_copy CRFontSize a_dst,
CRFontSize a_src
 

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

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

Referenced by cr_style_resolve_inherited_properties().

void cr_font_size_destroy CRFontSize a_font_size  ) 
 

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

References CRFontSize.

void cr_font_size_get_larger_predefined_font_size enum CRPredefinedAbsoluteFontSize  a_font_size,
enum CRPredefinedAbsoluteFontSize a_larger_size
 

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

References cr_utils_trace_info, CRPredefinedAbsoluteFontSize, 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
 

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

References cr_utils_trace_info, CRPredefinedAbsoluteFontSize, 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  ) 
 

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

References FONT_SIZE_XX_SMALL.

gboolean cr_font_size_is_set_to_inherit CRFontSize a_this  ) 
 

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

References CRFontSize.

CRFontSize* cr_font_size_new void   ) 
 

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

References cr_utils_trace_info, and CRFontSize.

enum CRStatus cr_font_size_set_absolute_font_size CRFontSize a_this,
enum CRNumType  a_num_type,
gdouble  a_value
 

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

References _CRFontSize::absolute, CR_BAD_PARAM_ERROR, cr_num_set(), CRFontSize, NB_NUM_TYPE, NUM_AUTO, and _CRFontSize::value.

enum CRStatus cr_font_size_set_predefined_absolute_font_size CRFontSize a_this,
enum CRPredefinedAbsoluteFontSize  a_predefined
 

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

References CR_BAD_PARAM_ERROR, CRFontSize, NB_FONT_SIZE_TYPE, PREDEFINED_ABSOLUTE_FONT_SIZE, and _CRFontSize::value.

Referenced by cr_style_set_props_to_initial_values().

enum CRStatus cr_font_size_set_relative_font_size CRFontSize a_this,
enum CRRelativeFontSize  a_relative
 

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

References CR_BAD_PARAM_ERROR, CRFontSize, FONT_SIZE_LARGER, NB_RELATIVE_FONT_SIZE, and _CRFontSize::value.

enum CRStatus cr_font_size_set_to_inherit CRFontSize a_this  ) 
 

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

References CR_BAD_PARAM_ERROR, cr_font_size_clear(), and CRFontSize.

Referenced by cr_style_set_props_to_default_values().

gchar* cr_font_size_to_string CRFontSize a_this  ) 
 

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

References _CRFontSize::absolute, ABSOLUTE_FONT_SIZE, cr_num_to_string(), CRFontSize, INHERITED_FONT_SIZE, PREDEFINED_ABSOLUTE_FONT_SIZE, RELATIVE_FONT_SIZE, and _CRFontSize::value.

Referenced by cr_style_to_string().

const gchar* cr_font_stretch_to_string enum CRFontStretch  a_code  ) 
 

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

Referenced by cr_style_to_string().

const gchar* cr_font_style_to_string enum CRFontStyle  a_code  ) 
 

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

References FONT_STYLE_INHERIT, FONT_STYLE_ITALIC, FONT_STYLE_NORMAL, and FONT_STYLE_OBLIQUE.

Referenced by cr_style_to_string().

const gchar* cr_font_variant_to_string enum CRFontVariant  a_code  ) 
 

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

References FONT_VARIANT_INHERIT, FONT_VARIANT_NORMAL, and FONT_VARIANT_SMALL_CAPS.

Referenced by cr_style_to_string().

enum CRFontWeight cr_font_weight_get_bolder enum CRFontWeight  a_weight  ) 
 

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

References cr_utils_trace_info, and FONT_WEIGHT_BOLDER.

const gchar* cr_font_weight_to_string enum CRFontWeight  a_code  ) 
 

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

Referenced by cr_style_to_string().


Generated on Fri Oct 29 08:29:13 2004 for Libcroco by  doxygen 1.3.9.1