jassub 1.7.11 → 1.7.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -22
- package/README.md +251 -251
- package/dist/COPYRIGHT +951 -951
- package/dist/jassub-worker.wasm.js +1 -1
- package/dist/jassub.es.js +1 -1
- package/dist/jassub.umd.js +1 -1
- package/dist/js/jassub-worker.js +4 -4
- package/dist/js/jassub-worker.wasm +0 -0
- package/dist/js/jassub-worker.wasm.js +26 -25
- package/dist/js/jassub.js +832 -832
- package/dist/libraries/bin/brotli.js +1 -0
- package/dist/libraries/include/ass/ass.h +812 -0
- package/dist/libraries/include/ass/ass_types.h +292 -0
- package/dist/libraries/include/brotli/decode.h +344 -0
- package/dist/libraries/include/brotli/encode.h +448 -0
- package/dist/libraries/include/brotli/port.h +288 -0
- package/dist/libraries/include/brotli/types.h +83 -0
- package/dist/libraries/include/expat.h +1064 -0
- package/dist/libraries/include/expat_config.h +115 -0
- package/dist/libraries/include/expat_external.h +165 -0
- package/dist/libraries/include/fontconfig/fcfreetype.h +59 -0
- package/dist/libraries/include/fontconfig/fcprivate.h +134 -0
- package/dist/libraries/include/fontconfig/fontconfig.h +1154 -0
- package/dist/libraries/include/freetype2/freetype/config/ftconfig.h +63 -0
- package/dist/libraries/include/freetype2/freetype/config/ftheader.h +824 -0
- package/dist/libraries/include/freetype2/freetype/config/ftmodule.h +20 -0
- package/dist/libraries/include/freetype2/freetype/config/ftoption.h +1011 -0
- package/dist/libraries/include/freetype2/freetype/config/ftstdlib.h +175 -0
- package/dist/libraries/include/freetype2/freetype/config/integer-types.h +245 -0
- package/dist/libraries/include/freetype2/freetype/config/mac-support.h +49 -0
- package/dist/libraries/include/freetype2/freetype/config/public-macros.h +120 -0
- package/dist/libraries/include/freetype2/freetype/freetype.h +4833 -0
- package/dist/libraries/include/freetype2/freetype/ftadvanc.h +188 -0
- package/dist/libraries/include/freetype2/freetype/ftbbox.h +101 -0
- package/dist/libraries/include/freetype2/freetype/ftbdf.h +212 -0
- package/dist/libraries/include/freetype2/freetype/ftbitmap.h +329 -0
- package/dist/libraries/include/freetype2/freetype/ftbzip2.h +102 -0
- package/dist/libraries/include/freetype2/freetype/ftcache.h +1087 -0
- package/dist/libraries/include/freetype2/freetype/ftchapters.h +147 -0
- package/dist/libraries/include/freetype2/freetype/ftcid.h +167 -0
- package/dist/libraries/include/freetype2/freetype/ftcolor.h +1609 -0
- package/dist/libraries/include/freetype2/freetype/ftdriver.h +1193 -0
- package/dist/libraries/include/freetype2/freetype/fterrdef.h +279 -0
- package/dist/libraries/include/freetype2/freetype/fterrors.h +296 -0
- package/dist/libraries/include/freetype2/freetype/ftfntfmt.h +93 -0
- package/dist/libraries/include/freetype2/freetype/ftgasp.h +143 -0
- package/dist/libraries/include/freetype2/freetype/ftglyph.h +664 -0
- package/dist/libraries/include/freetype2/freetype/ftgxval.h +354 -0
- package/dist/libraries/include/freetype2/freetype/ftgzip.h +151 -0
- package/dist/libraries/include/freetype2/freetype/ftimage.h +1276 -0
- package/dist/libraries/include/freetype2/freetype/ftincrem.h +348 -0
- package/dist/libraries/include/freetype2/freetype/ftlcdfil.h +323 -0
- package/dist/libraries/include/freetype2/freetype/ftlist.h +296 -0
- package/dist/libraries/include/freetype2/freetype/ftlogging.h +184 -0
- package/dist/libraries/include/freetype2/freetype/ftlzw.h +100 -0
- package/dist/libraries/include/freetype2/freetype/ftmac.h +289 -0
- package/dist/libraries/include/freetype2/freetype/ftmm.h +752 -0
- package/dist/libraries/include/freetype2/freetype/ftmodapi.h +806 -0
- package/dist/libraries/include/freetype2/freetype/ftmoderr.h +204 -0
- package/dist/libraries/include/freetype2/freetype/ftotval.h +206 -0
- package/dist/libraries/include/freetype2/freetype/ftoutln.h +586 -0
- package/dist/libraries/include/freetype2/freetype/ftparams.h +203 -0
- package/dist/libraries/include/freetype2/freetype/ftpfr.h +179 -0
- package/dist/libraries/include/freetype2/freetype/ftrender.h +244 -0
- package/dist/libraries/include/freetype2/freetype/ftsizes.h +159 -0
- package/dist/libraries/include/freetype2/freetype/ftsnames.h +272 -0
- package/dist/libraries/include/freetype2/freetype/ftstroke.h +773 -0
- package/dist/libraries/include/freetype2/freetype/ftsynth.h +83 -0
- package/dist/libraries/include/freetype2/freetype/ftsystem.h +352 -0
- package/dist/libraries/include/freetype2/freetype/fttrigon.h +350 -0
- package/dist/libraries/include/freetype2/freetype/fttypes.h +615 -0
- package/dist/libraries/include/freetype2/freetype/ftwinfnt.h +276 -0
- package/dist/libraries/include/freetype2/freetype/t1tables.h +773 -0
- package/dist/libraries/include/freetype2/freetype/ttnameid.h +1235 -0
- package/dist/libraries/include/freetype2/freetype/tttables.h +855 -0
- package/dist/libraries/include/freetype2/freetype/tttags.h +123 -0
- package/dist/libraries/include/freetype2/ft2build.h +42 -0
- package/dist/libraries/include/fribidi/fribidi-arabic.h +81 -0
- package/dist/libraries/include/fribidi/fribidi-begindecls.h +3 -0
- package/dist/libraries/include/fribidi/fribidi-bidi-types-list.h +96 -0
- package/dist/libraries/include/fribidi/fribidi-bidi-types.h +405 -0
- package/dist/libraries/include/fribidi/fribidi-bidi.h +142 -0
- package/dist/libraries/include/fribidi/fribidi-brackets.h +89 -0
- package/dist/libraries/include/fribidi/fribidi-char-sets-list.h +54 -0
- package/dist/libraries/include/fribidi/fribidi-char-sets.h +106 -0
- package/dist/libraries/include/fribidi/fribidi-common.h +158 -0
- package/dist/libraries/include/fribidi/fribidi-config.h +23 -0
- package/dist/libraries/include/fribidi/fribidi-deprecated.h +175 -0
- package/dist/libraries/include/fribidi/fribidi-enddecls.h +3 -0
- package/dist/libraries/include/fribidi/fribidi-flags.h +72 -0
- package/dist/libraries/include/fribidi/fribidi-joining-types-list.h +44 -0
- package/dist/libraries/include/fribidi/fribidi-joining-types.h +249 -0
- package/dist/libraries/include/fribidi/fribidi-joining.h +74 -0
- package/dist/libraries/include/fribidi/fribidi-mirroring.h +86 -0
- package/dist/libraries/include/fribidi/fribidi-shape.h +71 -0
- package/dist/libraries/include/fribidi/fribidi-types.h +79 -0
- package/dist/libraries/include/fribidi/fribidi-unicode-version.h +10 -0
- package/dist/libraries/include/fribidi/fribidi-unicode.h +105 -0
- package/dist/libraries/include/fribidi/fribidi.h +129 -0
- package/dist/libraries/include/harfbuzz/hb-aat-layout.h +795 -0
- package/dist/libraries/include/harfbuzz/hb-aat.h +38 -0
- package/dist/libraries/include/harfbuzz/hb-blob.h +160 -0
- package/dist/libraries/include/harfbuzz/hb-buffer.h +799 -0
- package/dist/libraries/include/harfbuzz/hb-common.h +902 -0
- package/dist/libraries/include/harfbuzz/hb-cplusplus.hh +221 -0
- package/dist/libraries/include/harfbuzz/hb-deprecated.h +251 -0
- package/dist/libraries/include/harfbuzz/hb-draw.h +325 -0
- package/dist/libraries/include/harfbuzz/hb-face.h +181 -0
- package/dist/libraries/include/harfbuzz/hb-font.h +1108 -0
- package/dist/libraries/include/harfbuzz/hb-ft.h +145 -0
- package/dist/libraries/include/harfbuzz/hb-map.h +124 -0
- package/dist/libraries/include/harfbuzz/hb-ot-color.h +146 -0
- package/dist/libraries/include/harfbuzz/hb-ot-deprecated.h +141 -0
- package/dist/libraries/include/harfbuzz/hb-ot-font.h +45 -0
- package/dist/libraries/include/harfbuzz/hb-ot-layout.h +503 -0
- package/dist/libraries/include/harfbuzz/hb-ot-math.h +333 -0
- package/dist/libraries/include/harfbuzz/hb-ot-meta.h +72 -0
- package/dist/libraries/include/harfbuzz/hb-ot-metrics.h +129 -0
- package/dist/libraries/include/harfbuzz/hb-ot-name.h +158 -0
- package/dist/libraries/include/harfbuzz/hb-ot-shape.h +53 -0
- package/dist/libraries/include/harfbuzz/hb-ot-var.h +191 -0
- package/dist/libraries/include/harfbuzz/hb-ot.h +49 -0
- package/dist/libraries/include/harfbuzz/hb-set.h +200 -0
- package/dist/libraries/include/harfbuzz/hb-shape-plan.h +122 -0
- package/dist/libraries/include/harfbuzz/hb-shape.h +62 -0
- package/dist/libraries/include/harfbuzz/hb-style.h +81 -0
- package/dist/libraries/include/harfbuzz/hb-subset-repacker.h +81 -0
- package/dist/libraries/include/harfbuzz/hb-subset.h +234 -0
- package/dist/libraries/include/harfbuzz/hb-unicode.h +643 -0
- package/dist/libraries/include/harfbuzz/hb-version.h +95 -0
- package/dist/libraries/include/harfbuzz/hb.h +50 -0
- package/dist/libraries/lib/cmake/expat-2.4.7/expat-config-version.cmake +70 -0
- package/dist/libraries/lib/cmake/expat-2.4.7/expat-config.cmake +99 -0
- package/dist/libraries/lib/cmake/expat-2.4.7/expat-noconfig.cmake +19 -0
- package/dist/libraries/lib/cmake/expat-2.4.7/expat.cmake +99 -0
- package/dist/libraries/lib/libass.a +0 -0
- package/dist/libraries/lib/libass.la +41 -0
- package/dist/libraries/lib/libbrotlicommon.a +0 -0
- package/dist/libraries/lib/libbrotlidec.a +0 -0
- package/dist/libraries/lib/libbrotlienc.a +0 -0
- package/dist/libraries/lib/libexpat.a +0 -0
- package/dist/libraries/lib/libfontconfig.a +0 -0
- package/dist/libraries/lib/libfontconfig.la +41 -0
- package/dist/libraries/lib/libfreetype.a +0 -0
- package/dist/libraries/lib/libfreetype.la +41 -0
- package/dist/libraries/lib/libfribidi.a +0 -0
- package/dist/libraries/lib/libfribidi.la +41 -0
- package/dist/libraries/lib/libharfbuzz-subset.a +0 -0
- package/dist/libraries/lib/libharfbuzz-subset.la +41 -0
- package/dist/libraries/lib/libharfbuzz.a +0 -0
- package/dist/libraries/lib/libharfbuzz.la +41 -0
- package/dist/libraries/lib/pkgconfig/expat.pc +11 -0
- package/dist/libraries/lib/pkgconfig/fontconfig.pc +18 -0
- package/dist/libraries/lib/pkgconfig/freetype2.pc +14 -0
- package/dist/libraries/lib/pkgconfig/fribidi.pc +13 -0
- package/dist/libraries/lib/pkgconfig/harfbuzz-subset.pc +12 -0
- package/dist/libraries/lib/pkgconfig/harfbuzz.pc +13 -0
- package/dist/libraries/lib/pkgconfig/libass.pc +13 -0
- package/dist/libraries/lib/pkgconfig/libbrotlicommon.pc +11 -0
- package/dist/libraries/lib/pkgconfig/libbrotlidec.pc +12 -0
- package/dist/libraries/lib/pkgconfig/libbrotlienc.pc +12 -0
- package/dist/libraries/share/aclocal/freetype2.m4 +194 -0
- package/dist/libraries/share/doc/expat/AUTHORS +10 -0
- package/dist/libraries/share/doc/expat/changelog +1161 -0
- package/index.d.ts +115 -115
- package/package.json +1 -1
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright © 2016 Igalia S.L.
|
|
3
|
+
*
|
|
4
|
+
* This is part of HarfBuzz, a text shaping library.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, without written agreement and without
|
|
7
|
+
* license or royalty fees, to use, copy, modify, and distribute this
|
|
8
|
+
* software and its documentation for any purpose, provided that the
|
|
9
|
+
* above copyright notice and the following two paragraphs appear in
|
|
10
|
+
* all copies of this software.
|
|
11
|
+
*
|
|
12
|
+
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
|
|
13
|
+
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
|
14
|
+
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
|
|
15
|
+
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
16
|
+
* DAMAGE.
|
|
17
|
+
*
|
|
18
|
+
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
|
|
19
|
+
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
|
21
|
+
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
|
|
22
|
+
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
|
23
|
+
*
|
|
24
|
+
* Igalia Author(s): Frédéric Wang
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
|
|
28
|
+
#error "Include <hb-ot.h> instead."
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
#ifndef HB_OT_MATH_H
|
|
32
|
+
#define HB_OT_MATH_H
|
|
33
|
+
|
|
34
|
+
#include "hb.h"
|
|
35
|
+
|
|
36
|
+
HB_BEGIN_DECLS
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
/*
|
|
40
|
+
* MATH
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* HB_OT_TAG_MATH:
|
|
45
|
+
*
|
|
46
|
+
* OpenType [Mathematical Typesetting Table](https://docs.microsoft.com/en-us/typography/opentype/spec/math).
|
|
47
|
+
*
|
|
48
|
+
* Since: 1.3.3
|
|
49
|
+
*/
|
|
50
|
+
#define HB_OT_TAG_MATH HB_TAG('M','A','T','H')
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* HB_OT_TAG_MATH_SCRIPT:
|
|
54
|
+
*
|
|
55
|
+
* OpenType script tag, `math`, for features specific to math shaping.
|
|
56
|
+
*
|
|
57
|
+
* <note>#HB_OT_TAG_MATH_SCRIPT is not a valid #hb_script_t and should only be
|
|
58
|
+
* used with functions that accept raw OpenType script tags, such as
|
|
59
|
+
* #hb_ot_layout_collect_features. In other cases, #HB_SCRIPT_MATH should be
|
|
60
|
+
* used instead.</note>
|
|
61
|
+
*
|
|
62
|
+
* Since: 3.4.0
|
|
63
|
+
*/
|
|
64
|
+
#define HB_OT_TAG_MATH_SCRIPT HB_TAG('m','a','t','h')
|
|
65
|
+
|
|
66
|
+
/* Types */
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* hb_ot_math_constant_t:
|
|
70
|
+
* @HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN: scriptPercentScaleDown
|
|
71
|
+
* @HB_OT_MATH_CONSTANT_SCRIPT_SCRIPT_PERCENT_SCALE_DOWN: scriptScriptPercentScaleDown
|
|
72
|
+
* @HB_OT_MATH_CONSTANT_DELIMITED_SUB_FORMULA_MIN_HEIGHT: delimitedSubFormulaMinHeight
|
|
73
|
+
* @HB_OT_MATH_CONSTANT_DISPLAY_OPERATOR_MIN_HEIGHT: displayOperatorMinHeight
|
|
74
|
+
* @HB_OT_MATH_CONSTANT_MATH_LEADING: mathLeading
|
|
75
|
+
* @HB_OT_MATH_CONSTANT_AXIS_HEIGHT: axisHeight
|
|
76
|
+
* @HB_OT_MATH_CONSTANT_ACCENT_BASE_HEIGHT: accentBaseHeight
|
|
77
|
+
* @HB_OT_MATH_CONSTANT_FLATTENED_ACCENT_BASE_HEIGHT: flattenedAccentBaseHeight
|
|
78
|
+
* @HB_OT_MATH_CONSTANT_SUBSCRIPT_SHIFT_DOWN: subscriptShiftDown
|
|
79
|
+
* @HB_OT_MATH_CONSTANT_SUBSCRIPT_TOP_MAX: subscriptTopMax
|
|
80
|
+
* @HB_OT_MATH_CONSTANT_SUBSCRIPT_BASELINE_DROP_MIN: subscriptBaselineDropMin
|
|
81
|
+
* @HB_OT_MATH_CONSTANT_SUPERSCRIPT_SHIFT_UP: superscriptShiftUp
|
|
82
|
+
* @HB_OT_MATH_CONSTANT_SUPERSCRIPT_SHIFT_UP_CRAMPED: superscriptShiftUpCramped
|
|
83
|
+
* @HB_OT_MATH_CONSTANT_SUPERSCRIPT_BOTTOM_MIN: superscriptBottomMin
|
|
84
|
+
* @HB_OT_MATH_CONSTANT_SUPERSCRIPT_BASELINE_DROP_MAX: superscriptBaselineDropMax
|
|
85
|
+
* @HB_OT_MATH_CONSTANT_SUB_SUPERSCRIPT_GAP_MIN: subSuperscriptGapMin
|
|
86
|
+
* @HB_OT_MATH_CONSTANT_SUPERSCRIPT_BOTTOM_MAX_WITH_SUBSCRIPT: superscriptBottomMaxWithSubscript
|
|
87
|
+
* @HB_OT_MATH_CONSTANT_SPACE_AFTER_SCRIPT: spaceAfterScript
|
|
88
|
+
* @HB_OT_MATH_CONSTANT_UPPER_LIMIT_GAP_MIN: upperLimitGapMin
|
|
89
|
+
* @HB_OT_MATH_CONSTANT_UPPER_LIMIT_BASELINE_RISE_MIN: upperLimitBaselineRiseMin
|
|
90
|
+
* @HB_OT_MATH_CONSTANT_LOWER_LIMIT_GAP_MIN: lowerLimitGapMin
|
|
91
|
+
* @HB_OT_MATH_CONSTANT_LOWER_LIMIT_BASELINE_DROP_MIN: lowerLimitBaselineDropMin
|
|
92
|
+
* @HB_OT_MATH_CONSTANT_STACK_TOP_SHIFT_UP: stackTopShiftUp
|
|
93
|
+
* @HB_OT_MATH_CONSTANT_STACK_TOP_DISPLAY_STYLE_SHIFT_UP: stackTopDisplayStyleShiftUp
|
|
94
|
+
* @HB_OT_MATH_CONSTANT_STACK_BOTTOM_SHIFT_DOWN: stackBottomShiftDown
|
|
95
|
+
* @HB_OT_MATH_CONSTANT_STACK_BOTTOM_DISPLAY_STYLE_SHIFT_DOWN: stackBottomDisplayStyleShiftDown
|
|
96
|
+
* @HB_OT_MATH_CONSTANT_STACK_GAP_MIN: stackGapMin
|
|
97
|
+
* @HB_OT_MATH_CONSTANT_STACK_DISPLAY_STYLE_GAP_MIN: stackDisplayStyleGapMin
|
|
98
|
+
* @HB_OT_MATH_CONSTANT_STRETCH_STACK_TOP_SHIFT_UP: stretchStackTopShiftUp
|
|
99
|
+
* @HB_OT_MATH_CONSTANT_STRETCH_STACK_BOTTOM_SHIFT_DOWN: stretchStackBottomShiftDown
|
|
100
|
+
* @HB_OT_MATH_CONSTANT_STRETCH_STACK_GAP_ABOVE_MIN: stretchStackGapAboveMin
|
|
101
|
+
* @HB_OT_MATH_CONSTANT_STRETCH_STACK_GAP_BELOW_MIN: stretchStackGapBelowMin
|
|
102
|
+
* @HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_SHIFT_UP: fractionNumeratorShiftUp
|
|
103
|
+
* @HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_DISPLAY_STYLE_SHIFT_UP: fractionNumeratorDisplayStyleShiftUp
|
|
104
|
+
* @HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_SHIFT_DOWN: fractionDenominatorShiftDown
|
|
105
|
+
* @HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_DISPLAY_STYLE_SHIFT_DOWN: fractionDenominatorDisplayStyleShiftDown
|
|
106
|
+
* @HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_GAP_MIN: fractionNumeratorGapMin
|
|
107
|
+
* @HB_OT_MATH_CONSTANT_FRACTION_NUM_DISPLAY_STYLE_GAP_MIN: fractionNumDisplayStyleGapMin
|
|
108
|
+
* @HB_OT_MATH_CONSTANT_FRACTION_RULE_THICKNESS: fractionRuleThickness
|
|
109
|
+
* @HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_GAP_MIN: fractionDenominatorGapMin
|
|
110
|
+
* @HB_OT_MATH_CONSTANT_FRACTION_DENOM_DISPLAY_STYLE_GAP_MIN: fractionDenomDisplayStyleGapMin
|
|
111
|
+
* @HB_OT_MATH_CONSTANT_SKEWED_FRACTION_HORIZONTAL_GAP: skewedFractionHorizontalGap
|
|
112
|
+
* @HB_OT_MATH_CONSTANT_SKEWED_FRACTION_VERTICAL_GAP: skewedFractionVerticalGap
|
|
113
|
+
* @HB_OT_MATH_CONSTANT_OVERBAR_VERTICAL_GAP: overbarVerticalGap
|
|
114
|
+
* @HB_OT_MATH_CONSTANT_OVERBAR_RULE_THICKNESS: overbarRuleThickness
|
|
115
|
+
* @HB_OT_MATH_CONSTANT_OVERBAR_EXTRA_ASCENDER: overbarExtraAscender
|
|
116
|
+
* @HB_OT_MATH_CONSTANT_UNDERBAR_VERTICAL_GAP: underbarVerticalGap
|
|
117
|
+
* @HB_OT_MATH_CONSTANT_UNDERBAR_RULE_THICKNESS: underbarRuleThickness
|
|
118
|
+
* @HB_OT_MATH_CONSTANT_UNDERBAR_EXTRA_DESCENDER: underbarExtraDescender
|
|
119
|
+
* @HB_OT_MATH_CONSTANT_RADICAL_VERTICAL_GAP: radicalVerticalGap
|
|
120
|
+
* @HB_OT_MATH_CONSTANT_RADICAL_DISPLAY_STYLE_VERTICAL_GAP: radicalDisplayStyleVerticalGap
|
|
121
|
+
* @HB_OT_MATH_CONSTANT_RADICAL_RULE_THICKNESS: radicalRuleThickness
|
|
122
|
+
* @HB_OT_MATH_CONSTANT_RADICAL_EXTRA_ASCENDER: radicalExtraAscender
|
|
123
|
+
* @HB_OT_MATH_CONSTANT_RADICAL_KERN_BEFORE_DEGREE: radicalKernBeforeDegree
|
|
124
|
+
* @HB_OT_MATH_CONSTANT_RADICAL_KERN_AFTER_DEGREE: radicalKernAfterDegree
|
|
125
|
+
* @HB_OT_MATH_CONSTANT_RADICAL_DEGREE_BOTTOM_RAISE_PERCENT: radicalDegreeBottomRaisePercent
|
|
126
|
+
*
|
|
127
|
+
* The 'MATH' table constants, refer to
|
|
128
|
+
* [OpenType documentation](https://docs.microsoft.com/en-us/typography/opentype/spec/math#mathconstants-table)
|
|
129
|
+
* For more explanations.
|
|
130
|
+
*
|
|
131
|
+
* Since: 1.3.3
|
|
132
|
+
*/
|
|
133
|
+
typedef enum {
|
|
134
|
+
HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN = 0,
|
|
135
|
+
HB_OT_MATH_CONSTANT_SCRIPT_SCRIPT_PERCENT_SCALE_DOWN = 1,
|
|
136
|
+
HB_OT_MATH_CONSTANT_DELIMITED_SUB_FORMULA_MIN_HEIGHT = 2,
|
|
137
|
+
HB_OT_MATH_CONSTANT_DISPLAY_OPERATOR_MIN_HEIGHT = 3,
|
|
138
|
+
HB_OT_MATH_CONSTANT_MATH_LEADING = 4,
|
|
139
|
+
HB_OT_MATH_CONSTANT_AXIS_HEIGHT = 5,
|
|
140
|
+
HB_OT_MATH_CONSTANT_ACCENT_BASE_HEIGHT = 6,
|
|
141
|
+
HB_OT_MATH_CONSTANT_FLATTENED_ACCENT_BASE_HEIGHT = 7,
|
|
142
|
+
HB_OT_MATH_CONSTANT_SUBSCRIPT_SHIFT_DOWN = 8,
|
|
143
|
+
HB_OT_MATH_CONSTANT_SUBSCRIPT_TOP_MAX = 9,
|
|
144
|
+
HB_OT_MATH_CONSTANT_SUBSCRIPT_BASELINE_DROP_MIN = 10,
|
|
145
|
+
HB_OT_MATH_CONSTANT_SUPERSCRIPT_SHIFT_UP = 11,
|
|
146
|
+
HB_OT_MATH_CONSTANT_SUPERSCRIPT_SHIFT_UP_CRAMPED = 12,
|
|
147
|
+
HB_OT_MATH_CONSTANT_SUPERSCRIPT_BOTTOM_MIN = 13,
|
|
148
|
+
HB_OT_MATH_CONSTANT_SUPERSCRIPT_BASELINE_DROP_MAX = 14,
|
|
149
|
+
HB_OT_MATH_CONSTANT_SUB_SUPERSCRIPT_GAP_MIN = 15,
|
|
150
|
+
HB_OT_MATH_CONSTANT_SUPERSCRIPT_BOTTOM_MAX_WITH_SUBSCRIPT = 16,
|
|
151
|
+
HB_OT_MATH_CONSTANT_SPACE_AFTER_SCRIPT = 17,
|
|
152
|
+
HB_OT_MATH_CONSTANT_UPPER_LIMIT_GAP_MIN = 18,
|
|
153
|
+
HB_OT_MATH_CONSTANT_UPPER_LIMIT_BASELINE_RISE_MIN = 19,
|
|
154
|
+
HB_OT_MATH_CONSTANT_LOWER_LIMIT_GAP_MIN = 20,
|
|
155
|
+
HB_OT_MATH_CONSTANT_LOWER_LIMIT_BASELINE_DROP_MIN = 21,
|
|
156
|
+
HB_OT_MATH_CONSTANT_STACK_TOP_SHIFT_UP = 22,
|
|
157
|
+
HB_OT_MATH_CONSTANT_STACK_TOP_DISPLAY_STYLE_SHIFT_UP = 23,
|
|
158
|
+
HB_OT_MATH_CONSTANT_STACK_BOTTOM_SHIFT_DOWN = 24,
|
|
159
|
+
HB_OT_MATH_CONSTANT_STACK_BOTTOM_DISPLAY_STYLE_SHIFT_DOWN = 25,
|
|
160
|
+
HB_OT_MATH_CONSTANT_STACK_GAP_MIN = 26,
|
|
161
|
+
HB_OT_MATH_CONSTANT_STACK_DISPLAY_STYLE_GAP_MIN = 27,
|
|
162
|
+
HB_OT_MATH_CONSTANT_STRETCH_STACK_TOP_SHIFT_UP = 28,
|
|
163
|
+
HB_OT_MATH_CONSTANT_STRETCH_STACK_BOTTOM_SHIFT_DOWN = 29,
|
|
164
|
+
HB_OT_MATH_CONSTANT_STRETCH_STACK_GAP_ABOVE_MIN = 30,
|
|
165
|
+
HB_OT_MATH_CONSTANT_STRETCH_STACK_GAP_BELOW_MIN = 31,
|
|
166
|
+
HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_SHIFT_UP = 32,
|
|
167
|
+
HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_DISPLAY_STYLE_SHIFT_UP = 33,
|
|
168
|
+
HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_SHIFT_DOWN = 34,
|
|
169
|
+
HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_DISPLAY_STYLE_SHIFT_DOWN = 35,
|
|
170
|
+
HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_GAP_MIN = 36,
|
|
171
|
+
HB_OT_MATH_CONSTANT_FRACTION_NUM_DISPLAY_STYLE_GAP_MIN = 37,
|
|
172
|
+
HB_OT_MATH_CONSTANT_FRACTION_RULE_THICKNESS = 38,
|
|
173
|
+
HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_GAP_MIN = 39,
|
|
174
|
+
HB_OT_MATH_CONSTANT_FRACTION_DENOM_DISPLAY_STYLE_GAP_MIN = 40,
|
|
175
|
+
HB_OT_MATH_CONSTANT_SKEWED_FRACTION_HORIZONTAL_GAP = 41,
|
|
176
|
+
HB_OT_MATH_CONSTANT_SKEWED_FRACTION_VERTICAL_GAP = 42,
|
|
177
|
+
HB_OT_MATH_CONSTANT_OVERBAR_VERTICAL_GAP = 43,
|
|
178
|
+
HB_OT_MATH_CONSTANT_OVERBAR_RULE_THICKNESS = 44,
|
|
179
|
+
HB_OT_MATH_CONSTANT_OVERBAR_EXTRA_ASCENDER = 45,
|
|
180
|
+
HB_OT_MATH_CONSTANT_UNDERBAR_VERTICAL_GAP = 46,
|
|
181
|
+
HB_OT_MATH_CONSTANT_UNDERBAR_RULE_THICKNESS = 47,
|
|
182
|
+
HB_OT_MATH_CONSTANT_UNDERBAR_EXTRA_DESCENDER = 48,
|
|
183
|
+
HB_OT_MATH_CONSTANT_RADICAL_VERTICAL_GAP = 49,
|
|
184
|
+
HB_OT_MATH_CONSTANT_RADICAL_DISPLAY_STYLE_VERTICAL_GAP = 50,
|
|
185
|
+
HB_OT_MATH_CONSTANT_RADICAL_RULE_THICKNESS = 51,
|
|
186
|
+
HB_OT_MATH_CONSTANT_RADICAL_EXTRA_ASCENDER = 52,
|
|
187
|
+
HB_OT_MATH_CONSTANT_RADICAL_KERN_BEFORE_DEGREE = 53,
|
|
188
|
+
HB_OT_MATH_CONSTANT_RADICAL_KERN_AFTER_DEGREE = 54,
|
|
189
|
+
HB_OT_MATH_CONSTANT_RADICAL_DEGREE_BOTTOM_RAISE_PERCENT = 55
|
|
190
|
+
} hb_ot_math_constant_t;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* hb_ot_math_kern_t:
|
|
194
|
+
* @HB_OT_MATH_KERN_TOP_RIGHT: The top right corner of the glyph.
|
|
195
|
+
* @HB_OT_MATH_KERN_TOP_LEFT: The top left corner of the glyph.
|
|
196
|
+
* @HB_OT_MATH_KERN_BOTTOM_RIGHT: The bottom right corner of the glyph.
|
|
197
|
+
* @HB_OT_MATH_KERN_BOTTOM_LEFT: The bottom left corner of the glyph.
|
|
198
|
+
*
|
|
199
|
+
* The math kerning-table types defined for the four corners
|
|
200
|
+
* of a glyph.
|
|
201
|
+
*
|
|
202
|
+
* Since: 1.3.3
|
|
203
|
+
*/
|
|
204
|
+
typedef enum {
|
|
205
|
+
HB_OT_MATH_KERN_TOP_RIGHT = 0,
|
|
206
|
+
HB_OT_MATH_KERN_TOP_LEFT = 1,
|
|
207
|
+
HB_OT_MATH_KERN_BOTTOM_RIGHT = 2,
|
|
208
|
+
HB_OT_MATH_KERN_BOTTOM_LEFT = 3
|
|
209
|
+
} hb_ot_math_kern_t;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* hb_ot_math_kern_entry_t:
|
|
213
|
+
* @max_correction_height: The maximum height at which this entry should be used
|
|
214
|
+
* @kern_value: The kern value of the entry
|
|
215
|
+
*
|
|
216
|
+
* Data type to hold math kerning (cut-in) information for a glyph.
|
|
217
|
+
*
|
|
218
|
+
* Since: 3.4.0
|
|
219
|
+
*/
|
|
220
|
+
typedef struct {
|
|
221
|
+
hb_position_t max_correction_height;
|
|
222
|
+
hb_position_t kern_value;
|
|
223
|
+
} hb_ot_math_kern_entry_t;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* hb_ot_math_glyph_variant_t:
|
|
227
|
+
* @glyph: The glyph index of the variant
|
|
228
|
+
* @advance: The advance width of the variant
|
|
229
|
+
*
|
|
230
|
+
* Data type to hold math-variant information for a glyph.
|
|
231
|
+
*
|
|
232
|
+
* Since: 1.3.3
|
|
233
|
+
*/
|
|
234
|
+
typedef struct hb_ot_math_glyph_variant_t {
|
|
235
|
+
hb_codepoint_t glyph;
|
|
236
|
+
hb_position_t advance;
|
|
237
|
+
} hb_ot_math_glyph_variant_t;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* hb_ot_math_glyph_part_flags_t:
|
|
241
|
+
* @HB_OT_MATH_GLYPH_PART_FLAG_EXTENDER: This is an extender glyph part that
|
|
242
|
+
* can be repeated to reach the desired length.
|
|
243
|
+
*
|
|
244
|
+
* Flags for math glyph parts.
|
|
245
|
+
*
|
|
246
|
+
* Since: 1.3.3
|
|
247
|
+
*/
|
|
248
|
+
typedef enum { /*< flags >*/
|
|
249
|
+
HB_OT_MATH_GLYPH_PART_FLAG_EXTENDER = 0x00000001u /* Extender glyph */
|
|
250
|
+
} hb_ot_math_glyph_part_flags_t;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* hb_ot_math_glyph_part_t:
|
|
254
|
+
* @glyph: The glyph index of the variant part
|
|
255
|
+
* @start_connector_length: The length of the connector on the starting side of the variant part
|
|
256
|
+
* @end_connector_length: The length of the connector on the ending side of the variant part
|
|
257
|
+
* @full_advance: The total advance of the part
|
|
258
|
+
* @flags: #hb_ot_math_glyph_part_flags_t flags for the part
|
|
259
|
+
*
|
|
260
|
+
* Data type to hold information for a "part" component of a math-variant glyph.
|
|
261
|
+
* Large variants for stretchable math glyphs (such as parentheses) can be constructed
|
|
262
|
+
* on the fly from parts.
|
|
263
|
+
*
|
|
264
|
+
* Since: 1.3.3
|
|
265
|
+
*/
|
|
266
|
+
typedef struct hb_ot_math_glyph_part_t {
|
|
267
|
+
hb_codepoint_t glyph;
|
|
268
|
+
hb_position_t start_connector_length;
|
|
269
|
+
hb_position_t end_connector_length;
|
|
270
|
+
hb_position_t full_advance;
|
|
271
|
+
hb_ot_math_glyph_part_flags_t flags;
|
|
272
|
+
} hb_ot_math_glyph_part_t;
|
|
273
|
+
|
|
274
|
+
/* Methods */
|
|
275
|
+
|
|
276
|
+
HB_EXTERN hb_bool_t
|
|
277
|
+
hb_ot_math_has_data (hb_face_t *face);
|
|
278
|
+
|
|
279
|
+
HB_EXTERN hb_position_t
|
|
280
|
+
hb_ot_math_get_constant (hb_font_t *font,
|
|
281
|
+
hb_ot_math_constant_t constant);
|
|
282
|
+
|
|
283
|
+
HB_EXTERN hb_position_t
|
|
284
|
+
hb_ot_math_get_glyph_italics_correction (hb_font_t *font,
|
|
285
|
+
hb_codepoint_t glyph);
|
|
286
|
+
|
|
287
|
+
HB_EXTERN hb_position_t
|
|
288
|
+
hb_ot_math_get_glyph_top_accent_attachment (hb_font_t *font,
|
|
289
|
+
hb_codepoint_t glyph);
|
|
290
|
+
|
|
291
|
+
HB_EXTERN hb_bool_t
|
|
292
|
+
hb_ot_math_is_glyph_extended_shape (hb_face_t *face,
|
|
293
|
+
hb_codepoint_t glyph);
|
|
294
|
+
|
|
295
|
+
HB_EXTERN hb_position_t
|
|
296
|
+
hb_ot_math_get_glyph_kerning (hb_font_t *font,
|
|
297
|
+
hb_codepoint_t glyph,
|
|
298
|
+
hb_ot_math_kern_t kern,
|
|
299
|
+
hb_position_t correction_height);
|
|
300
|
+
|
|
301
|
+
HB_EXTERN unsigned int
|
|
302
|
+
hb_ot_math_get_glyph_kernings (hb_font_t *font,
|
|
303
|
+
hb_codepoint_t glyph,
|
|
304
|
+
hb_ot_math_kern_t kern,
|
|
305
|
+
unsigned int start_offset,
|
|
306
|
+
unsigned int *entries_count, /* IN/OUT */
|
|
307
|
+
hb_ot_math_kern_entry_t *kern_entries /* OUT */);
|
|
308
|
+
|
|
309
|
+
HB_EXTERN unsigned int
|
|
310
|
+
hb_ot_math_get_glyph_variants (hb_font_t *font,
|
|
311
|
+
hb_codepoint_t glyph,
|
|
312
|
+
hb_direction_t direction,
|
|
313
|
+
unsigned int start_offset,
|
|
314
|
+
unsigned int *variants_count, /* IN/OUT */
|
|
315
|
+
hb_ot_math_glyph_variant_t *variants /* OUT */);
|
|
316
|
+
|
|
317
|
+
HB_EXTERN hb_position_t
|
|
318
|
+
hb_ot_math_get_min_connector_overlap (hb_font_t *font,
|
|
319
|
+
hb_direction_t direction);
|
|
320
|
+
|
|
321
|
+
HB_EXTERN unsigned int
|
|
322
|
+
hb_ot_math_get_glyph_assembly (hb_font_t *font,
|
|
323
|
+
hb_codepoint_t glyph,
|
|
324
|
+
hb_direction_t direction,
|
|
325
|
+
unsigned int start_offset,
|
|
326
|
+
unsigned int *parts_count, /* IN/OUT */
|
|
327
|
+
hb_ot_math_glyph_part_t *parts, /* OUT */
|
|
328
|
+
hb_position_t *italics_correction /* OUT */);
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
HB_END_DECLS
|
|
332
|
+
|
|
333
|
+
#endif /* HB_OT_MATH_H */
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright © 2019 Ebrahim Byagowi
|
|
3
|
+
*
|
|
4
|
+
* This is part of HarfBuzz, a text shaping library.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, without written agreement and without
|
|
7
|
+
* license or royalty fees, to use, copy, modify, and distribute this
|
|
8
|
+
* software and its documentation for any purpose, provided that the
|
|
9
|
+
* above copyright notice and the following two paragraphs appear in
|
|
10
|
+
* all copies of this software.
|
|
11
|
+
*
|
|
12
|
+
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
|
|
13
|
+
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
|
14
|
+
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
|
|
15
|
+
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
16
|
+
* DAMAGE.
|
|
17
|
+
*
|
|
18
|
+
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
|
|
19
|
+
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
|
21
|
+
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
|
|
22
|
+
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
|
|
26
|
+
#error "Include <hb-ot.h> instead."
|
|
27
|
+
#endif
|
|
28
|
+
|
|
29
|
+
#ifndef HB_OT_META_H
|
|
30
|
+
#define HB_OT_META_H
|
|
31
|
+
|
|
32
|
+
#include "hb.h"
|
|
33
|
+
|
|
34
|
+
HB_BEGIN_DECLS
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* hb_ot_meta_tag_t:
|
|
38
|
+
* @HB_OT_META_TAG_DESIGN_LANGUAGES: Design languages. Text, using only
|
|
39
|
+
* Basic Latin (ASCII) characters. Indicates languages and/or scripts
|
|
40
|
+
* for the user audiences that the font was primarily designed for.
|
|
41
|
+
* @HB_OT_META_TAG_SUPPORTED_LANGUAGES: Supported languages. Text, using
|
|
42
|
+
* only Basic Latin (ASCII) characters. Indicates languages and/or scripts
|
|
43
|
+
* that the font is declared to be capable of supporting.
|
|
44
|
+
*
|
|
45
|
+
* Known metadata tags from https://docs.microsoft.com/en-us/typography/opentype/spec/meta
|
|
46
|
+
*
|
|
47
|
+
* Since: 2.6.0
|
|
48
|
+
**/
|
|
49
|
+
typedef enum {
|
|
50
|
+
/*
|
|
51
|
+
HB_OT_META_TAG_APPL = HB_TAG ('a','p','p','l'),
|
|
52
|
+
HB_OT_META_TAG_BILD = HB_TAG ('b','i','l','d'),
|
|
53
|
+
*/
|
|
54
|
+
HB_OT_META_TAG_DESIGN_LANGUAGES = HB_TAG ('d','l','n','g'),
|
|
55
|
+
HB_OT_META_TAG_SUPPORTED_LANGUAGES = HB_TAG ('s','l','n','g'),
|
|
56
|
+
|
|
57
|
+
/*< private >*/
|
|
58
|
+
_HB_OT_META_TAG_MAX_VALUE = HB_TAG_MAX_SIGNED /*< skip >*/
|
|
59
|
+
} hb_ot_meta_tag_t;
|
|
60
|
+
|
|
61
|
+
HB_EXTERN unsigned int
|
|
62
|
+
hb_ot_meta_get_entry_tags (hb_face_t *face,
|
|
63
|
+
unsigned int start_offset,
|
|
64
|
+
unsigned int *entries_count, /* IN/OUT. May be NULL. */
|
|
65
|
+
hb_ot_meta_tag_t *entries /* OUT. May be NULL. */);
|
|
66
|
+
|
|
67
|
+
HB_EXTERN hb_blob_t *
|
|
68
|
+
hb_ot_meta_reference_entry (hb_face_t *face, hb_ot_meta_tag_t meta_tag);
|
|
69
|
+
|
|
70
|
+
HB_END_DECLS
|
|
71
|
+
|
|
72
|
+
#endif /* HB_OT_META_H */
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright © 2018 Ebrahim Byagowi
|
|
3
|
+
*
|
|
4
|
+
* This is part of HarfBuzz, a text shaping library.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, without written agreement and without
|
|
7
|
+
* license or royalty fees, to use, copy, modify, and distribute this
|
|
8
|
+
* software and its documentation for any purpose, provided that the
|
|
9
|
+
* above copyright notice and the following two paragraphs appear in
|
|
10
|
+
* all copies of this software.
|
|
11
|
+
*
|
|
12
|
+
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
|
|
13
|
+
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
|
14
|
+
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
|
|
15
|
+
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
16
|
+
* DAMAGE.
|
|
17
|
+
*
|
|
18
|
+
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
|
|
19
|
+
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
|
21
|
+
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
|
|
22
|
+
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
|
|
26
|
+
#error "Include <hb-ot.h> instead."
|
|
27
|
+
#endif
|
|
28
|
+
|
|
29
|
+
#ifndef HB_OT_METRICS_H
|
|
30
|
+
#define HB_OT_METRICS_H
|
|
31
|
+
|
|
32
|
+
#include "hb.h"
|
|
33
|
+
#include "hb-ot-name.h"
|
|
34
|
+
|
|
35
|
+
HB_BEGIN_DECLS
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* hb_ot_metrics_tag_t:
|
|
40
|
+
* @HB_OT_METRICS_TAG_HORIZONTAL_ASCENDER: horizontal ascender.
|
|
41
|
+
* @HB_OT_METRICS_TAG_HORIZONTAL_DESCENDER: horizontal descender.
|
|
42
|
+
* @HB_OT_METRICS_TAG_HORIZONTAL_LINE_GAP: horizontal line gap.
|
|
43
|
+
* @HB_OT_METRICS_TAG_HORIZONTAL_CLIPPING_ASCENT: horizontal clipping ascent.
|
|
44
|
+
* @HB_OT_METRICS_TAG_HORIZONTAL_CLIPPING_DESCENT: horizontal clipping descent.
|
|
45
|
+
* @HB_OT_METRICS_TAG_VERTICAL_ASCENDER: vertical ascender.
|
|
46
|
+
* @HB_OT_METRICS_TAG_VERTICAL_DESCENDER: vertical descender.
|
|
47
|
+
* @HB_OT_METRICS_TAG_VERTICAL_LINE_GAP: vertical line gap.
|
|
48
|
+
* @HB_OT_METRICS_TAG_HORIZONTAL_CARET_RISE: horizontal caret rise.
|
|
49
|
+
* @HB_OT_METRICS_TAG_HORIZONTAL_CARET_RUN: horizontal caret run.
|
|
50
|
+
* @HB_OT_METRICS_TAG_HORIZONTAL_CARET_OFFSET: horizontal caret offset.
|
|
51
|
+
* @HB_OT_METRICS_TAG_VERTICAL_CARET_RISE: vertical caret rise.
|
|
52
|
+
* @HB_OT_METRICS_TAG_VERTICAL_CARET_RUN: vertical caret run.
|
|
53
|
+
* @HB_OT_METRICS_TAG_VERTICAL_CARET_OFFSET: vertical caret offset.
|
|
54
|
+
* @HB_OT_METRICS_TAG_X_HEIGHT: x height.
|
|
55
|
+
* @HB_OT_METRICS_TAG_CAP_HEIGHT: cap height.
|
|
56
|
+
* @HB_OT_METRICS_TAG_SUBSCRIPT_EM_X_SIZE: subscript em x size.
|
|
57
|
+
* @HB_OT_METRICS_TAG_SUBSCRIPT_EM_Y_SIZE: subscript em y size.
|
|
58
|
+
* @HB_OT_METRICS_TAG_SUBSCRIPT_EM_X_OFFSET: subscript em x offset.
|
|
59
|
+
* @HB_OT_METRICS_TAG_SUBSCRIPT_EM_Y_OFFSET: subscript em y offset.
|
|
60
|
+
* @HB_OT_METRICS_TAG_SUPERSCRIPT_EM_X_SIZE: superscript em x size.
|
|
61
|
+
* @HB_OT_METRICS_TAG_SUPERSCRIPT_EM_Y_SIZE: superscript em y size.
|
|
62
|
+
* @HB_OT_METRICS_TAG_SUPERSCRIPT_EM_X_OFFSET: superscript em x offset.
|
|
63
|
+
* @HB_OT_METRICS_TAG_SUPERSCRIPT_EM_Y_OFFSET: superscript em y offset.
|
|
64
|
+
* @HB_OT_METRICS_TAG_STRIKEOUT_SIZE: strikeout size.
|
|
65
|
+
* @HB_OT_METRICS_TAG_STRIKEOUT_OFFSET: strikeout offset.
|
|
66
|
+
* @HB_OT_METRICS_TAG_UNDERLINE_SIZE: underline size.
|
|
67
|
+
* @HB_OT_METRICS_TAG_UNDERLINE_OFFSET: underline offset.
|
|
68
|
+
*
|
|
69
|
+
* Metric tags corresponding to [MVAR Value
|
|
70
|
+
* Tags](https://docs.microsoft.com/en-us/typography/opentype/spec/mvar#value-tags)
|
|
71
|
+
*
|
|
72
|
+
* Since: 2.6.0
|
|
73
|
+
**/
|
|
74
|
+
typedef enum {
|
|
75
|
+
HB_OT_METRICS_TAG_HORIZONTAL_ASCENDER = HB_TAG ('h','a','s','c'),
|
|
76
|
+
HB_OT_METRICS_TAG_HORIZONTAL_DESCENDER = HB_TAG ('h','d','s','c'),
|
|
77
|
+
HB_OT_METRICS_TAG_HORIZONTAL_LINE_GAP = HB_TAG ('h','l','g','p'),
|
|
78
|
+
HB_OT_METRICS_TAG_HORIZONTAL_CLIPPING_ASCENT = HB_TAG ('h','c','l','a'),
|
|
79
|
+
HB_OT_METRICS_TAG_HORIZONTAL_CLIPPING_DESCENT = HB_TAG ('h','c','l','d'),
|
|
80
|
+
HB_OT_METRICS_TAG_VERTICAL_ASCENDER = HB_TAG ('v','a','s','c'),
|
|
81
|
+
HB_OT_METRICS_TAG_VERTICAL_DESCENDER = HB_TAG ('v','d','s','c'),
|
|
82
|
+
HB_OT_METRICS_TAG_VERTICAL_LINE_GAP = HB_TAG ('v','l','g','p'),
|
|
83
|
+
HB_OT_METRICS_TAG_HORIZONTAL_CARET_RISE = HB_TAG ('h','c','r','s'),
|
|
84
|
+
HB_OT_METRICS_TAG_HORIZONTAL_CARET_RUN = HB_TAG ('h','c','r','n'),
|
|
85
|
+
HB_OT_METRICS_TAG_HORIZONTAL_CARET_OFFSET = HB_TAG ('h','c','o','f'),
|
|
86
|
+
HB_OT_METRICS_TAG_VERTICAL_CARET_RISE = HB_TAG ('v','c','r','s'),
|
|
87
|
+
HB_OT_METRICS_TAG_VERTICAL_CARET_RUN = HB_TAG ('v','c','r','n'),
|
|
88
|
+
HB_OT_METRICS_TAG_VERTICAL_CARET_OFFSET = HB_TAG ('v','c','o','f'),
|
|
89
|
+
HB_OT_METRICS_TAG_X_HEIGHT = HB_TAG ('x','h','g','t'),
|
|
90
|
+
HB_OT_METRICS_TAG_CAP_HEIGHT = HB_TAG ('c','p','h','t'),
|
|
91
|
+
HB_OT_METRICS_TAG_SUBSCRIPT_EM_X_SIZE = HB_TAG ('s','b','x','s'),
|
|
92
|
+
HB_OT_METRICS_TAG_SUBSCRIPT_EM_Y_SIZE = HB_TAG ('s','b','y','s'),
|
|
93
|
+
HB_OT_METRICS_TAG_SUBSCRIPT_EM_X_OFFSET = HB_TAG ('s','b','x','o'),
|
|
94
|
+
HB_OT_METRICS_TAG_SUBSCRIPT_EM_Y_OFFSET = HB_TAG ('s','b','y','o'),
|
|
95
|
+
HB_OT_METRICS_TAG_SUPERSCRIPT_EM_X_SIZE = HB_TAG ('s','p','x','s'),
|
|
96
|
+
HB_OT_METRICS_TAG_SUPERSCRIPT_EM_Y_SIZE = HB_TAG ('s','p','y','s'),
|
|
97
|
+
HB_OT_METRICS_TAG_SUPERSCRIPT_EM_X_OFFSET = HB_TAG ('s','p','x','o'),
|
|
98
|
+
HB_OT_METRICS_TAG_SUPERSCRIPT_EM_Y_OFFSET = HB_TAG ('s','p','y','o'),
|
|
99
|
+
HB_OT_METRICS_TAG_STRIKEOUT_SIZE = HB_TAG ('s','t','r','s'),
|
|
100
|
+
HB_OT_METRICS_TAG_STRIKEOUT_OFFSET = HB_TAG ('s','t','r','o'),
|
|
101
|
+
HB_OT_METRICS_TAG_UNDERLINE_SIZE = HB_TAG ('u','n','d','s'),
|
|
102
|
+
HB_OT_METRICS_TAG_UNDERLINE_OFFSET = HB_TAG ('u','n','d','o'),
|
|
103
|
+
|
|
104
|
+
/*< private >*/
|
|
105
|
+
_HB_OT_METRICS_TAG_MAX_VALUE = HB_TAG_MAX_SIGNED /*< skip >*/
|
|
106
|
+
} hb_ot_metrics_tag_t;
|
|
107
|
+
|
|
108
|
+
HB_EXTERN hb_bool_t
|
|
109
|
+
hb_ot_metrics_get_position (hb_font_t *font,
|
|
110
|
+
hb_ot_metrics_tag_t metrics_tag,
|
|
111
|
+
hb_position_t *position /* OUT. May be NULL. */);
|
|
112
|
+
|
|
113
|
+
HB_EXTERN void
|
|
114
|
+
hb_ot_metrics_get_position_with_fallback (hb_font_t *font,
|
|
115
|
+
hb_ot_metrics_tag_t metrics_tag,
|
|
116
|
+
hb_position_t *position /* OUT */);
|
|
117
|
+
|
|
118
|
+
HB_EXTERN float
|
|
119
|
+
hb_ot_metrics_get_variation (hb_font_t *font, hb_ot_metrics_tag_t metrics_tag);
|
|
120
|
+
|
|
121
|
+
HB_EXTERN hb_position_t
|
|
122
|
+
hb_ot_metrics_get_x_variation (hb_font_t *font, hb_ot_metrics_tag_t metrics_tag);
|
|
123
|
+
|
|
124
|
+
HB_EXTERN hb_position_t
|
|
125
|
+
hb_ot_metrics_get_y_variation (hb_font_t *font, hb_ot_metrics_tag_t metrics_tag);
|
|
126
|
+
|
|
127
|
+
HB_END_DECLS
|
|
128
|
+
|
|
129
|
+
#endif /* HB_OT_METRICS_H */
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright © 2018 Ebrahim Byagowi.
|
|
3
|
+
*
|
|
4
|
+
* This is part of HarfBuzz, a text shaping library.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, without written agreement and without
|
|
7
|
+
* license or royalty fees, to use, copy, modify, and distribute this
|
|
8
|
+
* software and its documentation for any purpose, provided that the
|
|
9
|
+
* above copyright notice and the following two paragraphs appear in
|
|
10
|
+
* all copies of this software.
|
|
11
|
+
*
|
|
12
|
+
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
|
|
13
|
+
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
|
14
|
+
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
|
|
15
|
+
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
16
|
+
* DAMAGE.
|
|
17
|
+
*
|
|
18
|
+
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
|
|
19
|
+
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
|
21
|
+
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
|
|
22
|
+
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
|
|
26
|
+
#error "Include <hb-ot.h> instead."
|
|
27
|
+
#endif
|
|
28
|
+
|
|
29
|
+
#ifndef HB_OT_NAME_H
|
|
30
|
+
#define HB_OT_NAME_H
|
|
31
|
+
|
|
32
|
+
#include "hb.h"
|
|
33
|
+
|
|
34
|
+
HB_BEGIN_DECLS
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* hb_ot_name_id_t:
|
|
39
|
+
* @HB_OT_NAME_ID_COPYRIGHT: Copyright notice
|
|
40
|
+
* @HB_OT_NAME_ID_FONT_FAMILY: Font Family name
|
|
41
|
+
* @HB_OT_NAME_ID_FONT_SUBFAMILY: Font Subfamily name
|
|
42
|
+
* @HB_OT_NAME_ID_UNIQUE_ID: Unique font identifier
|
|
43
|
+
* @HB_OT_NAME_ID_FULL_NAME: Full font name that reflects
|
|
44
|
+
* all family and relevant subfamily descriptors
|
|
45
|
+
* @HB_OT_NAME_ID_VERSION_STRING: Version string
|
|
46
|
+
* @HB_OT_NAME_ID_POSTSCRIPT_NAME: PostScript name for the font
|
|
47
|
+
* @HB_OT_NAME_ID_TRADEMARK: Trademark
|
|
48
|
+
* @HB_OT_NAME_ID_MANUFACTURER: Manufacturer Name
|
|
49
|
+
* @HB_OT_NAME_ID_DESIGNER: Designer
|
|
50
|
+
* @HB_OT_NAME_ID_DESCRIPTION: Description
|
|
51
|
+
* @HB_OT_NAME_ID_VENDOR_URL: URL of font vendor
|
|
52
|
+
* @HB_OT_NAME_ID_DESIGNER_URL: URL of typeface designer
|
|
53
|
+
* @HB_OT_NAME_ID_LICENSE: License Description
|
|
54
|
+
* @HB_OT_NAME_ID_LICENSE_URL: URL where additional licensing
|
|
55
|
+
* information can be found
|
|
56
|
+
* @HB_OT_NAME_ID_TYPOGRAPHIC_FAMILY: Typographic Family name
|
|
57
|
+
* @HB_OT_NAME_ID_TYPOGRAPHIC_SUBFAMILY: Typographic Subfamily name
|
|
58
|
+
* @HB_OT_NAME_ID_MAC_FULL_NAME: Compatible Full Name for MacOS
|
|
59
|
+
* @HB_OT_NAME_ID_SAMPLE_TEXT: Sample text
|
|
60
|
+
* @HB_OT_NAME_ID_CID_FINDFONT_NAME: PostScript CID findfont name
|
|
61
|
+
* @HB_OT_NAME_ID_WWS_FAMILY: WWS Family Name
|
|
62
|
+
* @HB_OT_NAME_ID_WWS_SUBFAMILY: WWS Subfamily Name
|
|
63
|
+
* @HB_OT_NAME_ID_LIGHT_BACKGROUND: Light Background Palette
|
|
64
|
+
* @HB_OT_NAME_ID_DARK_BACKGROUND: Dark Background Palette
|
|
65
|
+
* @HB_OT_NAME_ID_VARIATIONS_PS_PREFIX: Variations PostScript Name Prefix
|
|
66
|
+
* @HB_OT_NAME_ID_INVALID: Value to represent a nonexistent name ID.
|
|
67
|
+
*
|
|
68
|
+
* An integral type representing an OpenType 'name' table name identifier.
|
|
69
|
+
* There are predefined name IDs, as well as name IDs return from other
|
|
70
|
+
* API. These can be used to fetch name strings from a font face.
|
|
71
|
+
*
|
|
72
|
+
* For more information on these fields, see the
|
|
73
|
+
* [OpenType spec](https://docs.microsoft.com/en-us/typography/opentype/spec/name#name-ids).
|
|
74
|
+
*
|
|
75
|
+
* Since: 2.0.0
|
|
76
|
+
**/
|
|
77
|
+
enum
|
|
78
|
+
{
|
|
79
|
+
HB_OT_NAME_ID_COPYRIGHT = 0,
|
|
80
|
+
HB_OT_NAME_ID_FONT_FAMILY = 1,
|
|
81
|
+
HB_OT_NAME_ID_FONT_SUBFAMILY = 2,
|
|
82
|
+
HB_OT_NAME_ID_UNIQUE_ID = 3,
|
|
83
|
+
HB_OT_NAME_ID_FULL_NAME = 4,
|
|
84
|
+
HB_OT_NAME_ID_VERSION_STRING = 5,
|
|
85
|
+
HB_OT_NAME_ID_POSTSCRIPT_NAME = 6,
|
|
86
|
+
HB_OT_NAME_ID_TRADEMARK = 7,
|
|
87
|
+
HB_OT_NAME_ID_MANUFACTURER = 8,
|
|
88
|
+
HB_OT_NAME_ID_DESIGNER = 9,
|
|
89
|
+
HB_OT_NAME_ID_DESCRIPTION = 10,
|
|
90
|
+
HB_OT_NAME_ID_VENDOR_URL = 11,
|
|
91
|
+
HB_OT_NAME_ID_DESIGNER_URL = 12,
|
|
92
|
+
HB_OT_NAME_ID_LICENSE = 13,
|
|
93
|
+
HB_OT_NAME_ID_LICENSE_URL = 14,
|
|
94
|
+
/*HB_OT_NAME_ID_RESERVED = 15,*/
|
|
95
|
+
HB_OT_NAME_ID_TYPOGRAPHIC_FAMILY = 16,
|
|
96
|
+
HB_OT_NAME_ID_TYPOGRAPHIC_SUBFAMILY = 17,
|
|
97
|
+
HB_OT_NAME_ID_MAC_FULL_NAME = 18,
|
|
98
|
+
HB_OT_NAME_ID_SAMPLE_TEXT = 19,
|
|
99
|
+
HB_OT_NAME_ID_CID_FINDFONT_NAME = 20,
|
|
100
|
+
HB_OT_NAME_ID_WWS_FAMILY = 21,
|
|
101
|
+
HB_OT_NAME_ID_WWS_SUBFAMILY = 22,
|
|
102
|
+
HB_OT_NAME_ID_LIGHT_BACKGROUND = 23,
|
|
103
|
+
HB_OT_NAME_ID_DARK_BACKGROUND = 24,
|
|
104
|
+
HB_OT_NAME_ID_VARIATIONS_PS_PREFIX = 25,
|
|
105
|
+
|
|
106
|
+
HB_OT_NAME_ID_INVALID = 0xFFFF
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
typedef unsigned int hb_ot_name_id_t;
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* hb_ot_name_entry_t:
|
|
114
|
+
* @name_id: name ID
|
|
115
|
+
* @language: language
|
|
116
|
+
*
|
|
117
|
+
* Structure representing a name ID in a particular language.
|
|
118
|
+
*
|
|
119
|
+
* Since: 2.1.0
|
|
120
|
+
**/
|
|
121
|
+
typedef struct hb_ot_name_entry_t {
|
|
122
|
+
hb_ot_name_id_t name_id;
|
|
123
|
+
/*< private >*/
|
|
124
|
+
hb_var_int_t var;
|
|
125
|
+
/*< public >*/
|
|
126
|
+
hb_language_t language;
|
|
127
|
+
} hb_ot_name_entry_t;
|
|
128
|
+
|
|
129
|
+
HB_EXTERN const hb_ot_name_entry_t *
|
|
130
|
+
hb_ot_name_list_names (hb_face_t *face,
|
|
131
|
+
unsigned int *num_entries /* OUT */);
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
HB_EXTERN unsigned int
|
|
135
|
+
hb_ot_name_get_utf8 (hb_face_t *face,
|
|
136
|
+
hb_ot_name_id_t name_id,
|
|
137
|
+
hb_language_t language,
|
|
138
|
+
unsigned int *text_size /* IN/OUT */,
|
|
139
|
+
char *text /* OUT */);
|
|
140
|
+
|
|
141
|
+
HB_EXTERN unsigned int
|
|
142
|
+
hb_ot_name_get_utf16 (hb_face_t *face,
|
|
143
|
+
hb_ot_name_id_t name_id,
|
|
144
|
+
hb_language_t language,
|
|
145
|
+
unsigned int *text_size /* IN/OUT */,
|
|
146
|
+
uint16_t *text /* OUT */);
|
|
147
|
+
|
|
148
|
+
HB_EXTERN unsigned int
|
|
149
|
+
hb_ot_name_get_utf32 (hb_face_t *face,
|
|
150
|
+
hb_ot_name_id_t name_id,
|
|
151
|
+
hb_language_t language,
|
|
152
|
+
unsigned int *text_size /* IN/OUT */,
|
|
153
|
+
uint32_t *text /* OUT */);
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
HB_END_DECLS
|
|
157
|
+
|
|
158
|
+
#endif /* HB_OT_NAME_H */
|