-static hb_bool_t
-hb_position_complex (hb_font_t *font,
- hb_face_t *face,
- hb_buffer_t *buffer,
- hb_feature_t *features,
- unsigned int num_features)
-{
- return _hb_ot_position_complex (font, face, buffer, features, num_features);
-}
-
-static void
-hb_position_fallback (hb_font_t *font HB_UNUSED,
- hb_face_t *face HB_UNUSED,
- hb_buffer_t *buffer HB_UNUSED,
- hb_feature_t *features HB_UNUSED,
- unsigned int num_features HB_UNUSED)
-{
- /* TODO Mark pos */
-}
-
-static void
-hb_truetype_kern (hb_font_t *font,
- hb_face_t *face,
- hb_buffer_t *buffer,
- hb_feature_t *features HB_UNUSED,
- unsigned int num_features HB_UNUSED)
-{
- unsigned int count;
-
- /* TODO Check for kern=0 */
- count = buffer->in_length;
- for (buffer->in_pos = 1; buffer->in_pos < count; buffer->in_pos++) {
- hb_position_t kern, kern1, kern2;
- kern = hb_font_get_kerning (font, face, buffer->in_string[buffer->in_pos - 1].codepoint, IN_CURGLYPH());
- kern1 = kern >> 1;
- kern2 = kern - kern1;
- buffer->positions[buffer->in_pos - 1].x_advance += kern1;
- buffer->positions[buffer->in_pos].x_advance += kern2;
- buffer->positions[buffer->in_pos].x_offset += kern2;
+ /* If language is not set, use default language from locale */
+ if (buffer->props.language == HB_LANGUAGE_INVALID) {
+ /* TODO get_default_for_script? using $LANGUAGE */
+ buffer->props.language = hb_language_get_default ();