src/training/pango/boxchar.cpp
void BoxChar::PrepareToWrite(std::vector<BoxChar *> *boxes) {
  bool rtl_rules = ContainsMostlyRTL(*boxes);
  bool vertical_rules = MostlyVertical(*boxes);
  InsertNewlines(rtl_rules, vertical_rules, boxes);
  InsertSpaces(rtl_rules, vertical_rules, boxes);
  for (size_t i = 0; i < boxes->size(); ++i) {
    if ((*boxes)[i]->box_ == nullptr) {
      tprintf("Null box at index %zu\n", i);
    }
  }
  if (rtl_rules) {
    ReorderRTLText(boxes);
  }
}
// Prepares for writing the boxes to a file by inserting newlines, spaces,
// and re-ordering so the boxes are strictly left-to-right.
/* static */
Prepares for writing the boxes to a file by inserting newlines, spaces,
and re-ordering so the boxes are strictly left-to-right.
static
Prepares for writing the boxes to a file by inserting newlines spaces and re - ordering so the boxes are strictly left - to - right . static
void BoxChar::PrepareToWrite(std::vector<BoxChar *> *boxes) {
  bool rtl_rules = ContainsMostlyRTL(*boxes);
  bool vertical_rules = MostlyVertical(*boxes);
  InsertNewlines(rtl_rules, vertical_rules, boxes);
  InsertSpaces(rtl_rules, vertical_rules, boxes);
  for (size_t i = 0; i < boxes->size(); ++i) {
    if ((*boxes)[i]->box_ == nullptr) {
      tprintf("Null box at index %zu\n", i);
    }
  }
  if (rtl_rules) {
    ReorderRTLText(boxes);
  }
}
void BoxChar :: PrepareToWrite ( std :: vector < BoxChar * > * boxes ) { bool rtl_rules = ContainsMostlyRTL ( * boxes ) ; bool vertical_rules = MostlyVertical ( * boxes ) ; InsertNewlines ( rtl_rules , vertical_rules , boxes ) ; InsertSpaces ( rtl_rules , vertical_rules , boxes ) ; for ( size_t i = 0 ; i < boxes -> size ( ) ; ++ i ) { if ( ( * boxes ) [ i ] -> box_ == nullptr ) { tprintf ( " \n " , i ) ; } } if ( rtl_rules ) { ReorderRTLText ( boxes ) ; } }
Prepares for writing the boxes to a file by inserting newlines, spaces,
and re-ordering so the boxes are strictly left-to-right.
Prepares for writing the boxes to a file by inserting newlines spaces and re - ordering so the boxes are strictly left - to - right .