[HarfBuzz] HarfBuzz 0.6.0 released
Behdad Esfahbod
behdad at behdad.org
Fri May 27 00:51:43 PDT 2011
Hi all,
On April 15th, Ryan Lortie and I met for a day-long HarfBuzz API review. My
aim was to get an external view of the API. We identified about a dozen
issues and started fixing them. In the weeks that followed and as I fixed
more of the issues, I discovered more items that needed fix. The list
eventually grew to more than 50 items, but I'm happy to announce that it's
over now, and I do not incompatible API changes moving forward.
Another major area that I focused on was adding unit tests for most of the
API. This helped identify many corner cases that were not being handled
correctly in the code. All are fixed.
As part of the API work, I also had to make sure that vertical text support
wouldn't conflict with our current API. As part of that, I ended up
implementing vertical support in GPOS processing, and make required API
changes. As such, in hb_font_funcs_t now has _h_ and _v_ versions of many of
the callbacks.
To celebrate these achievements, I just made a tarball release of HarfBuzz.
HarfBuzz 0.6.0 is available for download:
http://www.freedesktop.org/software/harfbuzz/release/
I'm hoping that distributions pick up packaging HarfBuzz and users start
relying on the API, while we get to finishing the shapers.
Note that currently the .so version is at 0. It will bump to 1 when HarfBuzz
1.0.0 is released.
An overview of the changes are copied to the end of this messages from the
NEWS file. Feel free to ask for clarification.
Thanks everyone for your help, patches, and testing!
Cheers,
Behdad Esfahbod
27 May 2011
Overview of changes leading to 0.6.0
Friday, May 27, 2011
====================================
- Vertical text support in GPOS
- Almost all API entries have unit tests now, under test/
- All thread-safety issues are fixed
Summary of API changes follows.
* Simple Types API:
o New API:
HB_LANGUAGE_INVALID
hb_language_get_default()
hb_direction_to_string()
hb_direction_from_string()
hb_script_get_horizontal_direction()
HB_UNTAG()
o Renamed API:
hb_category_t renamed to hb_unicode_general_category_t
o Changed API:
hb_language_t is a typed pointers now
o Removed API:
HB_TAG_STR()
* Use ISO 15924 tags for hb_script_t:
o New API:
hb_script_from_iso15924_tag()
hb_script_to_iso15924_tag()
hb_script_from_string()
o Changed API:
HB_SCRIPT_* enum members changed value.
* Buffer API streamlined:
o New API:
hb_buffer_reset()
hb_buffer_set_length()
hb_buffer_allocation_successful()
o Renamed API:
hb_buffer_ensure() renamed to hb_buffer_pre_allocate()
hb_buffer_add_glyph() renamed to hb_buffer_add()
o Removed API:
hb_buffer_clear()
hb_buffer_clear_positions()
o Changed API:
hb_buffer_get_glyph_infos() takes an out length parameter now
hb_buffer_get_glyph_positions() takes an out length parameter now
* Blob API streamlined:
o New API:
hb_blob_get_data()
hb_blob_get_data_writable()
o Renamed API:
hb_blob_create_empty() renamed to hb_blob_get_empty()
o Removed API:
hb_blob_lock()
hb_blob_unlock()
hb_blob_is_writable()
hb_blob_try_writable()
o Changed API:
hb_blob_create() takes user_data before destroy now
* Unicode functions API:
o Unicode function vectors can subclass other unicode function vectors now.
Unimplemented callbacks in the subclass automatically chainup to the parent.
o All hb_unicode_funcs_t callbacks take a user_data now. Their setters
take a user_data and its respective destroy callback.
o New API:
hb_unicode_funcs_get_empty()
hb_unicode_funcs_get_default()
hb_unicode_funcs_get_parent()
o Changed API:
hb_unicode_funcs_create() now takes a parent_funcs.
o Removed func getter functions:
hb_unicode_funcs_get_mirroring_func()
hb_unicode_funcs_get_general_category_func()
hb_unicode_funcs_get_script_func()
hb_unicode_funcs_get_combining_class_func()
hb_unicode_funcs_get_eastasian_width_func()
* Face API:
o Renamed API:
hb_face_get_table() renamed to hb_face_reference_table()
hb_face_create_for_data() renamed to hb_face_create()
o Changed API:
hb_face_create_for_tables() takes user_data before destroy now
hb_face_reference_table() returns empty blob instead of NULL
hb_get_table_func_t accepts the face as first parameter now
* Font API:
o Fonts can subclass other fonts now. Unimplemented callbacks in the
subclass automatically chainup to the parent. When chaining up,
scale is adjusted if the parent font has a different scale.
o All hb_font_funcs_t callbacks take a user_data now. Their setters
take a user_data and its respective destroy callback.
o New API:
hb_font_get_parent()
hb_font_funcs_get_empty()
hb_font_create_sub_font()
o Removed API:
hb_font_funcs_copy()
hb_font_unset_funcs()
o Removed func getter functions:
hb_font_funcs_get_glyph_func()
hb_font_funcs_get_glyph_advance_func()
hb_font_funcs_get_glyph_extents_func()
hb_font_funcs_get_contour_point_func()
hb_font_funcs_get_kerning_func()
o Changed API:
hb_font_create() takes a face and references it now
hb_font_set_funcs() takes user_data before destroy now
hb_font_set_scale() accepts signed integers now
hb_font_get_contour_point_func_t now takes glyph first, then point_index
hb_font_get_glyph_func_t returns a success boolean now
* Changed object model:
o All object types have a _get_empty() now:
hb_blob_get_empty()
hb_buffer_get_empty()
hb_face_get_empty()
hb_font_get_empty()
hb_font_funcs_get_empty()
hb_unicode_funcs_get_empty()
o Added _set_user_data() and _get_user_data() for all object types:
hb_blob_get_user_data()
hb_blob_set_user_data()
hb_buffer_get_user_data()
hb_buffer_set_user_data()
hb_face_get_user_data()
hb_face_set_user_data()
hb_font_funcs_get_user_data()
hb_font_funcs_set_user_data()
hb_font_get_user_data()
hb_font_set_user_data()
hb_unicode_funcs_get_user_data()
hb_unicode_funcs_set_user_data()
o Removed the _get_reference_count() from all object types:
hb_blob_get_reference_count()
hb_buffer_get_reference_count()
hb_face_get_reference_count()
hb_font_funcs_get_reference_count()
hb_font_get_reference_count()
hb_unicode_funcs_get_reference_count()
o Added _make_immutable() and _is_immutable() for all object types except
for buffer:
hb_blob_make_immutable()
hb_blob_is_immutable()
hb_face_make_immutable()
hb_face_is_immutable()
* Changed API for vertical text support
o The following callbacks where removed:
hb_font_get_glyph_advance_func_t
hb_font_get_kerning_func_t
o The following new callbacks added instead:
hb_font_get_glyph_h_advance_func_t
hb_font_get_glyph_v_advance_func_t
hb_font_get_glyph_h_origin_func_t
hb_font_get_glyph_v_origin_func_t
hb_font_get_glyph_h_kerning_func_t
hb_font_get_glyph_v_kerning_func_t
o The following API removed as such:
hb_font_funcs_set_glyph_advance_func()
hb_font_funcs_set_kerning_func()
hb_font_get_glyph_advance()
hb_font_get_kerning()
o New API added instead:
hb_font_funcs_set_glyph_h_advance_func()
hb_font_funcs_set_glyph_v_advance_func()
hb_font_funcs_set_glyph_h_origin_func()
hb_font_funcs_set_glyph_v_origin_func()
hb_font_funcs_set_glyph_h_kerning_func()
hb_font_funcs_set_glyph_v_kerning_func()
hb_font_get_glyph_h_advance()
hb_font_get_glyph_v_advance()
hb_font_get_glyph_h_origin()
hb_font_get_glyph_v_origin()
hb_font_get_glyph_h_kerning()
hb_font_get_glyph_v_kerning()
o The following higher-leve API added for convenience:
hb_font_get_glyph_advance_for_direction()
hb_font_get_glyph_origin_for_direction()
hb_font_add_glyph_origin_for_direction()
hb_font_subtract_glyph_origin_for_direction()
hb_font_get_glyph_kerning_for_direction()
hb_font_get_glyph_extents_for_origin()
hb_font_get_glyph_contour_point_for_origin()
* OpenType Layout API:
o New API:
hb_ot_layout_position_start()
hb_ot_layout_substitute_start()
hb_ot_layout_substitute_finish()
* Glue code:
o New API:
hb_glib_script_to_script()
hb_glib_script_from_script()
hb_icu_script_to_script()
hb_icu_script_from_script()
* Version API added:
o New API:
HB_VERSION_MAJOR
HB_VERSION_MINOR
HB_VERSION_MICRO
HB_VERSION_STRING
HB_VERSION_CHECK()
hb_version()
hb_version_string()
hb_version_check()
More information about the HarfBuzz
mailing list