Sets unset buffer segment properties based on buffer Unicode contents.
If buffer is not empty, it must have content type UNICODE.
If buffer script is not set (ie. is INVALID), it will be set to the Unicode script of the first character in the buffer that has a script other than COMMON , INHERITED, and UNKNOWN.
Next, if buffer direction is not set (ie. is INVALID), it will be set to the natural horizontal direction of the buffer script as returned by get_horizontal_direction. If get_horizontal_direction returns INVALID, then 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 get_default. This may change in the future by taking
buffer script into consideration when choosing a language. Note that
get_default is NOT threadsafe the first time it is called. See documentation for that function for details.
| buffer |
An Buffer |