SixLabors / Fonts

:black_nib: Font loading and layout library.
https://sixlabors.com/products/fonts
Other
308 stars 71 forks source link

Add DoShaping Option #399

Closed gerdus closed 6 months ago

gerdus commented 7 months ago

Prerequisites

Description

Add option to TextOptions to skip shaping since it's a large percentage of the text layout. In my case it increased the FPS of my text stress test from a middling 6 FPS to an incredible 10 FPS, the hot path now being almost completely rending. Feel free to reject if you don't think it would be useful or would complicate support.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86%. Comparing base (91405e3) to head (ca9ed62). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #399 +/- ## ===================================== Coverage 86% 86% ===================================== Files 238 239 +1 Lines 15255 15264 +9 Branches 2108 2109 +1 ===================================== + Hits 13234 13243 +9 Misses 1550 1550 Partials 471 471 ``` | [Flag](https://app.codecov.io/gh/SixLabors/Fonts/pull/399/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SixLabors) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/SixLabors/Fonts/pull/399/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SixLabors) | `86% <100%> (+<1%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SixLabors#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.