![]() |
|
|||
File indexing completed on 2025-02-21 10:04:02
0001 /* 0002 * Copyright © 2019 Ebrahim Byagowi 0003 * 0004 * This is part of HarfBuzz, a text shaping library. 0005 * 0006 * Permission is hereby granted, without written agreement and without 0007 * license or royalty fees, to use, copy, modify, and distribute this 0008 * software and its documentation for any purpose, provided that the 0009 * above copyright notice and the following two paragraphs appear in 0010 * all copies of this software. 0011 * 0012 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 0013 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 0014 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 0015 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 0016 * DAMAGE. 0017 * 0018 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 0019 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 0020 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 0021 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 0022 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 0023 */ 0024 0025 #if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) 0026 #error "Include <hb.h> instead." 0027 #endif 0028 0029 #ifndef HB_STYLE_H 0030 #define HB_STYLE_H 0031 0032 #include "hb.h" 0033 0034 HB_BEGIN_DECLS 0035 0036 /** 0037 * hb_style_tag_t: 0038 * @HB_STYLE_TAG_ITALIC: Used to vary between non-italic and italic. 0039 * A value of 0 can be interpreted as "Roman" (non-italic); a value of 1 can 0040 * be interpreted as (fully) italic. 0041 * @HB_STYLE_TAG_OPTICAL_SIZE: Used to vary design to suit different text sizes. 0042 * Non-zero. Values can be interpreted as text size, in points. 0043 * @HB_STYLE_TAG_SLANT_ANGLE: Used to vary between upright and slanted text. Values 0044 * must be greater than -90 and less than +90. Values can be interpreted as 0045 * the angle, in counter-clockwise degrees, of oblique slant from whatever the 0046 * designer considers to be upright for that font design. Typical right-leaning 0047 * Italic fonts have a negative slant angle (typically around -12) 0048 * @HB_STYLE_TAG_SLANT_RATIO: same as @HB_STYLE_TAG_SLANT_ANGLE expression as ratio. 0049 * Typical right-leaning Italic fonts have a positive slant ratio (typically around 0.2) 0050 * @HB_STYLE_TAG_WIDTH: Used to vary width of text from narrower to wider. 0051 * Non-zero. Values can be interpreted as a percentage of whatever the font 0052 * designer considers “normal width” for that font design. 0053 * @HB_STYLE_TAG_WEIGHT: Used to vary stroke thicknesses or other design details 0054 * to give variation from lighter to blacker. Values can be interpreted in direct 0055 * comparison to values for usWeightClass in the OS/2 table, 0056 * or the CSS font-weight property. 0057 * 0058 * Defined by [OpenType Design-Variation Axis Tag Registry](https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg). 0059 * 0060 * Since: 3.0.0 0061 **/ 0062 typedef enum 0063 { 0064 HB_STYLE_TAG_ITALIC = HB_TAG ('i','t','a','l'), 0065 HB_STYLE_TAG_OPTICAL_SIZE = HB_TAG ('o','p','s','z'), 0066 HB_STYLE_TAG_SLANT_ANGLE = HB_TAG ('s','l','n','t'), 0067 HB_STYLE_TAG_SLANT_RATIO = HB_TAG ('S','l','n','t'), 0068 HB_STYLE_TAG_WIDTH = HB_TAG ('w','d','t','h'), 0069 HB_STYLE_TAG_WEIGHT = HB_TAG ('w','g','h','t'), 0070 0071 /*< private >*/ 0072 _HB_STYLE_TAG_MAX_VALUE = HB_TAG_MAX_SIGNED /*< skip >*/ 0073 } hb_style_tag_t; 0074 0075 0076 HB_EXTERN float 0077 hb_style_get_value (hb_font_t *font, hb_style_tag_t style_tag); 0078 0079 HB_END_DECLS 0080 0081 #endif /* HB_STYLE_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |