Commit Graph

188 Commits

Author SHA1 Message Date
Behdad Esfahbod ad17699089 [map] Add is_equal() / towards making hb_map_t hashable
New API:
+ hb_map_is_equal()
2022-05-19 13:36:12 -06:00
Behdad Esfahbod 0a38878549 [set] Minor touch-up on the previous commit 2022-03-25 09:42:36 -06:00
Khaled Hosny 116cc69236 [set] Fix documentation 2022-03-22 00:15:23 +02:00
Behdad Esfahbod 4289684cdb [set] Fix-up previous commits 2022-03-21 15:37:05 -06:00
Khaled Hosny a34eea3013 [doc] Add experimental repacker API to private section
Hides the warning about them until they are no longer experimental.
2022-03-11 19:57:53 +02:00
Garret Rieger f6071c16b0
[subset] Rename codepoint -> unicode in subset plan api 2022-02-28 23:45:40 +02:00
Khaled Hosny 1b5a2e0809 [doc] Various fixes to newly added documentation 2022-02-28 10:11:42 -07:00
Matthias Clasen f6efe34f5e [ot-metrics] Synthesize missing metrics
Add a variant of hb_ot_metrics_get_position that
synthesizes missing values.

New api: hb_ot_metrics_get_position_with_fallback
2022-02-17 18:34:59 -06:00
Behdad Esfahbod f8e9e315bb
Merge pull request #3437 from matthiasclasen/synthesize-missing-baselines
[BASE] Synthesize missing baselines
2022-02-17 14:34:46 -06:00
Matthias Clasen f81578fd86 [ot-layout] Synthesize missing baselines
Add a variation of hb_ot_layout_get_baseline that
synthesizes missing baselines, using heuristics in part
taken from the CSS Inline Layout Module, Level 3.

Includes some new tests for synthesized baselines.
The base2.ttf is a subset of Noto Sans Bengali that
includes just the Bengali Ka.

New API: hb_ot_layout_get_baseline_with_fallback
2022-02-16 17:37:33 -06:00
Behdad Esfahbod 5de67c8961 [ot-layout] Remove commented-out prototypes
Not gonna happen.
2022-02-16 17:08:19 -06:00
Behdad Esfahbod 98079109e6 [ot-layout] Add +hb_ot_layout_get_horizontal_baseline_tag_for_script()
New API:
+hb_ot_layout_get_horizontal_baseline_tag_for_script()
2022-02-16 13:54:22 -06:00
Behdad Esfahbod 2376230523 [draw] Flesh out docs a bit 2022-02-13 13:21:14 -06:00
Alexis King 81754a5a96 [ot-math] Add hb_ot_math_get_glyph_kernings
closes #3396
2022-02-09 12:03:07 -06:00
Alexis King 1bc4bad7a5 [ot-tag] Add HB_SCRIPT_MATH (Zmth) and map it to OT ‘math’ tag
The ISO 15924 code for mathematical notation is ‘Zmth’, but the
OpenType script is ‘math’.
2022-02-08 12:40:15 -06:00
Behdad Esfahbod 52f5711ed0 [buffer] Add hb_buffer_create_similar()
Fixes https://github.com/harfbuzz/harfbuzz/issues/1555
2022-01-03 11:57:42 -07:00
Behdad Esfahbod 6a66992842 Add hb_segment_properties_overlay()
New API:
+ hb_segment_properties_overlay()
2022-01-03 11:21:29 -07:00
Behdad Esfahbod 165a6073fa
Merge pull request #3338 from harfbuzz/slant
[font] Add public API for synthetic slant
2022-01-02 12:02:20 -07:00
Behdad Esfahbod a7751277e9 [docs] Add hb_font_[gs]et_synthetic_slant() 2022-01-02 11:50:02 -07:00
Behdad Esfahbod a3265e1e07 Typo 2022-01-02 10:02:41 -07:00
Behdad Esfahbod 6356da88ee [docs] Update 2022-01-02 07:55:56 -07:00
Behdad Esfahbod da500568de [API] Add hb_buffer_[sg]et_not_found_glyph() and --not-found-glyph
Instead of using gid=0 when a character is not found in the font,
client can now set a custom value.  This is useful for shaper-driven
font fallback and to differentiate that from .notdef glyph.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1360
2021-10-26 08:02:29 -06:00
Garret Rieger f4649f3895 [subset] restore hb_subset_input_unicode/glyph_set () to documentation. 2021-09-16 15:31:29 -06:00
Khaled Hosny eb4075a1ed [style] Fix documentation
Message documentation a bit to get it working.
2021-09-13 10:10:10 -06:00
Khaled Hosny 9b7af950b3 [docs] Fix subset documentation
List the missing new APIs and unlist all the to be deleted legacy APIs.
2021-09-07 15:05:42 +02:00
Behdad Esfahbod 829b0f3353
Merge pull request #3154 from harfbuzz/set-invert
Resurrect hb_set_invert()
2021-08-20 01:28:15 -06:00
Khaled Hosny 80ff72f39d [doc] Misc fixes 2021-08-18 13:16:51 +02:00
Behdad Esfahbod f0c3804fa2 [set] Add hb_bit_set_invertible_t and resurrect hb_set_invert()
Implementation is NOT complete yet.
2021-08-17 19:53:43 -06:00
Khaled Hosny ec99fdb7e8 [sebset] Use [s|g]et_flag for retain_all_layout_features
Looks like this was missed when adding hb_subset_input_[s|g]et_flag()
2021-07-26 19:32:28 +02:00
Khaled Hosny acc7100a3f [docs] Improve subset documentation 2021-07-26 02:18:23 +02:00
Garret Rieger 1b6c1aa684 [subset] add hb-subset api to documentation generator.
Standardize subset_input parameter to be input.
2021-07-22 12:15:45 -07:00
Behdad Esfahbod bdfed8f113 [blob] Add failing versions of create API
Fixes https://github.com/harfbuzz/harfbuzz/issues/2567

New API:
+hb_blob_create_or_fail()
+hb_blob_create_from_file_or_fail()

Use these in util/ to distinguish empty file from not-found file.
Only err on the latter.
2021-06-15 13:56:30 -06:00
Behdad Esfahbod 3962225a72 [set] Add hb_set_copy()
Fixes https://github.com/harfbuzz/harfbuzz/issues/3016
2021-06-09 14:02:31 -06:00
Khaled Hosny 9b8be9643c [docs] Ignore hb-gobject headers
Fixes https://github.com/harfbuzz/harfbuzz/issues/2797
2021-01-20 14:23:37 -08:00
Khaled Hosny 3d7a361648 [docs] Miscellaneous missing docs 2020-12-30 19:21:49 -08:00
Khaled Hosny 8e8c3e5878 [docs] Complete hb-ot-layout docs a bit 2020-12-30 19:21:49 -08:00
Khaled Hosny aa107e657b [docs] Complete hb-font docs a bit 2020-12-30 19:21:49 -08:00
Khaled Hosny ff96f73f8f [docs] Add some missing API to harfbuzz-sections.txt 2020-12-24 21:53:11 +02:00
Khaled Hosny b029a45caa [docs] Add new API to harfbuzz-sections.txt 2020-12-22 23:52:10 +02:00
Behdad Esfahbod 3232e6f2a9 [buffer] Add hb_buffer_has_positions()
Fixes https://github.com/harfbuzz/harfbuzz/issues/2716
2020-10-15 00:20:17 -06:00
Ebrahim Byagowi 1bac85828c [layout] Rename _get_alternates to _get_glyph_alternates 2020-06-18 22:56:07 +04:30
Ebrahim Byagowi 1348a2c865 [layout] hb_ot_layout_lookup_get_alternates, a new API
An API to retrieve one-to-one alternates from a given GSUB lookup index.
2020-06-18 09:11:07 +04:30
Qunxin Liu 973c47f6c9 [subset] Move 2 experimental public api methods to be private methods in GSUB/GPOS.
2 methods are: hb_ot_layout_closure_lookups and hb_ot_layout_closure_features
2020-06-12 01:20:30 +04:30
Ebrahim Byagowi 759df46575 [style] Hide behind HB_EXPERIMENTAL_API compile flag 2020-06-04 20:33:39 +04:30
Ebrahim Byagowi 22037499b4 [style] New experimental API, hb_style_get_value
Searches variation axes of a hb_font_t object for a specific axis first,
if not set, then tries to get default style values from different
tables of the font.
2020-06-04 20:33:39 +04:30
Ebrahim Byagowi 755a77d660 Move outline draw API behind HB_EXPERIMENTAL_API directive 2020-03-13 08:25:53 +03:30
Ebrahim Byagowi ab2d3ec542 [var] Implement hb_font_get_var_coords_design
Hold design coords and simulate when normalized coords are set directly.
2020-02-08 11:04:34 +03:30
Ebrahim Byagowi b4d3bf1d8a [draw] Add hb_draw_funcs_is_immutable and hb_draw_funcs_make_immutable 2020-02-06 11:52:32 +03:30
Ebrahim Byagowi 74fdcdcac8 [draw] Rename conic_to to quadratic_to 2020-01-28 13:45:22 +03:30
Ebrahim Byagowi ac81e94016 Rename hb_outline_decompose to hb_font_draw_glyph and hb_outline_decompose_funcs_t to hb_draw_funcs_t 2020-01-28 13:24:49 +03:30
Ebrahim Byagowi 981125aa2a Rename hb_ot_glyph_* to hb_outline_* 2020-01-27 23:43:54 +03:30
Ebrahim Byagowi 7633b7695e
Merge pull request #2016 from ebraminio/glyf
Implement glyph outline path API
2020-01-23 18:51:40 +03:30
Ebrahim Byagowi 02f324c949 [ot-glyph] remove open callback
Apparently it wasn't requested actually and can be detected easily
as paths are opened usually when move command is issued anyway.
2020-01-23 15:12:15 +03:30
Ebrahim Byagowi 79fed9a1e4 [ot-glyph] Add open/close callbacks 2020-01-14 17:34:59 +03:30
Ebrahim Byagowi ec1fba1388 [ot-glyph] make hb_ot_glyph_decompose_funcs_t struct opaque 2020-01-14 15:55:23 +03:30
Qunxin Liu 8ffc9add22 [subset] layout closure_features and store them in subset-plan 2020-01-14 07:24:48 +03:30
Qunxin Liu 0b39c48064 [subset] closure lookups for GSUB/GPOS 2020-01-10 13:11:06 -08:00
Ebrahim Byagowi 084a8182fb [ot-glyphs] Move CFF glyph decompose logic to their tables
Thus making path decompose zero alloc on CFF/CFF2
2020-01-10 22:56:43 +03:30
Ebrahim Byagowi 0b559d750f [ot-glyph] Improve API names 2020-01-10 14:25:07 +03:30
Behdad Esfahbod d5338ba189 [ft] Add locking FT_Face API
Now that we mutex our internal FT_Face, share it with clients.

New API:
- hb_ft_font_lock_face()
- hb_ft_font_unlock_face()
2019-11-22 16:22:27 -05:00
Behdad Esfahbod d6ad613159 [docs] Misc fixes 2019-09-30 10:40:25 -07:00
Behdad Esfahbod e56d4ff43b Rename hb_ot_meta_get_entries() to +hb_ot_meta_get_entry_tags() 2019-08-13 21:02:47 -07:00
Ebrahim Byagowi 9f2b4956b4
[base] Add hb_ot_layout_get_baseline API 2019-07-30 04:42:51 +04:30
Ebrahim Byagowi 40a4b6ddbd [var] Add a new API, hb_font_set_var_named_instance 2019-07-29 16:23:47 -07:00
Ebrahim Byagowi 62932c14bd [meta] Rename ot-metadata to ot-meta per review 2019-07-25 17:49:51 -07:00
Ebrahim Byagowi 3ac03bd67c [meta] New API, hb_ot_metadata_reference_entry for fetching meta entries 2019-07-25 17:49:51 -07:00
Ebrahim Byagowi eb8bd2f7ec Add hb_gdi_face_create API
Based on Konstantin Ritt work posted on mailing list
2019-07-21 14:22:19 -07:00
Behdad Esfahbod e540d402f6 [docs] Minor 2019-07-20 12:09:34 -07:00
Ebrahim Byagowi 87e628436e Implement a simple API for fetching opentype metrics
Fixes https://github.com/harfbuzz/harfbuzz/pull/1432
2019-07-18 14:15:58 -07:00
Behdad Esfahbod 0819f3ca86 Deprecate v_kerning callback again
Part of https://github.com/harfbuzz/harfbuzz/issues/1682
2019-06-17 14:02:47 -07:00
Behdad Esfahbod 2682efb02d Revert "Deprecate font kern API"
This reverts commit d219f899f4.

API change: Un-deprecate font kern API.

Part of https://github.com/harfbuzz/harfbuzz/issues/1682

We should document that this API is only necessary to hook up
non-OpenType kerning.  hb-ot-font will continue to NOT implement them.
2019-06-17 13:38:49 -07:00
Ebrahim Byagowi b292772e6e
[dwrite] A new API, hb_directwrite_face_get_font_face (#1600)
Can be useful when using HarfBuzz for font loading and shaping
but using DirectWrite for rendering.
2019-03-29 13:00:56 -07:00
Khaled Hosny a17ed8459e [doc] Move hb_variation_t to hb-common section 2019-02-19 15:18:48 -05:00
Khaled Hosny 9caabc9cf8 [doc] Move feature_t and its function to hb-common
It is rather confusing to have script, language etc, in hb-common section
while feature is in hb-shape section. I keep looking for it in hb-common
section then using the API index because I can’t find it there.
2019-02-19 14:09:52 -05:00
Ebrahim Byagowi 01f628cf55 [aat] Expose hb_aat_layout_has_tracking API 2018-12-03 22:27:26 +03:30
Behdad Esfahbod d19b1680b5 [aat] Expose a couple APIs
New API:
+hb_aat_layout_has_substitution()
+hb_aat_layout_has_positioning()
2018-12-03 10:41:37 -05:00
Behdad Esfahbod 926f512f35 [aat.feat] Rework API and implementation
Fixes https://github.com/harfbuzz/harfbuzz/pull/1346
2018-11-25 01:16:02 -05:00
Behdad Esfahbod e20f81f4fa [aat] Rename feat API a bit more 2018-11-25 01:16:02 -05:00
Ebrahim Byagowi 54f4c17f0a [feat] Rename API uses of setting to selector 2018-11-25 01:16:02 -05:00
Ebrahim Byagowi 9c64b216ec [feat] Apply renamings and add documentation 2018-11-25 01:16:02 -05:00
Behdad Esfahbod f48bb9a393 [var] Deprecated axis enumeration API and add new version
New version has axis flags.

New API:
+hb_ot_var_axis_info_t
+hb_ot_var_find_axis_info()
+hb_ot_var_get_axis_infos()

Deprecated API:
-HB_OT_VAR_NO_AXIS_INDEX
-hb_ot_var_axis_t
-hb_ot_var_find_axis()
-hb_ot_var_get_axes()
2018-11-20 20:46:14 -05:00
Behdad Esfahbod 587d49fc65 [fvar] Add named-instance API
Fixes https://github.com/harfbuzz/harfbuzz/issues/1241
2018-11-19 14:51:34 -05:00
Behdad Esfahbod 1a2eb108b8 [ot-var] Add hb_ot_var_axis_get_flags()
Part of https://github.com/harfbuzz/harfbuzz/issues/1241

New API:
+hb_ot_var_axis_flags_t
+hb_ot_var_axis_get_flags
2018-11-19 12:36:56 -05:00
Behdad Esfahbod a7aba99baa [name] Rename hb_name_id_t to hb_ot_name_id_t
https://github.com/harfbuzz/harfbuzz/pull/1254
2018-10-30 14:04:09 -07:00
Ebrahim Byagowi 3d4c1f6a41 [ot-color] Apply Behdad reviews 2018-10-28 18:33:10 -07:00
Ebrahim Byagowi dbd419bede [ot-color] Add public API for CBDT/sbix/SVG color Emojis 2018-10-28 18:33:10 -07:00
Behdad Esfahbod 6ce49a921a [name] Change hb_name_id_t back to unsigned int
d941f66c75 (commitcomment-31076011)
2018-10-28 08:26:30 -07:00
Behdad Esfahbod 46072b7cb5 [ot] Fold hb-ot-tag.h into hb-ot-layout.h 2018-10-27 04:47:41 -07:00
Behdad Esfahbod 00cf4e5eb6 [docs] Fill in some sections 2018-10-27 04:47:41 -07:00
Behdad Esfahbod d941f66c75 [name] Make hb_name_id_t be the enum
This is like hb_script_t.

We had this exposed as unsigned int since 2.0.0 release in two APIs,
as well as hb_ot_layout_get_size_params() from earlier.
But since no one uses those (right?!), let's just fix this now.
2018-10-27 03:06:14 -07:00
Behdad Esfahbod 3b7e5f1313 [name] Rename hb_ot_name_get_names() to hb_ot_name_list_names()
And swap return value positions, so can be annotated for gobject-introspectin.
2018-10-27 03:06:14 -07:00
Behdad Esfahbod e7400c0275 [docs] Hook up new symbols 2018-10-26 22:24:40 -07:00
Ebrahim Byagowi eceeb85666
[docs] Add hb-ot-color section 2018-10-26 00:23:45 +03:30
Ebrahim Byagowi dc49bd8d81 Add two APIs for getting stylistic set labels
* hb_ot_layout_feature_get_characters
* hb_ot_layout_feature_get_name_ids

However HarfBuzz currently doesn't expose an API for retrieving the actual
information associated with NameId from the `name` table and that should be
done separately.
2018-10-12 16:06:39 -04:00
David Corbett 7f1fbfe2e3 Add hb_ot_tags_to_script_and_language 2018-10-11 13:54:28 -04:00
David Corbett 2c7d4db7af Deprecate obsolete functions
`hb_ot_tags` replaces `hb_ot_tags_from_script` and
`hb_ot_tag_from_language`.

`hb_ot_layout_table_select_script` replaces
`hb_ot_layout_table_choose_script`.

`hb_ot_layout_script_select_language` replaces
`hb_ot_layout_script_find_language`.
2018-10-11 13:54:28 -04:00
David Corbett 91067716f5 Refactor the selection of script and language tags
The old hb-ot-tag.cc functions, `hb_ot_tags_from_script` and
`hb_ot_tag_from_language`, are now wrappers around a new function:
`hb_ot_tags`. It converts a script and a language to arrays of script
tags and language tags. This will make it easier to add new script tags
to scripts, like 'dev3'. It also allows for language fallback chains;
nothing produces more than one language yet though.

Where the old functions return the default tags 'DFLT' and 'dflt',
`hb_ot_tags` returns an empty array. The caller is responsible for
using the default tag in that case.

The new function also adds a new private use subtag syntax for script
overrides: "x-hbscabcd" requests a script tag of 'abcd'.

The old hb-ot-layout.cc functions,`hb_ot_layout_table_choose_script` and
`hb_ot_layout_script_find_language` are now wrappers around the new
functions `hb_ot_layout_table_select_script` and
`hb_ot_layout_script_select_language`. They are essentially the same as
the old ones plus a tag count parameter.

Closes #495.
2018-10-11 13:54:28 -04:00
Behdad Esfahbod b314c4e9ab [font] Add get_nominal_glyphs() callback (note the plural)
Unused as of now.  To be wired up to normalizer, which would remove
overhead and allow hb-ot-font initialization to become a no-op, so
we can enable it by default.
2018-10-09 09:43:44 -04:00
Behdad Esfahbod d219f899f4 Deprecate font kern API 2018-10-09 00:01:09 -04:00
Behdad Esfahbod 26d7305da7 Deprecate decompose_compatibility stuff 2018-10-08 22:31:35 -04:00