FreeTypeSharp icon indicating copy to clipboard operation
FreeTypeSharp copied to clipboard

Missing Rasterization methods

Open LittleCodingFox opened this issue 2 years ago • 4 comments

There's a few methods I need for rendering outlines and rasterization, which you can see a usage example here: https://github.com/LittleCodingFox/Flaming-Torch-Framework/blob/nextgen/Development/Core/Rendering/Text.cpp

Unfortunately, I'm a bit lost on how to implement them, do you think you can either try to add them or help me figure out how I can do it myself?

The component list needed here would be:

  • FT_Span struct
  • Raster Callback
  • FT_Raster_Params
  • FT_Outline_Render
  • FT_Stroker
  • FT_Glyph_StrokeBorder
  • FT_Outline/FT_OutlineGlyph

Thank you very much for your help!

LittleCodingFox avatar Sep 21 '23 23:09 LittleCodingFox

v3.0 just released, it shall cover most of the freetype APIs.

ryancheung avatar Apr 14 '24 14:04 ryancheung

That's amazing! tyvm!

LittleCodingFox avatar Apr 14 '24 14:04 LittleCodingFox

Hello, almost all of the basic APIs seem to be missing:

  • Face SetPixelSize
  • Face SelectCharmap
  • Face GetKerning

I stopped at this point when I realized a lot of the APIs are missing

LittleCodingFox avatar Apr 14 '24 18:04 LittleCodingFox

Hello, almost all of the basic APIs seem to be missing:

  • Face SetPixelSize
  • Face SelectCharmap
  • Face GetKerning

I stopped at this point when I realized a lot of the APIs are missing

There're methods in FT.cs like FT_Set_Pixel_Sizes, FT_Get_Kerning and FT_Select_Charmap.

BTW, if you need the C function pointers in some structs or methods, you have to implement delegate or csharp function pointers yourself. I let the generator generate IntPtr for them, since i have to support netstandard2.0 that does not support function pointers.

ryancheung avatar Apr 15 '24 01:04 ryancheung