This project is read-only.

FO.NET for Mono...

Apr 15, 2009 at 4:42 PM
Edited Apr 15, 2009 at 4:43 PM
I use the last Moma (Mono Analyzer) for Mono 2.4 for testing FO.NET.

The report says that there are 17 P/Invoke function not supported by Mono

void Dispose (bool) IntPtr LibWrapper.DeleteObject (IntPtr) gdi32.dll
GdiFont CreateFont (string, int, bool, bool) IntPtr LibWrapper.CreateFontIndirect (LogFont) gdi32.dll
void AddFontFile (FileInfo) int LibWrapper.AddFontResourceEx (string, uint, int) gdi32.dll
Byte[] GetFontData () uint LibWrapper.GetFontData (IntPtr, uint, uint, Byte[], uint) gdi32.dll
Byte[] ReadFont () uint LibWrapper.GetFontData (IntPtr, uint, uint, Byte[], uint) gdi32.dll
Byte[] ReadFont () uint LibWrapper.GetFontData (IntPtr, uint, uint, Byte[], uint) gdi32.dll
void .ctor (GdiDeviceContent, GdiFont) int LibWrapper.GetTextFace (IntPtr, int, StringBuilder) gdi32.dll
void LoadGlyphIndices () uint LibWrapper.GetGlyphIndices (IntPtr, string, int, UInt16[], uint) gdi32.dll
String[] get_FamilyNames () int LibWrapper.EnumFontFamiliesEx (IntPtr, LogFont, FontEnumDelegate, int, int) gdi32.dll
FontStyles GetStyles (string) int LibWrapper.EnumFontFamilies (IntPtr, string, FontEnumDelegate, int) gdi32.dll
void LoadRanges (GdiDeviceContent) uint LibWrapper.GetFontUnicodeRanges (IntPtr, GlyphSet) gdi32.dll
void Dispose (bool) bool LibWrapper.DeleteDC (IntPtr) gdi32.dll
IntPtr SelectFont (GdiFont) IntPtr LibWrapper.SelectObject (IntPtr, IntPtr) gdi32.dll
IntPtr GetCurrentObject (GdiDcObject) IntPtr LibWrapper.GetCurrentObject (IntPtr, GdiDcObject) gdi32.dll
void .ctor () IntPtr LibWrapper.GetDC (IntPtr) User32.dll
Byte[] ReadTableData (string) uint LibWrapper.GetFontData (IntPtr, uint, uint, Byte[], uint) gdi32.dll
Byte[] ReadTableData (string) uint LibWrapper.GetFontData (IntPtr, uint, uint, Byte[], uint)

It is possible to convert this function for Mono compatibility??

Thank you in advance.
Best regard.
Vytek
Coordinator
Jun 8, 2009 at 6:26 PM

Hi Vytek

These calls are all related to the font support within FO.NET.  It is integrated well with Windows - but obviously at the expense of portability!

I don't think it would be easy to remove these calls - you would most likely have to implement additional TTF/OTF parsing code.

Cheers

Mark