A set of utilities to manipulate font options.
<c_version>1.8.8</c_version> <group>Cairo</group>
function Copy
(Original : Cairo_Font_Options)
return Cairo_Font_Options
Allocates a new font options object copying the option values from original.
a Cairo_Font_Options
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.
function Create return Cairo_Font_Options
Allocates a new font options object with all options initialized to default values.
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.
procedure Destroy (Options : Cairo_Font_Options)
Destroys a Cairo_Font_Options object created with Cairo.Font_Options.Create or Cairo.Font_Options.Copy.
a Cairo_Font_Options
function Equal
(Options : Cairo_Font_Options;
Other : Cairo_Font_Options)
return Boolean
Compares two font options objects for equality.
a Cairo_Font_Options
another Cairo_Font_Options
True if all fields of the two font options objects match. Note that this function will return False if either object is in error.
function Get_Antialias
(Options : Cairo_Font_Options)
return Cairo_Antialias
Gets the antialiasing mode for the font options object.
a Cairo_Font_Options
the antialiasing mode
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.
a Cairo_Font_Options
the metrics hinting mode for the font options object
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.
a Cairo_Font_Options
the hint style for the font options object
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.
a Cairo_Font_Options
the subpixel order for the font options object
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.
a Cairo_Font_Options
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.
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.
a Cairo_Font_Options
anOther Cairo_Font_Options
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.
a Cairo_Font_Options
the new Antialiasing mode
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.
a Cairo_Font_Options
the new metrics hinting mode
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.
a Cairo_Font_Options
the new hint style
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.
a Cairo_Font_Options
the new subpixel order
function Status (Options : Cairo_Font_Options) return Cairo_Status
Checks whether an error has previously occurred for this font options object
a Cairo_Font_Options
Cairo_Status_Success or Cairo_Status_No_Memory