[style] Prepare for release

This commit is contained in:
Khaled Hosny 2021-09-11 00:43:43 +02:00 committed by Behdad Esfahbod
parent 34ff2d3ea6
commit 4d9b7de0b6
4 changed files with 38 additions and 52 deletions

View File

@ -36,7 +36,6 @@ hb_draw_funcs_set_cubic_to_func
hb_draw_funcs_set_line_to_func
hb_draw_funcs_set_move_to_func
hb_draw_funcs_set_quadratic_to_func
hb_style_get_value
hb_font_get_var_coords_design""".splitlines ()
symbols = [x for x in symbols if x not in experimental_symbols]
symbols = "\n".join (symbols)

View File

@ -25,7 +25,6 @@
#include "hb.hh"
#ifndef HB_NO_STYLE
#ifdef HB_EXPERIMENTAL_API
#include "hb-ot-var-avar-table.hh"
#include "hb-ot-var-fvar-table.hh"
@ -35,42 +34,6 @@
#include "hb-ot-post-table.hh"
#include "hb-ot-face.hh"
/**
* hb_style_tag_t:
* @HB_STYLE_TAG_ITALIC: Used to vary between non-italic and italic.
* A value of 0 can be interpreted as "Roman" (non-italic); a value of 1 can
* be interpreted as (fully) italic.
* @HB_STYLE_TAG_OPTICAL_SIZE: Used to vary design to suit different text sizes.
* Non-zero. Values can be interpreted as text size, in points.
* @HB_STYLE_TAG_SLANT_ANGLE: Used to vary between upright and slanted text. Values
* 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_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.
* @HB_STYLE_TAG_WEIGHT: Used to vary stroke thicknesses or other design details
* to give variation from lighter to blacker. Values can be interpreted in direct
* 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
*
* Since: EXPERIMENTAL
**/
typedef enum
{
HB_STYLE_TAG_ITALIC = HB_TAG ('i','t','a','l'),
HB_STYLE_TAG_OPTICAL_SIZE = HB_TAG ('o','p','s','z'),
HB_STYLE_TAG_SLANT_ANGLE = HB_TAG ('s','l','n','t'),
HB_STYLE_TAG_SLANT_RATIO = HB_TAG ('s','l','n','T'),
HB_STYLE_TAG_WIDTH = HB_TAG ('w','d','t','h'),
HB_STYLE_TAG_WEIGHT = HB_TAG ('w','g','h','t'),
/*< private >*/
_HB_STYLE_TAG_MAX_VALUE = HB_TAG_MAX_SIGNED /*< skip >*/
} hb_style_tag_t;
static inline float
_hb_angle_to_ratio (float a)
{
@ -95,7 +58,7 @@ _hb_ratio_to_angle (float r)
*
* Returns: Corresponding axis or default value to a style tag.
*
* Since: EXPERIMENTAL
* Since: REPLACEME
**/
float
hb_style_get_value (hb_font_t *font, hb_tag_t tag)
@ -153,4 +116,3 @@ hb_style_get_value (hb_font_t *font, hb_tag_t tag)
}
#endif
#endif

View File

@ -33,10 +33,45 @@
HB_BEGIN_DECLS
#ifdef HB_EXPERIMENTAL_API
/**
* hb_style_tag_t:
* @HB_STYLE_TAG_ITALIC: Used to vary between non-italic and italic.
* A value of 0 can be interpreted as "Roman" (non-italic); a value of 1 can
* be interpreted as (fully) italic.
* @HB_STYLE_TAG_OPTICAL_SIZE: Used to vary design to suit different text sizes.
* Non-zero. Values can be interpreted as text size, in points.
* @HB_STYLE_TAG_SLANT_ANGLE: Used to vary between upright and slanted text. Values
* 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_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.
* @HB_STYLE_TAG_WEIGHT: Used to vary stroke thicknesses or other design details
* to give variation from lighter to blacker. Values can be interpreted in direct
* 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
*
* Since: REPLACEME
**/
typedef enum
{
HB_STYLE_TAG_ITALIC = HB_TAG ('i','t','a','l'),
HB_STYLE_TAG_OPTICAL_SIZE = HB_TAG ('o','p','s','z'),
HB_STYLE_TAG_SLANT_ANGLE = HB_TAG ('s','l','n','t'),
HB_STYLE_TAG_SLANT_RATIO = HB_TAG ('s','l','n','T'),
HB_STYLE_TAG_WIDTH = HB_TAG ('w','d','t','h'),
HB_STYLE_TAG_WEIGHT = HB_TAG ('w','g','h','t'),
/*< private >*/
_HB_STYLE_TAG_MAX_VALUE = HB_TAG_MAX_SIGNED /*< skip >*/
} hb_style_tag_t;
HB_EXTERN float
hb_style_get_value (hb_font_t *font, hb_tag_t style_tag);
#endif
HB_END_DECLS

View File

@ -22,7 +22,6 @@
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
#ifdef HB_EXPERIMENTAL_API
#include "hb-test.h"
#include <hb.h>
@ -31,12 +30,6 @@
#define assert_cmpfloat(n1, n2) g_assert_cmpint ((int) (n1 * 100.f), ==, (int) (n2 * 100.f))
#define HB_STYLE_TAG_ITALIC HB_TAG ('i','t','a','l')
#define HB_STYLE_TAG_OPTICAL_SIZE HB_TAG ('o','p','s','z')
#define HB_STYLE_TAG_SLANT_ANGLE HB_TAG ('s','l','n','t')
#define HB_STYLE_TAG_WIDTH HB_TAG ('w','d','t','h')
#define HB_STYLE_TAG_WEIGHT HB_TAG ('w','g','h','t')
static void
test_empty_face (void)
{
@ -165,6 +158,3 @@ main (int argc, char **argv)
return hb_test_run ();
}
#else
int main (int argc, char **argv) {}
#endif