Rendering it manually, the bitmap data exists:
julia> using FreeType, CSyntax; ft_lib::FT_Library = C_NULL; ft_err = @c FT_Init_FreeType(&ft_lib); @assert(ft_err == 0); ft_face::FT_Face = C_NULL; ft_err = @c FT_New_Face(ft_lib, "assets/JetBrainsMono-Bold.ttf", 0, &ft_face); ft_result = @c FT_Get_Char_Index(ft_face, '®'); ft_err = @c FT_Load_Glyph(ft_face, ft_result, 0); @assert(ft_err == 0); ft_glyph = unsafe_load(ft_face).glyph; ft_err = @c FT_Render_Glyph(ft_glyph, FT_RENDER_MODE_NORMAL); unsafe_load(ft_glyph).bitmap
FT_Bitmap_(0x0000000b, 0x00000009, 9, Ptr{UInt8} @0x000001cbfdd9ef60, 0x0100, 0x02, 0x00, Ptr{Nothing} @0x0000000000000000)
But rendering it using the flag FT_LOAD_RENDER, which is supposed to call FT_Render_Glyph() automatically, the bitmap data does not exist:
julia> using FreeType, CSyntax; ft_lib::FT_Library = C_NULL; ft_err = @c FT_Init_FreeType(&ft_lib); @assert(ft_err == 0); ft_face::FT_Face = C_NULL; ft_err = @c FT_New_Face(ft_lib, "assets/JetBrainsMono-Bold.ttf", 0, &ft_face); ft_result = @c FT_Get_Char_Index(ft_face, '®'); ft_err = @c FT_Load_Glyph(ft_face, ft_result, FT_LOAD_RENDER); @assert(ft_err == 0); ft_glyph = unsafe_load(ft_face).glyph; unsafe_load(ft_glyph).bitmap
FT_Bitmap_(0x00000000, 0x00000000, 0, Ptr{UInt8} @0x0000000000000000, 0x0000, 0x00, 0x00, Ptr{Nothing} @0x0000000000000000)
Rendering it manually, the bitmap data exists:
julia> using FreeType, CSyntax; ft_lib::FT_Library = C_NULL; ft_err = @c FT_Init_FreeType(&ft_lib); @assert(ft_err == 0); ft_face::FT_Face = C_NULL; ft_err = @c FT_New_Face(ft_lib, "assets/JetBrainsMono-Bold.ttf", 0, &ft_face); ft_result = @c FT_Get_Char_Index(ft_face, '®'); ft_err = @c FT_Load_Glyph(ft_face, ft_result, 0); @assert(ft_err == 0); ft_glyph = unsafe_load(ft_face).glyph; ft_err = @c FT_Render_Glyph(ft_glyph, FT_RENDER_MODE_NORMAL); unsafe_load(ft_glyph).bitmapFT_Bitmap_(0x0000000b, 0x00000009, 9, Ptr{UInt8} @0x000001cbfdd9ef60, 0x0100, 0x02, 0x00, Ptr{Nothing} @0x0000000000000000)But rendering it using the flag
FT_LOAD_RENDER, which is supposed to callFT_Render_Glyph()automatically, the bitmap data does not exist:julia> using FreeType, CSyntax; ft_lib::FT_Library = C_NULL; ft_err = @c FT_Init_FreeType(&ft_lib); @assert(ft_err == 0); ft_face::FT_Face = C_NULL; ft_err = @c FT_New_Face(ft_lib, "assets/JetBrainsMono-Bold.ttf", 0, &ft_face); ft_result = @c FT_Get_Char_Index(ft_face, '®'); ft_err = @c FT_Load_Glyph(ft_face, ft_result, FT_LOAD_RENDER); @assert(ft_err == 0); ft_glyph = unsafe_load(ft_face).glyph; unsafe_load(ft_glyph).bitmapFT_Bitmap_(0x00000000, 0x00000000, 0, Ptr{UInt8} @0x0000000000000000, 0x0000, 0x00, 0x00, Ptr{Nothing} @0x0000000000000000)