| 508 | } |
| 509 | |
| 510 | void BMFontConfiguration::parseKerningEntry(const char* line) |
| 511 | { |
| 512 | ////////////////////////////////////////////////////////////////////////// |
| 513 | // line to parse: |
| 514 | // kerning first=121 second=44 amount=-7 |
| 515 | ////////////////////////////////////////////////////////////////////////// |
| 516 | |
| 517 | int first, second, amount; |
| 518 | auto tmp = strstr(line, "first=") + 6; |
| 519 | sscanf(tmp, "%d", &first); |
| 520 | |
| 521 | tmp = strstr(tmp, "second=") + 7; |
| 522 | sscanf(tmp, "%d", &second); |
| 523 | |
| 524 | tmp = strstr(tmp, "amount=") + 7; |
| 525 | sscanf(tmp, "%d", &amount); |
| 526 | |
| 527 | uint64_t key = ((uint64_t)first << 32) | ((uint64_t)second & 0xffffffffll); |
| 528 | |
| 529 | _kerningDictionary[key] = amount; |
| 530 | } |
| 531 | |
| 532 | FontFNT* FontFNT::create(std::string_view fntFilePath, const Rect& imageRect, bool imageRotated) |
| 533 | { |