| 35 | } |
| 36 | |
| 37 | bool PathTextShape::CalculateLayout(ref_ptr<dp::TextureManager> textures) |
| 38 | { |
| 39 | char constexpr kSpaces[] = " "; |
| 40 | auto layout = make_unique_dp<PathTextLayout>( |
| 41 | m_params.m_tileCenter, |
| 42 | m_params.m_auxText.empty() ? m_params.m_mainText : m_params.m_mainText + kSpaces + m_params.m_auxText, |
| 43 | m_params.m_textFont.m_size, textures, m_params.m_mainTextLanguageIndex); |
| 44 | |
| 45 | if (0 == layout->GetGlyphCount()) |
| 46 | { |
| 47 | LOG(LWARNING, ("Empty layout for main text", m_params.m_mainText, "and aux text", m_params.m_auxText)); |
| 48 | return false; |
| 49 | } |
| 50 | |
| 51 | m_context->SetLayout(std::move(layout), m_params.m_baseGtoPScale); |
| 52 | |
| 53 | return !m_context->GetOffsets().empty(); |
| 54 | } |
| 55 | |
| 56 | uint64_t PathTextShape::GetOverlayPriority(uint32_t textIndex, size_t textLength) const |
| 57 | { |
no test coverage detected