private static void AnalyzeForBreakPositions(List <TextRun> itemRuns, string itemsText)
 {
     if (itemsText.Length != 0)
     {
         SCRIPT_ANALYSIS  sCRIPT_ANALYSIS = itemRuns[0].SCRIPT_ANALYSIS;
         SCRIPT_LOGATTR[] array           = new SCRIPT_LOGATTR[itemsText.Length];
         int num = Win32.ScriptBreak(itemsText, itemsText.Length, ref sCRIPT_ANALYSIS, array);
         if (Win32.Failed(num))
         {
             Marshal.ThrowExceptionForHR(num);
         }
         int num2 = 0;
         for (int i = 0; i < itemRuns.Count; i++)
         {
             TextRun          textRun = itemRuns[i];
             int              length  = textRun.Text.Length;
             SCRIPT_LOGATTR[] array2  = new SCRIPT_LOGATTR[length];
             Array.Copy(array, num2, array2, 0, length);
             textRun.ScriptLogAttr = array2;
             num2 += length;
         }
     }
 }