Skip to content

fix: freetype bitmap glyph cast#6

Open
GGRei wants to merge 1 commit into
vlang:mainfrom
GGRei:fix/freetype-bitmap-glyph-unsafe-cast
Open

fix: freetype bitmap glyph cast#6
GGRei wants to merge 1 commit into
vlang:mainfrom
GGRei:fix/freetype-bitmap-glyph-unsafe-cast

Conversation

@GGRei

@GGRei GGRei commented Jun 19, 2026

Copy link
Copy Markdown

Summary

This was exposed by vlang/gui CI when compiling vglyph as a dependency with -W on macOS.

After FT_Glyph_To_Bitmap, the glyph is intentionally reinterpreted as FT_BitmapGlyphRec. V now requires this pointer cast to be explicit unsafe, so this PR marks only that cast as unsafe and leaves the FreeType flow unchanged.

Changes

  • Wrap the FT_GlyphRec -> FT_BitmapGlyphRec cast in unsafe.
  • Apply vfmt to the touched file.

Context

This was exposed by vlang/gui CI when compiling examples with -W on macOS.

Tests

v fmt -verify -inprocess glyph_atlas.v
git diff --check
v test .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant