[style] Fix documentation

Message documentation a bit to get it working.
This commit is contained in:
Khaled Hosny 2021-09-11 00:50:08 +02:00 committed by Behdad Esfahbod
parent 4d9b7de0b6
commit eb4075a1ed
4 changed files with 23 additions and 2 deletions

View File

@ -97,6 +97,11 @@
<xi:include href="xml/hb-directwrite.xml"/>
</chapter>
<chapter id="style-api">
<title>Style API</title>
<xi:include href="xml/hb-style.xml"/>
</chapter>
<chapter id="subset-api">
<title>Subset API</title>
<xi:include href="xml/hb-subset.xml"/>

View File

@ -707,6 +707,12 @@ hb_version_atleast
hb_version_string
</SECTION>
<SECTION>
<FILE>hb-style</FILE>
hb_style_tag_t
hb_style_get_value
</SECTION>
<SECTION>
<FILE>hb-subset</FILE>
hb_subset_flags_t

View File

@ -34,6 +34,15 @@
#include "hb-ot-post-table.hh"
#include "hb-ot-face.hh"
/**
* SECTION:hb-style
* @title: hb-style
* @short_description: Font Styles
* @include: hb.h
*
* Functions for fetching style information from fonts.
**/
static inline float
_hb_angle_to_ratio (float a)
{
@ -52,7 +61,7 @@ _hb_ratio_to_angle (float r)
* @font: a #hb_font_t object.
* @style_tag: a style tag.
*
* Searches variation axes of a hb_font_t object for a specific axis first,
* Searches variation axes of a #hb_font_t object for a specific axis first,
* if not set, then tries to get default style values from different
* tables of the font.
*

View File

@ -44,6 +44,7 @@ HB_BEGIN_DECLS
* must be greater than -90 and less than +90. Values can be interpreted as
* the angle, in counter-clockwise degrees, of oblique slant from whatever the
* designer considers to be upright for that font design.
* @HB_STYLE_TAG_SLANT_RATIO: same as @HB_STYLE_TAG_SLANT_ANGLE expression as ratio.
* @HB_STYLE_TAG_WIDTH: Used to vary width of text from narrower to wider.
* Non-zero. Values can be interpreted as a percentage of whatever the font
* designer considers normal width for that font design.
@ -52,7 +53,7 @@ HB_BEGIN_DECLS
* comparison to values for usWeightClass in the OS/2 table,
* or the CSS font-weight property.
*
* Defined by https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg
* Defined by [OpenType Design-Variation Axis Tag Registry](https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg).
*
* Since: REPLACEME
**/