| 542 | } |
| 543 | |
| 544 | static void CheckTextLaterTransform(std::shared_ptr<PAGExportSession> session, |
| 545 | pag::TextLayer* layer) { |
| 546 | constexpr float largeScale = 5.0f; |
| 547 | constexpr float smallFontSize = 5.0f; |
| 548 | |
| 549 | if (layer->transform == nullptr) { |
| 550 | return; |
| 551 | } |
| 552 | if (layer->transform->scale == nullptr || layer->transform->scale->animatable()) { |
| 553 | return; |
| 554 | } |
| 555 | auto& scale = layer->transform->scale->value; |
| 556 | auto minScale = std::min(scale.x, scale.y); |
| 557 | if (minScale < largeScale) { |
| 558 | return; |
| 559 | } |
| 560 | if (layer->sourceText == nullptr || layer->sourceText->animatable()) { |
| 561 | return; |
| 562 | } |
| 563 | |
| 564 | auto fontSize = layer->getTextDocument()->fontSize; |
| 565 | if (fontSize <= smallFontSize) { |
| 566 | session->pushWarning(AlertInfoType::FontSmallAndScaleLarge, |
| 567 | std::to_string(static_cast<int>(minScale))); |
| 568 | } |
| 569 | } |
| 570 | |
| 571 | static bool HasVerticalText(pag::Property<pag::TextDocumentHandle>* sourceText) { |
| 572 | if (sourceText == nullptr) { |
no test coverage detected