Returns a debug string summarizing the table.
| 321 | |
| 322 | // Returns a debug string summarizing the table. |
| 323 | STRING ShapeTable::SummaryStr() const { |
| 324 | int max_unichars = 0; |
| 325 | int num_multi_shapes = 0; |
| 326 | int num_master_shapes = 0; |
| 327 | for (int s = 0; s < shape_table_.size(); ++s) { |
| 328 | if (MasterDestinationIndex(s) != s) continue; |
| 329 | ++num_master_shapes; |
| 330 | int shape_size = GetShape(s).size(); |
| 331 | if (shape_size > 1) |
| 332 | ++num_multi_shapes; |
| 333 | if (shape_size > max_unichars) |
| 334 | max_unichars = shape_size; |
| 335 | } |
| 336 | STRING result; |
| 337 | result.add_str_int("Number of shapes = ", num_master_shapes); |
| 338 | result.add_str_int(" max unichars = ", max_unichars); |
| 339 | result.add_str_int(" number with multiple unichars = ", num_multi_shapes); |
| 340 | return result; |
| 341 | } |
| 342 | |
| 343 | |
| 344 | // Adds a new shape starting with the given unichar_id and font_id. |
no test coverage detected