summaryrefslogtreecommitdiff
path: root/pango/pangocairo-fontmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'pango/pangocairo-fontmap.c')
-rw-r--r--pango/pangocairo-fontmap.c97
1 files changed, 49 insertions, 48 deletions
diff --git a/pango/pangocairo-fontmap.c b/pango/pangocairo-fontmap.c
index 120ccb89..5f24ec93 100644
--- a/pango/pangocairo-fontmap.c
+++ b/pango/pangocairo-fontmap.c
@@ -47,29 +47,29 @@ pango_cairo_font_map_default_init (PangoCairoFontMapIface *iface)
/**
* pango_cairo_font_map_new:
*
- * Creates a new #PangoCairoFontMap object; a fontmap is used
+ * Creates a new `PangoCairoFontMap` object; a fontmap is used
* to cache information about available fonts, and holds
* certain global parameters such as the resolution.
- * In most cases, you can use pango_cairo_font_map_get_default()
+ * In most cases, you can use `func@font_map_get_default]
* instead.
*
* Note that the type of the returned object will depend
* on the particular font backend Cairo was compiled to use;
- * You generally should only use the #PangoFontMap and
- * #PangoCairoFontMap interfaces on the returned object.
+ * You generally should only use the `PangoFontMap` and
+ * `PangoCairoFontMap` interfaces on the returned object.
*
* You can override the type of backend returned by using an
- * environment variable %PANGOCAIRO_BACKEND. Supported types,
+ * environment variable %PANGOCAIRO_BACKEND. Supported types,
* based on your build, are fc (fontconfig), win32, and coretext.
* If requested type is not available, NULL is returned. Ie.
* this is only useful for testing, when at least two backends
* are compiled in.
*
- * Return value: (transfer full): the newly allocated #PangoFontMap,
- * which should be freed with g_object_unref().
+ * Return value: (transfer full): the newly allocated `PangoFontMap`,
+ * which should be freed with g_object_unref().
*
* Since: 1.10
- **/
+ */
PangoFontMap *
pango_cairo_font_map_new (void)
{
@@ -110,20 +110,19 @@ pango_cairo_font_map_new (void)
* pango_cairo_font_map_new_for_font_type:
* @fonttype: desired #cairo_font_type_t
*
- * Creates a new #PangoCairoFontMap object of the type suitable
+ * Creates a new `PangoCairoFontMap` object of the type suitable
* to be used with cairo font backend of type @fonttype.
*
- * In most cases one should simply use @pango_cairo_font_map_new(),
- * or in fact in most of those cases, just use
- * @pango_cairo_font_map_get_default().
+ * In most cases one should simply use [func@font_map_new], or
+ * in fact in most of those cases, just use [func@font_map_get_default].
*
* Return value: (transfer full) (nullable): the newly allocated
- * #PangoFontMap of suitable type which should be freed
- * with g_object_unref(), or %NULL if the requested
- * cairo font backend is not supported / compiled in.
+ * `PangoFontMap` of suitable type which should be freed with
+ * g_object_unref(), or %NULL if the requested cairo font backend
+ * is not supported / compiled in.
*
* Since: 1.18
- **/
+ */
PangoFontMap *
pango_cairo_font_map_new_for_font_type (cairo_font_type_t fonttype)
{
@@ -151,27 +150,28 @@ static GPrivate default_font_map = G_PRIVATE_INIT (g_object_unref); /* MT-safe *
/**
* pango_cairo_font_map_get_default:
*
- * Gets a default #PangoCairoFontMap to use with Cairo.
+ * Gets a default `PangoCairoFontMap` to use with Cairo.
*
- * Note that the type of the returned object will depend
- * on the particular font backend Cairo was compiled to use;
- * You generally should only use the #PangoFontMap and
- * #PangoCairoFontMap interfaces on the returned object.
+ * Note that the type of the returned object will depend on the
+ * particular font backend Cairo was compiled to use; you generally
+ * should only use the `PangoFontMap` and `PangoCairoFontMap`
+ * interfaces on the returned object.
*
* The default Cairo fontmap can be changed by using
- * pango_cairo_font_map_set_default(). This can be used to
- * change the Cairo font backend that the default fontmap
- * uses for example.
+ * [method@PangoCairo.FontMap.set_default]. This can be used to
+ * change the Cairo font backend that the default fontmap uses
+ * for example.
*
* Note that since Pango 1.32.6, the default fontmap is per-thread.
- * Each thread gets its own default fontmap. In this way,
- * PangoCairo can be used safely from multiple threads.
+ * Each thread gets its own default fontmap. In this way, PangoCairo
+ * can be used safely from multiple threads.
*
* Return value: (transfer none): the default PangoCairo fontmap
- * for the current thread. This object is owned by Pango and must not be freed.
+ * for the current thread. This object is owned by Pango and must
+ * not be freed.
*
* Since: 1.10
- **/
+ */
PangoFontMap *
pango_cairo_font_map_get_default (void)
{
@@ -190,24 +190,24 @@ pango_cairo_font_map_get_default (void)
* pango_cairo_font_map_set_default:
* @fontmap: (nullable): The new default font map, or %NULL
*
- * Sets a default #PangoCairoFontMap to use with Cairo.
+ * Sets a default `PangoCairoFontMap` to use with Cairo.
*
* This can be used to change the Cairo font backend that the
- * default fontmap uses for example. The old default font map
+ * default fontmap uses for example. The old default font map
* is unreffed and the new font map referenced.
*
* Note that since Pango 1.32.6, the default fontmap is per-thread.
* This function only changes the default fontmap for
- * the current thread. Default fontmaps of existing threads
+ * the current thread. Default fontmaps of existing threads
* are not changed. Default fontmaps of any new threads will
- * still be created using pango_cairo_font_map_new().
+ * still be created using [func@font_map_new].
*
* A value of %NULL for @fontmap will cause the current default
- * font map to be released and a new default font
- * map to be created on demand, using pango_cairo_font_map_new().
+ * font map to be released and a new default font map to be created
+ * on demand, using [func@font_map_new].
*
* Since: 1.22
- **/
+ */
void
pango_cairo_font_map_set_default (PangoCairoFontMap *fontmap)
{
@@ -221,20 +221,20 @@ pango_cairo_font_map_set_default (PangoCairoFontMap *fontmap)
/**
* pango_cairo_font_map_set_resolution:
- * @fontmap: a #PangoCairoFontMap
+ * @fontmap: a `PangoCairoFontMap`
* @dpi: the resolution in "dots per inch". (Physical inches aren't actually
* involved; the terminology is conventional.)
*
* Sets the resolution for the fontmap. This is a scale factor between
- * points specified in a #PangoFontDescription and Cairo units. The
+ * points specified in a `PangoFontDescription` and Cairo units. The
* default value is 96, meaning that a 10 point font will be 13
* units high. (10 * 96. / 72. = 13.3).
*
* Since: 1.10
- **/
+ */
void
pango_cairo_font_map_set_resolution (PangoCairoFontMap *fontmap,
- double dpi)
+ double dpi)
{
g_return_if_fail (PANGO_IS_CAIRO_FONT_MAP (fontmap));
@@ -243,9 +243,10 @@ pango_cairo_font_map_set_resolution (PangoCairoFontMap *fontmap,
/**
* pango_cairo_font_map_get_resolution:
- * @fontmap: a #PangoCairoFontMap
+ * @fontmap: a `PangoCairoFontMap`
*
- * Gets the resolution for the fontmap. See pango_cairo_font_map_set_resolution()
+ * Gets the resolution for the fontmap.
+ * See [method@PangoCairo.FontMap.set_resolution].
*
* Return value: the resolution in "dots per inch"
*
@@ -261,16 +262,16 @@ pango_cairo_font_map_get_resolution (PangoCairoFontMap *fontmap)
/**
* pango_cairo_font_map_create_context: (skip)
- * @fontmap: a #PangoCairoFontMap
+ * @fontmap: a `PangoCairoFontMap`
*
- * Create a #PangoContext for the given fontmap.
+ * Create a `PangoContext` for the given fontmap.
*
* Return value: the newly created context; free with g_object_unref().
*
* Since: 1.10
*
* Deprecated: 1.22: Use pango_font_map_create_context() instead.
- **/
+ */
PangoContext *
pango_cairo_font_map_create_context (PangoCairoFontMap *fontmap)
{
@@ -281,14 +282,14 @@ pango_cairo_font_map_create_context (PangoCairoFontMap *fontmap)
/**
* pango_cairo_font_map_get_font_type:
- * @fontmap: a #PangoCairoFontMap
+ * @fontmap: a `PangoCairoFontMap`
*
- * Gets the type of Cairo font backend that @fontmap uses.
+ * Gets the type of Cairo font backend that @fontmap uses.
*
- * Return value: the #cairo_font_type_t cairo font backend type
+ * Return value: the `cairo_font_type_t` cairo font backend type
*
* Since: 1.18
- **/
+ */
cairo_font_type_t
pango_cairo_font_map_get_font_type (PangoCairoFontMap *fontmap)
{