@girs/harfbuzz-0.0 7.1.0-3.2.2 → 8.1.1-3.2.8

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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/harfbuzz-0.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for HarfBuzz-0.0, generated from library version 7.1.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.2.
8
+ GJS TypeScript type definitions for HarfBuzz-0.0, generated from library version 8.1.1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.8.
9
9
 
10
10
 
11
11
  ## Install
@@ -81,6 +81,19 @@ Now you have also type support for this, too:
81
81
  const HarfBuzz = imports.gi.HarfBuzz;
82
82
  ```
83
83
 
84
+
85
+ ### ESM vs. CommonJS
86
+
87
+ GJS supports two different import syntaxes. The new modern ESM syntax and the old global imports syntax.
88
+
89
+ In TypeScript projects for GJS and GNOME Shell extensions, you have the flexibility to use `ESM` syntax and then decide the import syntax for your bundled file. If your bundler is configured to use `CommonJS`, it will convert to the GJS-specific global imports syntax, like `const moduleName = imports.gi[moduleName]`. This is different from the traditional `require` syntax seen in Node.js. The global imports syntax is chosen because it aligns with the CommonJS format supported by NPM, which is used for the generated type definitions and this package.
90
+
91
+ On the other hand, if you configure your bundler to use ESM, it will retain the ESM import syntax. It's crucial to ensure that your bundler is set up to correctly translate and bundle these imports into either CommonJS or ESM format, depending on your project's requirements.
92
+
93
+ This approach is particularly important due to the `@girs` types, which include both `*.cjs `files, using the GJS global imports syntax, and `*.js` files, which utilize the ESM syntax. By appropriately setting up your bundler, you can control which syntax—CommonJS or ESM—is used in your project. The choice of CommonJS in this context is also due to the similarity between the GJS-specific global imports and CommonJS syntax, allowing for easier management and bundling in these specific types of projects.
94
+
95
+ Since GNOME Shell 45, you should only use ESM, even for GNOME Shell extensions. Before that, extensions had to use the global import syntax, unlike normal GJS applications, where ESM has been available for some time.
96
+
84
97
  ### Bundle
85
98
 
86
99
  Depending on your project configuration, it is recommended to use a bundler like [esbuild](https://esbuild.github.io/). You can find examples using different bundlers [here](https://github.com/gjsify/ts-for-gir/tree/main/examples).
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  declare module 'gi://HarfBuzz?version=0.0' {
4
3
  import HarfBuzz00 from '@girs/harfbuzz-0.0';
5
4
  export default HarfBuzz00;
@@ -0,0 +1,2 @@
1
+ export {}
2
+
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  import HarfBuzz00 from '@girs/harfbuzz-0.0';
4
3
 
5
4
  declare global {
@@ -0,0 +1,3 @@
1
+ const gi = globalThis.imports?.gi || {};
2
+ export default gi;
3
+
@@ -2973,9 +2973,9 @@ export enum unicode_combining_class_t {
2973
2973
  */
2974
2974
  CCC130,
2975
2975
  /**
2976
- * [Tibetan]
2976
+ * [Tibetan] Since: 7.2.0
2977
2977
  */
2978
- CCC133,
2978
+ CCC132,
2979
2979
  /**
2980
2980
  * Marks attached at the bottom left
2981
2981
  */
@@ -3483,6 +3483,10 @@ export const AAT_LAYOUT_NO_SELECTOR_INDEX: number
3483
3483
  * Set to U+FFFD REPLACEMENT CHARACTER.
3484
3484
  */
3485
3485
  export const BUFFER_REPLACEMENT_CODEPOINT_DEFAULT: number
3486
+ /**
3487
+ * Unused #hb_codepoint_t value.
3488
+ */
3489
+ export const CODEPOINT_INVALID: codepoint_t
3486
3490
  /**
3487
3491
  * Special setting for #hb_feature_t.start to apply the feature from the start
3488
3492
  * of the buffer.
@@ -3498,10 +3502,6 @@ export const FONT_NO_VAR_NAMED_INSTANCE: number
3498
3502
  * An unset #hb_language_t.
3499
3503
  */
3500
3504
  export const LANGUAGE_INVALID: language_t
3501
- /**
3502
- * Unset #hb_map_t value.
3503
- */
3504
- export const MAP_VALUE_INVALID: codepoint_t
3505
3505
  /**
3506
3506
  * Special value for language index indicating default or unsupported language.
3507
3507
  */
@@ -3531,9 +3531,9 @@ export const OT_MAX_TAGS_PER_SCRIPT: number
3531
3531
  */
3532
3532
  export const OT_VAR_NO_AXIS_INDEX: number
3533
3533
  /**
3534
- * Unset #hb_set_t value.
3534
+ * [Tibetan]
3535
3535
  */
3536
- export const SET_VALUE_INVALID: codepoint_t
3536
+ export const UNICODE_COMBINING_CLASS_CCC133: number
3537
3537
  /**
3538
3538
  * Maximum valid Unicode code point.
3539
3539
  */
@@ -3542,22 +3542,10 @@ export const UNICODE_MAX: number
3542
3542
  * See Unicode 6.1 for details on the maximum decomposition length.
3543
3543
  */
3544
3544
  export const UNICODE_MAX_DECOMPOSITION_LEN: number
3545
- /**
3546
- * The major component of the library version available at compile-time.
3547
- */
3548
3545
  export const VERSION_MAJOR: number
3549
- /**
3550
- * The micro component of the library version available at compile-time.
3551
- */
3552
3546
  export const VERSION_MICRO: number
3553
- /**
3554
- * The minor component of the library version available at compile-time.
3555
- */
3556
3547
  export const VERSION_MINOR: number
3557
- /**
3558
- * A string literal containing the library version available at compile-time.
3559
- */
3560
- export const VERSION_STRING: string | null
3548
+ export const VERSION_STRING: string
3561
3549
  /**
3562
3550
  * Fetches the name identifier of the specified feature type in the face's `name` table.
3563
3551
  * @param face #hb_face_t to work upon
@@ -3621,14 +3609,14 @@ export function blob_copy_writable_or_fail(blob: blob_t): blob_t
3621
3609
  * @param file_name A font filename
3622
3610
  * @returns An #hb_blob_t pointer with the content of the file, or hb_blob_get_empty() if failed.
3623
3611
  */
3624
- export function blob_create_from_file(file_name: string | null): blob_t
3612
+ export function blob_create_from_file(file_name: string): blob_t
3625
3613
  /**
3626
3614
  * Creates a new blob containing the data from the
3627
3615
  * specified binary font file.
3628
3616
  * @param file_name A font filename
3629
3617
  * @returns An #hb_blob_t pointer with the content of the file, or `NULL` if failed.
3630
3618
  */
3631
- export function blob_create_from_file_or_fail(file_name: string | null): blob_t
3619
+ export function blob_create_from_file_or_fail(file_name: string): blob_t
3632
3620
  /**
3633
3621
  * Returns a blob that represents a range of bytes in `parent`. The new
3634
3622
  * blob is always created with #HB_MEMORY_MODE_READONLY, meaning that it
@@ -3803,7 +3791,7 @@ export function buffer_create_similar(src: buffer_t): buffer_t
3803
3791
  * @param format the #hb_buffer_serialize_format_t of the input `buf`
3804
3792
  * @returns `true` if parse was successful, `false` if an error occurred.
3805
3793
  */
3806
- export function buffer_deserialize_glyphs(buffer: buffer_t, buf: string[], font: font_t | null, format: buffer_serialize_format_t): [ /* returnType */ bool_t, /* end_ptr */ string | null ]
3794
+ export function buffer_deserialize_glyphs(buffer: buffer_t, buf: string[], font: font_t | null, format: buffer_serialize_format_t): [ /* returnType */ bool_t, /* end_ptr */ string ]
3807
3795
  /**
3808
3796
  * Deserializes Unicode `buffer` from textual representation in the format
3809
3797
  * produced by hb_buffer_serialize_unicode().
@@ -3812,7 +3800,7 @@ export function buffer_deserialize_glyphs(buffer: buffer_t, buf: string[], font:
3812
3800
  * @param format the #hb_buffer_serialize_format_t of the input `buf`
3813
3801
  * @returns `true` if parse was successful, `false` if an error occurred.
3814
3802
  */
3815
- export function buffer_deserialize_unicode(buffer: buffer_t, buf: string[], format: buffer_serialize_format_t): [ /* returnType */ bool_t, /* end_ptr */ string | null ]
3803
+ export function buffer_deserialize_unicode(buffer: buffer_t, buf: string[], format: buffer_serialize_format_t): [ /* returnType */ bool_t, /* end_ptr */ string ]
3816
3804
  /**
3817
3805
  * If dottedcircle_glyph is (hb_codepoint_t) -1 then #HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT
3818
3806
  * and #HB_BUFFER_DIFF_FLAG_NOTDEF_PRESENT are never returned. This should be used by most
@@ -4024,7 +4012,7 @@ export function buffer_serialize_format_from_string(str: Uint8Array): buffer_ser
4024
4012
  * @param format an #hb_buffer_serialize_format_t to convert.
4025
4013
  * @returns A `NULL` terminated string corresponding to @format. Should not be freed.
4026
4014
  */
4027
- export function buffer_serialize_format_to_string(format: buffer_serialize_format_t): string | null
4015
+ export function buffer_serialize_format_to_string(format: buffer_serialize_format_t): string
4028
4016
  /**
4029
4017
  * Serializes `buffer` into a textual representation of its glyph content,
4030
4018
  * useful for showing the contents of the buffer, for example during debugging.
@@ -4324,7 +4312,7 @@ export function direction_from_string(str: Uint8Array): direction_t
4324
4312
  * @param direction The #hb_direction_t to convert
4325
4313
  * @returns The string corresponding to @direction
4326
4314
  */
4327
- export function direction_to_string(direction: direction_t): string | null
4315
+ export function direction_to_string(direction: direction_t): string
4328
4316
  /**
4329
4317
  * Perform a "close-path" draw operation.
4330
4318
  * @param dfuncs draw functions
@@ -4484,7 +4472,7 @@ export function face_count(blob: blob_t): number
4484
4472
  * a face index into that blob.
4485
4473
  *
4486
4474
  * The face index is used for blobs of file formats such as TTC and
4487
- * and DFont that can contain more than one face. Face indices within
4475
+ * DFont that can contain more than one face. Face indices within
4488
4476
  * such collections are zero-based.
4489
4477
  *
4490
4478
  * <note>Note: If the blob font format is not a collection, `index`
@@ -4722,8 +4710,7 @@ export function font_funcs_is_immutable(ffuncs: font_funcs_t): bool_t
4722
4710
  */
4723
4711
  export function font_funcs_make_immutable(ffuncs: font_funcs_t): void
4724
4712
  /**
4725
- * Sets the implementation function for #hb_font_draw_glyph_func_t,
4726
- * which is the same as #hb_font_get_glyph_shape_func_t.
4713
+ * Sets the implementation function for #hb_font_draw_glyph_func_t.
4727
4714
  * @param ffuncs A font-function structure
4728
4715
  * @param func The callback function to assign
4729
4716
  */
@@ -5661,7 +5648,7 @@ export function language_matches(language: language_t, specific: language_t): bo
5661
5648
  * @param language The #hb_language_t to convert
5662
5649
  * @returns A `NULL`-terminated string representing the @language. Must not be freed by the caller.
5663
5650
  */
5664
- export function language_to_string(language: language_t): string | null
5651
+ export function language_to_string(language: language_t): string
5665
5652
  /**
5666
5653
  * Tests whether memory allocation for a set was successful.
5667
5654
  * @param map A map
@@ -5912,6 +5899,15 @@ export function ot_font_set_funcs(font: font_t): void
5912
5899
  * @param features The array of features to collect, terminated by %HB_TAG_NONE
5913
5900
  */
5914
5901
  export function ot_layout_collect_features(face: face_t, table_tag: tag_t, scripts: tag_t[] | null, languages: tag_t[] | null, features: tag_t[] | null): /* feature_indexes */ set_t
5902
+ /**
5903
+ * Fetches the mapping from feature tags to feature indexes for
5904
+ * the specified script and language.
5905
+ * @param face #hb_face_t to work upon
5906
+ * @param table_tag #HB_OT_TAG_GSUB or #HB_OT_TAG_GPOS
5907
+ * @param script_index The index of the requested script tag
5908
+ * @param language_index The index of the requested language tag
5909
+ */
5910
+ export function ot_layout_collect_features_map(face: face_t, table_tag: tag_t, script_index: number, language_index: number): /* feature_map */ map_t
5915
5911
  /**
5916
5912
  * Fetches a list of all feature-lookup indexes in the specified face's GSUB
5917
5913
  * table or GPOS table, underneath the specified scripts, languages, and
@@ -5988,6 +5984,19 @@ export function ot_layout_get_attach_points(face: face_t, glyph: codepoint_t, st
5988
5984
  * @returns `true` if found baseline value in the font.
5989
5985
  */
5990
5986
  export function ot_layout_get_baseline(font: font_t, baseline_tag: ot_layout_baseline_tag_t, direction: direction_t, script_tag: tag_t, language_tag: tag_t): [ /* returnType */ bool_t, /* coord */ position_t | null ]
5987
+ /**
5988
+ * Fetches a baseline value from the face.
5989
+ *
5990
+ * This function is like hb_ot_layout_get_baseline() but takes
5991
+ * #hb_script_t and #hb_language_t instead of OpenType #hb_tag_t.
5992
+ * @param font a font
5993
+ * @param baseline_tag a baseline tag
5994
+ * @param direction text direction.
5995
+ * @param script script.
5996
+ * @param language language, currently unused.
5997
+ * @returns `true` if found baseline value in the font.
5998
+ */
5999
+ export function ot_layout_get_baseline2(font: font_t, baseline_tag: ot_layout_baseline_tag_t, direction: direction_t, script: script_t, language: language_t | null): [ /* returnType */ bool_t, /* coord */ position_t | null ]
5991
6000
  /**
5992
6001
  * Fetches a baseline value from the face, and synthesizes
5993
6002
  * it if the font does not have it.
@@ -5998,6 +6007,54 @@ export function ot_layout_get_baseline(font: font_t, baseline_tag: ot_layout_bas
5998
6007
  * @param language_tag language tag, currently unused.
5999
6008
  */
6000
6009
  export function ot_layout_get_baseline_with_fallback(font: font_t, baseline_tag: ot_layout_baseline_tag_t, direction: direction_t, script_tag: tag_t, language_tag: tag_t): /* coord */ position_t
6010
+ /**
6011
+ * Fetches a baseline value from the face, and synthesizes
6012
+ * it if the font does not have it.
6013
+ *
6014
+ * This function is like hb_ot_layout_get_baseline_with_fallback() but takes
6015
+ * #hb_script_t and #hb_language_t instead of OpenType #hb_tag_t.
6016
+ * @param font a font
6017
+ * @param baseline_tag a baseline tag
6018
+ * @param direction text direction.
6019
+ * @param script script.
6020
+ * @param language language, currently unused.
6021
+ */
6022
+ export function ot_layout_get_baseline_with_fallback2(font: font_t, baseline_tag: ot_layout_baseline_tag_t, direction: direction_t, script: script_t, language: language_t | null): /* coord */ position_t
6023
+ /**
6024
+ * Fetches script/language-specific font extents. These values are
6025
+ * looked up in the `BASE` table's `MinMax` records.
6026
+ *
6027
+ * If no such extents are found, the default extents for the font are
6028
+ * fetched. As such, the return value of this function can for the
6029
+ * most part be ignored. Note that the per-script/language extents
6030
+ * do not have a line-gap value, and the line-gap is set to zero in
6031
+ * that case.
6032
+ * @param font a font
6033
+ * @param direction text direction.
6034
+ * @param script_tag script tag.
6035
+ * @param language_tag language tag.
6036
+ * @returns `true` if found script/language-specific font extents.
6037
+ */
6038
+ export function ot_layout_get_font_extents(font: font_t, direction: direction_t, script_tag: tag_t, language_tag: tag_t): [ /* returnType */ bool_t, /* extents */ font_extents_t | null ]
6039
+ /**
6040
+ * Fetches script/language-specific font extents. These values are
6041
+ * looked up in the `BASE` table's `MinMax` records.
6042
+ *
6043
+ * If no such extents are found, the default extents for the font are
6044
+ * fetched. As such, the return value of this function can for the
6045
+ * most part be ignored. Note that the per-script/language extents
6046
+ * do not have a line-gap value, and the line-gap is set to zero in
6047
+ * that case.
6048
+ *
6049
+ * This function is like hb_ot_layout_get_font_extents() but takes
6050
+ * #hb_script_t and #hb_language_t instead of OpenType #hb_tag_t.
6051
+ * @param font a font
6052
+ * @param direction text direction.
6053
+ * @param script script.
6054
+ * @param language language.
6055
+ * @returns `true` if found script/language-specific font extents.
6056
+ */
6057
+ export function ot_layout_get_font_extents2(font: font_t, direction: direction_t, script: script_t, language: language_t | null): [ /* returnType */ bool_t, /* extents */ font_extents_t | null ]
6001
6058
  /**
6002
6059
  * Fetches the GDEF class of the requested glyph in the specified face.
6003
6060
  * @param face The #hb_face_t to work on
@@ -6298,7 +6355,7 @@ export function ot_layout_table_select_script(face: face_t, table_tag: tag_t, sc
6298
6355
  *
6299
6356
  * However, if the requested constant is #HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN,
6300
6357
  * #HB_OT_MATH_CONSTANT_SCRIPT_SCRIPT_PERCENT_SCALE_DOWN or
6301
- * #HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN, then the return value is
6358
+ * #HB_OT_MATH_CONSTANT_RADICAL_DEGREE_BOTTOM_RAISE_PERCENT, then the return value is
6302
6359
  * an integer between 0 and 100 representing that percentage.
6303
6360
  * @param font #hb_font_t to work upon
6304
6361
  * @param constant #hb_ot_math_constant_t the constant to retrieve
@@ -6562,7 +6619,7 @@ export function ot_tags_from_script(script: script_t): [ /* script_tag_1 */ tag_
6562
6619
  * @param script_count maximum number of script tags to retrieve (IN) and actual number of script tags retrieved (OUT)
6563
6620
  * @param language_count maximum number of language tags to retrieve (IN) and actual number of language tags retrieved (OUT)
6564
6621
  */
6565
- export function ot_tags_from_script_and_language(script: script_t, language: language_t, script_count?: number, language_count?: number): [ /* script_count */ number, /* script_tags */ tag_t, /* language_count */ number, /* language_tags */ tag_t ]
6622
+ export function ot_tags_from_script_and_language(script: script_t, language: language_t | null, script_count?: number, language_count?: number): [ /* script_count */ number, /* script_tags */ tag_t, /* language_count */ number, /* language_tags */ tag_t ]
6566
6623
  /**
6567
6624
  * Converts a script tag and a language tag to an #hb_script_t and an
6568
6625
  * #hb_language_t.
@@ -7273,7 +7330,7 @@ export function shape_plan_get_empty(): shape_plan_t
7273
7330
  * @param shape_plan A shaping plan
7274
7331
  * @returns The shaper
7275
7332
  */
7276
- export function shape_plan_get_shaper(shape_plan: shape_plan_t): string | null
7333
+ export function shape_plan_get_shaper(shape_plan: shape_plan_t): string
7277
7334
  /**
7278
7335
  * Searches variation axes of a #hb_font_t object for a specific axis first,
7279
7336
  * if not set, then tries to get default style values from different
@@ -7471,24 +7528,6 @@ export function variation_from_string(str: Uint8Array): [ /* returnType */ bool_
7471
7528
  * @param variation an #hb_variation_t to convert
7472
7529
  */
7473
7530
  export function variation_to_string(variation: variation_t): /* buf */ string[]
7474
- /**
7475
- * Returns library version as three integer components.
7476
- */
7477
- export function version(): [ /* major */ number, /* minor */ number, /* micro */ number ]
7478
- /**
7479
- * Tests the library version against a minimum value,
7480
- * as three integer components.
7481
- * @param major Library major version component
7482
- * @param minor Library minor version component
7483
- * @param micro Library micro version component
7484
- * @returns `true` if the library is equal to or greater than the test value, `false` otherwise
7485
- */
7486
- export function version_atleast(major: number, minor: number, micro: number): bool_t
7487
- /**
7488
- * Returns library version as a string with three components.
7489
- * @returns Library version string
7490
- */
7491
- export function version_string(): string | null
7492
7531
  /**
7493
7532
  * A callback method for #hb_buffer_t. The method gets called with the
7494
7533
  * #hb_buffer_t it was set on, the #hb_font_t the buffer is shaped with and a
@@ -7502,7 +7541,7 @@ export function version_string(): string | null
7502
7541
  * @returns `true` to perform the shaping step, `false` to skip it.
7503
7542
  */
7504
7543
  export interface buffer_message_func_t {
7505
- (buffer: buffer_t, font: font_t, message: string | null): bool_t
7544
+ (buffer: buffer_t, font: font_t, message: string): bool_t
7506
7545
  }
7507
7546
  /**
7508
7547
  * A virtual method for the #hb_color_line_t to fetch color stops.
@@ -8655,7 +8694,7 @@ export interface language_t {
8655
8694
  * Converts an #hb_language_t to a string.
8656
8695
  * @returns A `NULL`-terminated string representing the @language. Must not be freed by the caller.
8657
8696
  */
8658
- _string(): string | null
8697
+ _string(): string
8659
8698
  }
8660
8699
 
8661
8700
  /**
package/harfbuzz-0.0.d.ts CHANGED
@@ -2975,9 +2975,9 @@ enum unicode_combining_class_t {
2975
2975
  */
2976
2976
  CCC130,
2977
2977
  /**
2978
- * [Tibetan]
2978
+ * [Tibetan] Since: 7.2.0
2979
2979
  */
2980
- CCC133,
2980
+ CCC132,
2981
2981
  /**
2982
2982
  * Marks attached at the bottom left
2983
2983
  */
@@ -3485,6 +3485,10 @@ const AAT_LAYOUT_NO_SELECTOR_INDEX: number
3485
3485
  * Set to U+FFFD REPLACEMENT CHARACTER.
3486
3486
  */
3487
3487
  const BUFFER_REPLACEMENT_CODEPOINT_DEFAULT: number
3488
+ /**
3489
+ * Unused #hb_codepoint_t value.
3490
+ */
3491
+ const CODEPOINT_INVALID: codepoint_t
3488
3492
  /**
3489
3493
  * Special setting for #hb_feature_t.start to apply the feature from the start
3490
3494
  * of the buffer.
@@ -3500,10 +3504,6 @@ const FONT_NO_VAR_NAMED_INSTANCE: number
3500
3504
  * An unset #hb_language_t.
3501
3505
  */
3502
3506
  const LANGUAGE_INVALID: language_t
3503
- /**
3504
- * Unset #hb_map_t value.
3505
- */
3506
- const MAP_VALUE_INVALID: codepoint_t
3507
3507
  /**
3508
3508
  * Special value for language index indicating default or unsupported language.
3509
3509
  */
@@ -3533,9 +3533,9 @@ const OT_MAX_TAGS_PER_SCRIPT: number
3533
3533
  */
3534
3534
  const OT_VAR_NO_AXIS_INDEX: number
3535
3535
  /**
3536
- * Unset #hb_set_t value.
3536
+ * [Tibetan]
3537
3537
  */
3538
- const SET_VALUE_INVALID: codepoint_t
3538
+ const UNICODE_COMBINING_CLASS_CCC133: number
3539
3539
  /**
3540
3540
  * Maximum valid Unicode code point.
3541
3541
  */
@@ -3544,22 +3544,10 @@ const UNICODE_MAX: number
3544
3544
  * See Unicode 6.1 for details on the maximum decomposition length.
3545
3545
  */
3546
3546
  const UNICODE_MAX_DECOMPOSITION_LEN: number
3547
- /**
3548
- * The major component of the library version available at compile-time.
3549
- */
3550
3547
  const VERSION_MAJOR: number
3551
- /**
3552
- * The micro component of the library version available at compile-time.
3553
- */
3554
3548
  const VERSION_MICRO: number
3555
- /**
3556
- * The minor component of the library version available at compile-time.
3557
- */
3558
3549
  const VERSION_MINOR: number
3559
- /**
3560
- * A string literal containing the library version available at compile-time.
3561
- */
3562
- const VERSION_STRING: string | null
3550
+ const VERSION_STRING: string
3563
3551
  /**
3564
3552
  * Fetches the name identifier of the specified feature type in the face's `name` table.
3565
3553
  * @param face #hb_face_t to work upon
@@ -3623,14 +3611,14 @@ function blob_copy_writable_or_fail(blob: blob_t): blob_t
3623
3611
  * @param file_name A font filename
3624
3612
  * @returns An #hb_blob_t pointer with the content of the file, or hb_blob_get_empty() if failed.
3625
3613
  */
3626
- function blob_create_from_file(file_name: string | null): blob_t
3614
+ function blob_create_from_file(file_name: string): blob_t
3627
3615
  /**
3628
3616
  * Creates a new blob containing the data from the
3629
3617
  * specified binary font file.
3630
3618
  * @param file_name A font filename
3631
3619
  * @returns An #hb_blob_t pointer with the content of the file, or `NULL` if failed.
3632
3620
  */
3633
- function blob_create_from_file_or_fail(file_name: string | null): blob_t
3621
+ function blob_create_from_file_or_fail(file_name: string): blob_t
3634
3622
  /**
3635
3623
  * Returns a blob that represents a range of bytes in `parent`. The new
3636
3624
  * blob is always created with #HB_MEMORY_MODE_READONLY, meaning that it
@@ -3805,7 +3793,7 @@ function buffer_create_similar(src: buffer_t): buffer_t
3805
3793
  * @param format the #hb_buffer_serialize_format_t of the input `buf`
3806
3794
  * @returns `true` if parse was successful, `false` if an error occurred.
3807
3795
  */
3808
- function buffer_deserialize_glyphs(buffer: buffer_t, buf: string[], font: font_t | null, format: buffer_serialize_format_t): [ /* returnType */ bool_t, /* end_ptr */ string | null ]
3796
+ function buffer_deserialize_glyphs(buffer: buffer_t, buf: string[], font: font_t | null, format: buffer_serialize_format_t): [ /* returnType */ bool_t, /* end_ptr */ string ]
3809
3797
  /**
3810
3798
  * Deserializes Unicode `buffer` from textual representation in the format
3811
3799
  * produced by hb_buffer_serialize_unicode().
@@ -3814,7 +3802,7 @@ function buffer_deserialize_glyphs(buffer: buffer_t, buf: string[], font: font_t
3814
3802
  * @param format the #hb_buffer_serialize_format_t of the input `buf`
3815
3803
  * @returns `true` if parse was successful, `false` if an error occurred.
3816
3804
  */
3817
- function buffer_deserialize_unicode(buffer: buffer_t, buf: string[], format: buffer_serialize_format_t): [ /* returnType */ bool_t, /* end_ptr */ string | null ]
3805
+ function buffer_deserialize_unicode(buffer: buffer_t, buf: string[], format: buffer_serialize_format_t): [ /* returnType */ bool_t, /* end_ptr */ string ]
3818
3806
  /**
3819
3807
  * If dottedcircle_glyph is (hb_codepoint_t) -1 then #HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT
3820
3808
  * and #HB_BUFFER_DIFF_FLAG_NOTDEF_PRESENT are never returned. This should be used by most
@@ -4026,7 +4014,7 @@ function buffer_serialize_format_from_string(str: Uint8Array): buffer_serialize_
4026
4014
  * @param format an #hb_buffer_serialize_format_t to convert.
4027
4015
  * @returns A `NULL` terminated string corresponding to @format. Should not be freed.
4028
4016
  */
4029
- function buffer_serialize_format_to_string(format: buffer_serialize_format_t): string | null
4017
+ function buffer_serialize_format_to_string(format: buffer_serialize_format_t): string
4030
4018
  /**
4031
4019
  * Serializes `buffer` into a textual representation of its glyph content,
4032
4020
  * useful for showing the contents of the buffer, for example during debugging.
@@ -4326,7 +4314,7 @@ function direction_from_string(str: Uint8Array): direction_t
4326
4314
  * @param direction The #hb_direction_t to convert
4327
4315
  * @returns The string corresponding to @direction
4328
4316
  */
4329
- function direction_to_string(direction: direction_t): string | null
4317
+ function direction_to_string(direction: direction_t): string
4330
4318
  /**
4331
4319
  * Perform a "close-path" draw operation.
4332
4320
  * @param dfuncs draw functions
@@ -4486,7 +4474,7 @@ function face_count(blob: blob_t): number
4486
4474
  * a face index into that blob.
4487
4475
  *
4488
4476
  * The face index is used for blobs of file formats such as TTC and
4489
- * and DFont that can contain more than one face. Face indices within
4477
+ * DFont that can contain more than one face. Face indices within
4490
4478
  * such collections are zero-based.
4491
4479
  *
4492
4480
  * <note>Note: If the blob font format is not a collection, `index`
@@ -4724,8 +4712,7 @@ function font_funcs_is_immutable(ffuncs: font_funcs_t): bool_t
4724
4712
  */
4725
4713
  function font_funcs_make_immutable(ffuncs: font_funcs_t): void
4726
4714
  /**
4727
- * Sets the implementation function for #hb_font_draw_glyph_func_t,
4728
- * which is the same as #hb_font_get_glyph_shape_func_t.
4715
+ * Sets the implementation function for #hb_font_draw_glyph_func_t.
4729
4716
  * @param ffuncs A font-function structure
4730
4717
  * @param func The callback function to assign
4731
4718
  */
@@ -5663,7 +5650,7 @@ function language_matches(language: language_t, specific: language_t): bool_t
5663
5650
  * @param language The #hb_language_t to convert
5664
5651
  * @returns A `NULL`-terminated string representing the @language. Must not be freed by the caller.
5665
5652
  */
5666
- function language_to_string(language: language_t): string | null
5653
+ function language_to_string(language: language_t): string
5667
5654
  /**
5668
5655
  * Tests whether memory allocation for a set was successful.
5669
5656
  * @param map A map
@@ -5914,6 +5901,15 @@ function ot_font_set_funcs(font: font_t): void
5914
5901
  * @param features The array of features to collect, terminated by %HB_TAG_NONE
5915
5902
  */
5916
5903
  function ot_layout_collect_features(face: face_t, table_tag: tag_t, scripts: tag_t[] | null, languages: tag_t[] | null, features: tag_t[] | null): /* feature_indexes */ set_t
5904
+ /**
5905
+ * Fetches the mapping from feature tags to feature indexes for
5906
+ * the specified script and language.
5907
+ * @param face #hb_face_t to work upon
5908
+ * @param table_tag #HB_OT_TAG_GSUB or #HB_OT_TAG_GPOS
5909
+ * @param script_index The index of the requested script tag
5910
+ * @param language_index The index of the requested language tag
5911
+ */
5912
+ function ot_layout_collect_features_map(face: face_t, table_tag: tag_t, script_index: number, language_index: number): /* feature_map */ map_t
5917
5913
  /**
5918
5914
  * Fetches a list of all feature-lookup indexes in the specified face's GSUB
5919
5915
  * table or GPOS table, underneath the specified scripts, languages, and
@@ -5990,6 +5986,19 @@ function ot_layout_get_attach_points(face: face_t, glyph: codepoint_t, start_off
5990
5986
  * @returns `true` if found baseline value in the font.
5991
5987
  */
5992
5988
  function ot_layout_get_baseline(font: font_t, baseline_tag: ot_layout_baseline_tag_t, direction: direction_t, script_tag: tag_t, language_tag: tag_t): [ /* returnType */ bool_t, /* coord */ position_t | null ]
5989
+ /**
5990
+ * Fetches a baseline value from the face.
5991
+ *
5992
+ * This function is like hb_ot_layout_get_baseline() but takes
5993
+ * #hb_script_t and #hb_language_t instead of OpenType #hb_tag_t.
5994
+ * @param font a font
5995
+ * @param baseline_tag a baseline tag
5996
+ * @param direction text direction.
5997
+ * @param script script.
5998
+ * @param language language, currently unused.
5999
+ * @returns `true` if found baseline value in the font.
6000
+ */
6001
+ function ot_layout_get_baseline2(font: font_t, baseline_tag: ot_layout_baseline_tag_t, direction: direction_t, script: script_t, language: language_t | null): [ /* returnType */ bool_t, /* coord */ position_t | null ]
5993
6002
  /**
5994
6003
  * Fetches a baseline value from the face, and synthesizes
5995
6004
  * it if the font does not have it.
@@ -6000,6 +6009,54 @@ function ot_layout_get_baseline(font: font_t, baseline_tag: ot_layout_baseline_t
6000
6009
  * @param language_tag language tag, currently unused.
6001
6010
  */
6002
6011
  function ot_layout_get_baseline_with_fallback(font: font_t, baseline_tag: ot_layout_baseline_tag_t, direction: direction_t, script_tag: tag_t, language_tag: tag_t): /* coord */ position_t
6012
+ /**
6013
+ * Fetches a baseline value from the face, and synthesizes
6014
+ * it if the font does not have it.
6015
+ *
6016
+ * This function is like hb_ot_layout_get_baseline_with_fallback() but takes
6017
+ * #hb_script_t and #hb_language_t instead of OpenType #hb_tag_t.
6018
+ * @param font a font
6019
+ * @param baseline_tag a baseline tag
6020
+ * @param direction text direction.
6021
+ * @param script script.
6022
+ * @param language language, currently unused.
6023
+ */
6024
+ function ot_layout_get_baseline_with_fallback2(font: font_t, baseline_tag: ot_layout_baseline_tag_t, direction: direction_t, script: script_t, language: language_t | null): /* coord */ position_t
6025
+ /**
6026
+ * Fetches script/language-specific font extents. These values are
6027
+ * looked up in the `BASE` table's `MinMax` records.
6028
+ *
6029
+ * If no such extents are found, the default extents for the font are
6030
+ * fetched. As such, the return value of this function can for the
6031
+ * most part be ignored. Note that the per-script/language extents
6032
+ * do not have a line-gap value, and the line-gap is set to zero in
6033
+ * that case.
6034
+ * @param font a font
6035
+ * @param direction text direction.
6036
+ * @param script_tag script tag.
6037
+ * @param language_tag language tag.
6038
+ * @returns `true` if found script/language-specific font extents.
6039
+ */
6040
+ function ot_layout_get_font_extents(font: font_t, direction: direction_t, script_tag: tag_t, language_tag: tag_t): [ /* returnType */ bool_t, /* extents */ font_extents_t | null ]
6041
+ /**
6042
+ * Fetches script/language-specific font extents. These values are
6043
+ * looked up in the `BASE` table's `MinMax` records.
6044
+ *
6045
+ * If no such extents are found, the default extents for the font are
6046
+ * fetched. As such, the return value of this function can for the
6047
+ * most part be ignored. Note that the per-script/language extents
6048
+ * do not have a line-gap value, and the line-gap is set to zero in
6049
+ * that case.
6050
+ *
6051
+ * This function is like hb_ot_layout_get_font_extents() but takes
6052
+ * #hb_script_t and #hb_language_t instead of OpenType #hb_tag_t.
6053
+ * @param font a font
6054
+ * @param direction text direction.
6055
+ * @param script script.
6056
+ * @param language language.
6057
+ * @returns `true` if found script/language-specific font extents.
6058
+ */
6059
+ function ot_layout_get_font_extents2(font: font_t, direction: direction_t, script: script_t, language: language_t | null): [ /* returnType */ bool_t, /* extents */ font_extents_t | null ]
6003
6060
  /**
6004
6061
  * Fetches the GDEF class of the requested glyph in the specified face.
6005
6062
  * @param face The #hb_face_t to work on
@@ -6300,7 +6357,7 @@ function ot_layout_table_select_script(face: face_t, table_tag: tag_t, script_co
6300
6357
  *
6301
6358
  * However, if the requested constant is #HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN,
6302
6359
  * #HB_OT_MATH_CONSTANT_SCRIPT_SCRIPT_PERCENT_SCALE_DOWN or
6303
- * #HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN, then the return value is
6360
+ * #HB_OT_MATH_CONSTANT_RADICAL_DEGREE_BOTTOM_RAISE_PERCENT, then the return value is
6304
6361
  * an integer between 0 and 100 representing that percentage.
6305
6362
  * @param font #hb_font_t to work upon
6306
6363
  * @param constant #hb_ot_math_constant_t the constant to retrieve
@@ -6564,7 +6621,7 @@ function ot_tags_from_script(script: script_t): [ /* script_tag_1 */ tag_t, /* s
6564
6621
  * @param script_count maximum number of script tags to retrieve (IN) and actual number of script tags retrieved (OUT)
6565
6622
  * @param language_count maximum number of language tags to retrieve (IN) and actual number of language tags retrieved (OUT)
6566
6623
  */
6567
- function ot_tags_from_script_and_language(script: script_t, language: language_t, script_count?: number, language_count?: number): [ /* script_count */ number, /* script_tags */ tag_t, /* language_count */ number, /* language_tags */ tag_t ]
6624
+ function ot_tags_from_script_and_language(script: script_t, language: language_t | null, script_count?: number, language_count?: number): [ /* script_count */ number, /* script_tags */ tag_t, /* language_count */ number, /* language_tags */ tag_t ]
6568
6625
  /**
6569
6626
  * Converts a script tag and a language tag to an #hb_script_t and an
6570
6627
  * #hb_language_t.
@@ -7275,7 +7332,7 @@ function shape_plan_get_empty(): shape_plan_t
7275
7332
  * @param shape_plan A shaping plan
7276
7333
  * @returns The shaper
7277
7334
  */
7278
- function shape_plan_get_shaper(shape_plan: shape_plan_t): string | null
7335
+ function shape_plan_get_shaper(shape_plan: shape_plan_t): string
7279
7336
  /**
7280
7337
  * Searches variation axes of a #hb_font_t object for a specific axis first,
7281
7338
  * if not set, then tries to get default style values from different
@@ -7473,24 +7530,6 @@ function variation_from_string(str: Uint8Array): [ /* returnType */ bool_t, /* v
7473
7530
  * @param variation an #hb_variation_t to convert
7474
7531
  */
7475
7532
  function variation_to_string(variation: variation_t): /* buf */ string[]
7476
- /**
7477
- * Returns library version as three integer components.
7478
- */
7479
- function version(): [ /* major */ number, /* minor */ number, /* micro */ number ]
7480
- /**
7481
- * Tests the library version against a minimum value,
7482
- * as three integer components.
7483
- * @param major Library major version component
7484
- * @param minor Library minor version component
7485
- * @param micro Library micro version component
7486
- * @returns `true` if the library is equal to or greater than the test value, `false` otherwise
7487
- */
7488
- function version_atleast(major: number, minor: number, micro: number): bool_t
7489
- /**
7490
- * Returns library version as a string with three components.
7491
- * @returns Library version string
7492
- */
7493
- function version_string(): string | null
7494
7533
  /**
7495
7534
  * A callback method for #hb_buffer_t. The method gets called with the
7496
7535
  * #hb_buffer_t it was set on, the #hb_font_t the buffer is shaped with and a
@@ -7504,7 +7543,7 @@ function version_string(): string | null
7504
7543
  * @returns `true` to perform the shaping step, `false` to skip it.
7505
7544
  */
7506
7545
  interface buffer_message_func_t {
7507
- (buffer: buffer_t, font: font_t, message: string | null): bool_t
7546
+ (buffer: buffer_t, font: font_t, message: string): bool_t
7508
7547
  }
7509
7548
  /**
7510
7549
  * A virtual method for the #hb_color_line_t to fetch color stops.
@@ -8657,7 +8696,7 @@ interface language_t {
8657
8696
  * Converts an #hb_language_t to a string.
8658
8697
  * @returns A `NULL`-terminated string representing the @language. Must not be freed by the caller.
8659
8698
  */
8660
- _string(): string | null
8699
+ _string(): string
8661
8700
  }
8662
8701
 
8663
8702
  /**
package/package.json CHANGED
@@ -1,13 +1,19 @@
1
1
  {
2
2
  "name": "@girs/harfbuzz-0.0",
3
- "version": "7.1.0-3.2.2",
4
- "description": "GJS TypeScript type definitions for HarfBuzz-0.0, generated from library version 7.1.0",
3
+ "version": "8.1.1-3.2.8",
4
+ "description": "GJS TypeScript type definitions for HarfBuzz-0.0, generated from library version 8.1.1",
5
5
  "type": "module",
6
6
  "module": "harfbuzz-0.0.js",
7
7
  "main": "harfbuzz-0.0.js",
8
8
  "exports": {
9
- "./ambient": "./harfbuzz-0.0-ambient.d.ts",
10
- "./import": "./harfbuzz-0.0-import.d.ts",
9
+ "./ambient": {
10
+ "types": "./harfbuzz-0.0-ambient.d.ts",
11
+ "default": "./harfbuzz-0.0-ambient.js"
12
+ },
13
+ "./import": {
14
+ "types": "./harfbuzz-0.0-import.d.ts",
15
+ "default": "./harfbuzz-0.0-import.js"
16
+ },
11
17
  ".": {
12
18
  "import": {
13
19
  "types": "./harfbuzz-0.0.d.ts",
@@ -25,10 +31,10 @@
25
31
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit harfbuzz-0.0.d.cts"
26
32
  },
27
33
  "dependencies": {
28
- "@girs/freetype2-2.0": "^2.0.0-3.2.2",
29
- "@girs/gjs": "^3.2.2",
30
- "@girs/glib-2.0": "^2.77.0-3.2.2",
31
- "@girs/gobject-2.0": "^2.77.0-3.2.2"
34
+ "@girs/freetype2-2.0": "^2.0.0-3.2.8",
35
+ "@girs/gjs": "^3.2.8",
36
+ "@girs/glib-2.0": "^2.77.0-3.2.8",
37
+ "@girs/gobject-2.0": "^2.77.0-3.2.8"
32
38
  },
33
39
  "devDependencies": {
34
40
  "typescript": "*"
@@ -45,7 +51,7 @@
45
51
  "license": "MIT",
46
52
  "repository": {
47
53
  "type": "git",
48
- "url": "git+https://github.com/gjsify/types.git"
54
+ "url": "git+https://github.com/gjsify/ts-for-gir.git"
49
55
  },
50
56
  "bugs": {
51
57
  "url": "https://github.com/gjsify/ts-for-gir/issues"