| 12 | namespace snap::drawing { |
| 13 | |
| 14 | Ref<TextShaper> TextShaper::make(bool enableCache) { |
| 15 | auto strategy = enableCache ? WordCachingTextShaperStrategy::PrioritizeCorrectness : |
| 16 | WordCachingTextShaperStrategy::DisableCache; |
| 17 | auto harfbuzzShaper = Valdi::makeShared<TextShaperHarfbuzz>(); |
| 18 | return Valdi::makeShared<WordCachingTextShaper>(harfbuzzShaper, strategy); |
| 19 | } |
| 20 | |
| 21 | } // namespace snap::drawing |