Name
pcontext:GetMetrics -- get metrics
Synopsis
metrics = pcontext:GetMetrics(desc, language)
Function
Get overall metric information for a particular font description.

Since the metrics may be substantially different for different scripts, a language tag can be provided to indicate that the metrics should be retrieved that correspond to the script(s) used by that language.

The Pango font description is interpreted in the same way as by pcontext:Itemize(), and the family name may be a comma separated list of names. If characters from multiple of these families would be used to render the string, then the returned fonts would be a composite of the metrics for the fonts loaded for the individual families.

This function returns a Pango font metrics object. The caller must call pfontmetrics:Free() when finished using the object.

Inputs
desc
a Pango font description structure; Nil means that the font description from the context will be used
language
language tag used to determine which script to get the metrics for; Nil means that the language tag from the context will be used; if no language tag is set on the context, metrics for the default language (as determined bypango.GetDefaultLanguage() will be returned
Results
metrics
a Pango font metrics object

Show TOC