Class: Pango::Coverage

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Overview

A PangoCoverage structure is a map from Unicode characters to [enumPango.CoverageLevel] values.

It is often necessary in Pango to determine if a particular 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. It is an opaque structure with no public fields.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePango::Coverage

Create a new PangoCoverage

Class Method Details

.from_bytes(bytes, n_bytes) ⇒ Pango::Coverage

Convert data generated from [methodPango.Coverage.to_bytes] back to a PangoCoverage.

Parameters:

  • bytes (Array<Integer>)

    binary data representing a PangoCoverage

  • n_bytes (Integer)

    the size of bytes in bytes

Returns:

Instance Method Details

#copyPango::Coverage

Copy an existing PangoCoverage.

Returns:

  • (Pango::Coverage)

    the newly allocated PangoCoverage, with a reference count of one, which should be freed with [methodPango.Coverage.unref].

#get(index_) ⇒ Pango::CoverageLevel

Determine whether a particular index is covered by coverage.

Parameters:

  • index_ (Integer)

    the index to check

Returns:

#max(other) ⇒ nil

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.

Parameters:

Returns:

  • (nil)

#refPango::Coverage

Increase the reference count on the PangoCoverage by one.

Returns:

#set(index_, level) ⇒ nil

Modify a particular index within coverage

Parameters:

  • index_ (Integer)

    the index to modify

  • level (Pango::CoverageLevel)

    the new level for index_

Returns:

  • (nil)

#to_bytes(bytes, n_bytes) ⇒ nil

Convert a PangoCoverage structure into a flat binary format.

Parameters:

  • bytes (Array<Integer>)

    location to store result (must be freed with g_free())

  • n_bytes (Integer)

    location to store size of result

Returns:

  • (nil)

#unrefnil

Decrease the reference count on the PangoCoverage by one.

If the result is zero, free the coverage and all associated memory.

Returns:

  • (nil)