Coverage Maps

Name

Coverage Maps -- Unicode character range coverage storage.

Synopsis



enum        PangoCoverageLevel;
struct      PangoCoverage;

PangoCoverage* pango_coverage_new           (void);
PangoCoverage* pango_coverage_ref           (PangoCoverage *coverage);
void        pango_coverage_unref            (PangoCoverage *coverage);
PangoCoverage* pango_coverage_copy          (PangoCoverage *coverage);
PangoCoverageLevel pango_coverage_get       (PangoCoverage *coverage,
                                             int index);
void        pango_coverage_max              (PangoCoverage *coverage,
                                             PangoCoverage *other);
void        pango_coverage_set              (PangoCoverage *coverage,
                                             int index,
                                             PangoCoverageLevel level);

Description

It is often necessary in Pango to determine if a paticular font can represent a particular character, and also how well it can represent that character. The PangoCoverage is a data structure that is used to represent that information.

Details

enum PangoCoverageLevel

typedef enum {
  PANGO_COVERAGE_NONE,
  PANGO_COVERAGE_FALLBACK,
  PANGO_COVERAGE_APPROXIMATE,
  PANGO_COVERAGE_EXACT
} PangoCoverageLevel;

Used to indicate how well a font can represent a particular ISO 10646 character point for a particular scrpt.

PANGO_COVERAGE_NONEThe character is not representable with the font.
PANGO_COVERAGE_FALLBACKThe character is represented in a way that may be comprehensible but is not the correct graphical form. For instance, a Hangul character represented as a a sequence of Jamos, or a Latin transliteration of a Cyrillic word.
PANGO_COVERAGE_APPROXIMATEThe character is represented as basically the correct graphical form, but with a stylistic variant inappropriate for the current script.
PANGO_COVERAGE_EXACTThe character is represented as the correct graphical form.


struct PangoCoverage

struct PangoCoverage;

The PangoCoverage structure represents a map from ISO-10646 character point to PangoCoverageLevel. It is an opaque structure with no public fields.


pango_coverage_new ()

PangoCoverage* pango_coverage_new           (void);

Create a new PangoCoverage

Returns : a new PangoCoverage object, initialized to PANGO_COVERAGE_NONE with a reference count of 0.


pango_coverage_ref ()

PangoCoverage* pango_coverage_ref           (PangoCoverage *coverage);

Increase the reference count on the PangoCoverage by one

coverage : a PangoCoverage
Returns : coverage


pango_coverage_unref ()

void        pango_coverage_unref            (PangoCoverage *coverage);

Increase the reference count on the PangoCoverage by one. if the result is zero, free the coverage and all associated memory.

coverage : a PangoCoverage


pango_coverage_copy ()

PangoCoverage* pango_coverage_copy          (PangoCoverage *coverage);

Copy an existing PangoCoverage. (This function may now be unecessary since we refcount the structure. Mail otaylorredhat.com if you use it.)

coverage : a PangoCoverage
Returns : a copy of coverage with a reference count of 1


pango_coverage_get ()

PangoCoverageLevel pango_coverage_get       (PangoCoverage *coverage,
                                             int index);

Determine whether a particular index is covered by coverage

coverage : a PangoCoverage
index : the index to check
Returns : 


pango_coverage_max ()

void        pango_coverage_max              (PangoCoverage *coverage,
                                             PangoCoverage *other);

Set the coverage for each index in coverage to be the max (better) value of the current coverage for the index and the coverage for the corresponding index in other.

coverage : a PangoCoverage
other : another PangoCoverage


pango_coverage_set ()

void        pango_coverage_set              (PangoCoverage *coverage,
                                             int index,
                                             PangoCoverageLevel level);

Modify a particular index within coverage

coverage : a PangoCoverage
index : the index to modify
level : the new level for index