[docs] Improve code blocks

GTK-Doc does not seem to support mark down code blocks markup. Use the
other way, and mark the language as plain text because code coloring
looks a bit ugly.
This commit is contained in:
Khaled Hosny committed 2026-03-08 00:03:57 +02:00
1 parent c4eafe606c
commit 0e35bd4896
3 files changed
+17 -15

No files matched your search

+9 -9
View File
@@ -439,9 +439,9 @@ _hb_buffer_serialize_unicode_text (hb_buffer_t *buffer,
* A human-readable, plain text format.
* The serialized glyphs will look something like:
*
* ```
* |[<!-- language="plain" -->
* [uni0651=0@518,0+0|uni0628=0+1897]
* ```
* ]|
*
* - The serialized glyphs are delimited with `[` and `]`.
* - Glyphs are separated with `|`
@@ -457,10 +457,10 @@ _hb_buffer_serialize_unicode_text (hb_buffer_t *buffer,
* A machine-readable, structured format.
* The serialized glyphs will look something like:
*
* ```
* |[<!-- language="plain" -->
* [{"g":"uni0651","cl":0,"dx":518,"dy":0,"ax":0,"ay":0},
* {"g":"uni0628","cl":0,"dx":0,"dy":0,"ax":1897,"ay":0}]
* ```
* {"g":"uni0628","cl":0,"dx":0,"dy":0,"ax":1897,"ay":0}]
* ]|
*
* Each glyph is a JSON object, with the following properties:
* - `g`: the glyph name or glyph index if
@@ -552,9 +552,9 @@ hb_buffer_serialize_glyphs (hb_buffer_t *buffer,
* A human-readable, plain text format.
* The serialized codepoints will look something like:
*
* ```
* |[<!-- language="plain" -->
*  <U+0651=0|U+0628=1>
* ```
* ]|
*
* - Glyphs are separated with `|`
* - Unicode codepoints are expressed as zero-padded four (or more)
@@ -572,9 +572,9 @@ hb_buffer_serialize_glyphs (hb_buffer_t *buffer,
*
* For example:
*
* ```
* |[<!-- language="plain" -->
* [{u:1617,cl:0},{u:1576,cl:1}]
* ```
* ]|
*
* Return value:
* The number of serialized items.
+2 -2
View File
@@ -1785,11 +1785,11 @@ hb_raster_paint_get_scale_factor (hb_raster_paint_t *paint,
*
* Call this before hb_font_paint_glyph() for each render.
* A common pattern is:
* ```
* |[<!-- language="plain" -->
* hb_glyph_extents_t gext;
* if (hb_font_get_glyph_extents (font, gid, &gext))
* hb_raster_paint_set_glyph_extents (paint, &gext);
* ```
* ]|
*
* Since: 13.0.0
**/
+6 -4
View File
@@ -38,18 +38,20 @@
*
* #hb_raster_draw_t rasterizes outline geometry and always outputs
* @HB_RASTER_FORMAT_A8. Typical flow:
* ```
*
* |[<!-- language="plain" -->
* hb_raster_draw_t *draw = hb_raster_draw_create_or_fail ();
* hb_raster_draw_set_scale_factor (draw, 64.f, 64.f);
* hb_raster_draw_set_transform (draw, 1.f, 0.f, 0.f, 1.f, 0.f, 0.f);
* hb_raster_draw_set_glyph_extents (draw, &glyph_extents);
* hb_raster_draw_glyph (draw, font, gid, pen_x, pen_y);
* hb_raster_image_t *mask = hb_raster_draw_render (draw);
* ```
* ]|
*
* #hb_raster_paint_t renders color paint graphs and always outputs
* @HB_RASTER_FORMAT_BGRA32. Typical flow:
* ```
*
* |[<!-- language="plain" -->
* hb_raster_paint_t *paint = hb_raster_paint_create_or_fail ();
* hb_raster_paint_set_scale_factor (paint, 64.f, 64.f);
* hb_raster_paint_set_transform (paint, 1.f, 0.f, 0.f, 1.f, 0.f, 0.f);
@@ -59,7 +61,7 @@
* hb_raster_paint_set_glyph_extents (paint, &glyph_extents);
* hb_raster_paint_glyph (paint, font, gid, pen_x, pen_y, 0, foreground);
* hb_raster_image_t *img = hb_raster_paint_render (paint);
* ```
* ]|
*
* In both modes, set extents explicitly (or via glyph extents) before
* rendering to avoid implicit allocations and to get deterministic bounds.