Cairo.Font_Options

Entities

Subprograms

Description

A set of utilities to manipulate font options.

<c_version>1.8.8</c_version> <group>Cairo</group>

Copy

function Copy
  (Original : Cairo_Font_Options)
   return     Cairo_Font_Options

Allocates a new font options object copying the option values from original.

Parameters
Original

a Cairo_Font_Options

Return Value

a newly allocated Cairo_Font_Options. Free with Cairo.Font_Options.Destroy. If memory cannot be allocated, then a special error object is returned where all operations on the object do nothing. You can check for this with Cairo.Font_Options.Status.

Create

function Create return Cairo_Font_Options

Allocates a new font options object with all options initialized to default values.

Return Value

a newly allocated Cairo_Font_Options. Free with Cairo.Font_Options.Destroy. If memory cannot be allocated, then a special error object is returned where all operations on the object do nothing. You can check for this with Cairo.Font_Options.Status.

Destroy

procedure Destroy (Options : Cairo_Font_Options)

Destroys a Cairo_Font_Options object created with Cairo.Font_Options.Create or Cairo.Font_Options.Copy.

Parameters
Options

a Cairo_Font_Options

Equal

function Equal
  (Options : Cairo_Font_Options;
   Other   : Cairo_Font_Options)
   return    Boolean

Compares two font options objects for equality.

Parameters
Options

a Cairo_Font_Options

Other

another Cairo_Font_Options

Return Value

True if all fields of the two font options objects match. Note that this function will return False if either object is in error.

Get_Antialias

function Get_Antialias
  (Options : Cairo_Font_Options)
   return    Cairo_Antialias

Gets the antialiasing mode for the font options object.

Parameters
Options

a Cairo_Font_Options

Return Value

the antialiasing mode

Get_Hint_Metrics

function Get_Hint_Metrics
  (Options : Cairo_Font_Options)
   return    Cairo_Hint_Metrics

Gets the metrics hinting mode for the font options object. See the documentation for Cairo_Hint_Metrics for full details.

Parameters
Options

a Cairo_Font_Options

Return Value

the metrics hinting mode for the font options object

Get_Hint_Style

function Get_Hint_Style
  (Options : Cairo_Font_Options)
   return    Cairo_Hint_Style

Gets the hint style for font outlines for the font options object. See the documentation for Cairo_Hint_Style for full details.

Parameters
Options

a Cairo_Font_Options

Return Value

the hint style for the font options object

Get_Subpixel_Order

function Get_Subpixel_Order
  (Options : Cairo_Font_Options)
   return    Cairo_Subpixel_Order

Gets the subpixel order for the font options object. See the documentation for Cairo_Subpixel_Order for full details.

Parameters
Options

a Cairo_Font_Options

Return Value

the subpixel order for the font options object

Hash

function Hash
  (Options : Cairo_Font_Options)
   return    Gulong

Compute a hash for the font options object; this value will be useful when storing an object containing a Cairo_Font_Options in a hash table.

Parameters
Options

a Cairo_Font_Options

Return Value

the hash value for the font options object. The return value can be cast to a 32-bit type if a 32-bit hash value is needed.

Merge

procedure Merge
  (Options : Cairo_Font_Options;
   Other   : Cairo_Font_Options)

Merges non-default options from other into options, replacing existing values. This operation can be thought of as somewhat similar to compositing other onto options with the operation of Cairo_Operation_Over.

Parameters
Options

a Cairo_Font_Options

Other

anOther Cairo_Font_Options

Set_Antialias

procedure Set_Antialias
  (Options   : Cairo_Font_Options;
   Antialias : Cairo_Antialias)

Sets the antialiasing mode for the font options object. This specifies the type of antialiasing to do when rendering text.

Parameters
Options

a Cairo_Font_Options

Antialias

the new Antialiasing mode

Set_Hint_Metrics

procedure Set_Hint_Metrics
  (Options      : Cairo_Font_Options;
   Hint_Metrics : Cairo_Hint_Metrics)

Sets the metrics hinting mode for the font options object. This controls whether metrics are quantized to integer values in device units. See the documentation for Cairo_Hint_Metrics for full details.

Parameters
Options

a Cairo_Font_Options

Hint_Metrics

the new metrics hinting mode

Set_Hint_Style

procedure Set_Hint_Style
  (Options    : Cairo_Font_Options;
   Hint_Style : Cairo_Hint_Style)

Sets the hint style for font outlines for the font options object. This controls whether to fit font outlines to the pixel grid, and if so, whether to optimize for fidelity or contrast. See the documentation for Cairo_Hint_Style for full details.

Parameters
Options

a Cairo_Font_Options

Hint_Style

the new hint style

Set_Subpixel_Order

procedure Set_Subpixel_Order
  (Options        : Cairo_Font_Options;
   Subpixel_Order : Cairo_Subpixel_Order)

Sets the subpixel order for the font options object. The subpixel order specifies the order of color elements within each pixel on the display device when rendering with an antialiasing mode of Cairo_Antialias_Subpixel. See the documentation for Cairo_Subpixel_Order for full details.

Parameters
Options

a Cairo_Font_Options

Subpixel_Order

the new subpixel order

Status

function Status (Options : Cairo_Font_Options) return Cairo_Status

Checks whether an error has previously occurred for this font options object

Parameters
Options

a Cairo_Font_Options

Return Value

Cairo_Status_Success or Cairo_Status_No_Memory