diff options
| author | Qwerasd <qwerasd205@users.noreply.github.com> | 2025-03-19 12:39:34 -0600 |
|---|---|---|
| committer | Qwerasd <qwerasd205@users.noreply.github.com> | 2025-03-19 12:43:18 -0600 |
| commit | 6f84a5d68268cc3142f4570424c5457b1d02622a (patch) | |
| tree | 94e73ff9e721c13af6e1dc8be528987dd2429ccf /pkg | |
| parent | bd315c8394a3a2b533733ae01d399db675912c1c (diff) | |
font/freetype: disable SVG glyphs, simplify color check
We don't currently support rendering SVG glyphs so they should be
ignored when loading. Additionally, the check for whether a glyph is
colored has been simplified by just checking the pixel mode of the
rendered bitmap.
This commit also fixes a bug caused by calling the color check inside of
`renderGlyph`, which caused the bitmap to be freed creating a chance for
memory corruption and garbled glyphs.
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/freetype/face.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/freetype/face.zig b/pkg/freetype/face.zig index eea3c6851..84178b860 100644 --- a/pkg/freetype/face.zig +++ b/pkg/freetype/face.zig @@ -278,7 +278,9 @@ pub const LoadFlags = packed struct { color: bool = false, compute_metrics: bool = false, bitmap_metrics_only: bool = false, - _padding2: u9 = 0, + _padding2: u1 = 0, + no_svg: bool = false, + _padding3: u7 = 0, test { // This must always be an i32 size so we can bitcast directly. |
