bufferGuessSegmentProperties

Sets unset buffer segment properties based on buffer Unicode contents. If buffer is not empty, it must have content type %HB_BUFFER_CONTENT_TYPE_UNICODE.

If buffer script is not set (ie. is %HB_SCRIPT_INVALID), it will be set to the Unicode script of the first character in the buffer that has a script other than %HB_SCRIPT_COMMON, %HB_SCRIPT_INHERITED, and %HB_SCRIPT_UNKNOWN.

Next, if buffer direction is not set (ie. is %HB_DIRECTION_INVALID), it will be set to the natural horizontal direction of the buffer script as returned by hb_script_get_horizontal_direction(). If hb_script_get_horizontal_direction() returns %HB_DIRECTION_INVALID, then %HB_DIRECTION_LTR is used.

Finally, if buffer language is not set (ie. is %HB_LANGUAGE_INVALID), it will be set to the process's default language as returned by hb_language_get_default(). This may change in the future by taking buffer script into consideration when choosing a language. Note that hb_language_get_default() is NOT threadsafe the first time it is called. See documentation for that function for details.

Since

0.9.7

Parameters

buffer

An #hb_buffer_t