Skip to content

getCharIndices #3

@srl295

Description

@srl295

are harfbuzz's CharIndices pre-indexed? I had to ignore the indexBase param to get the same value as ICU. Some mismatch here.

index b0bbe63..7d760fd 100644

--- a/src/LayoutEngine.cpp
+++ b/src/LayoutEngine.cpp
@@ -178,7 +178,7 @@ void LayoutEngine::getCharIndices(le_int32 charIndices[], le_int32 indexBase, LE
   unsigned int count;
   const hb_glyph_info_t *info = hb_buffer_get_glyph_infos (fHbBuffer, &count);
   for (unsigned int i = 0; i < count; i++)
-    charIndices[i] = info[i].cluster + indexBase;
+    charIndices[i] = info[i].cluster; // + indexBase;
 }

 void LayoutEngine::getCharIndices(le_int32 charIndices[], LEErrorCode &success) const

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions