-
Beta Was this translation helpful? Give feedback.
Answered by
nolife99
Dec 5, 2024
Replies: 1 comment 11 replies
-
You need to load the font once and cache it. |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've discovered that the massive allocations come from boxing (using Enum.HasFlags). This theoretically should be an easy fix.
Fonts/src/SixLabors.Fonts/Tables/TrueType/Glyphs/SimpleGlyphLoader.cs
Lines 118 to 125 in 5767254
Changing these to a simple bitwise AND operation removes all nearly all allocations