
fonts doesnt work with linux (ubuntu 8.04)
Posted Thursday, 4 September, 2008 - 08:24 by puklaus inFonts doesnt work with linux (newest svn version of opentk). But with opentk 0.9.1 fonts works fine.
In my code:
init:
ITextPrinter printer = new TextPrinter();
TextureFont font = new TextureFont(new Font(FontFamily.GenericSerif, 24.0f));
draw:
printer.Begin();
printer.Draw("blah - blaa bluu ", font); // this line doesnt work
printer.End();
(printer!=null && font!=null)
output (with svn vers & linux):
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
at OpenTK.Platform.GdiPlus.GetNativeGraphics (System.Drawing.Graphics graphics) [0x00000]
at OpenTK.Graphics.TextureFont.MeasureText (System.String text, SizeF bounds, System.Drawing.StringFormat format, IList`1 ranges) [0x00000]
at OpenTK.Graphics.TextureFont.MeasureText (System.String text, SizeF bounds, System.Drawing.StringFormat format) [0x00000]
at OpenTK.Graphics.TextureFont.LoadGlyph (Char c, System.Drawing.RectangleF& rectangle) [0x00000]
at OpenTK.Graphics.TextureFont.LoadGlyphs (System.String glyphs) [0x00000]
And i tried tutorials, tut3 and 4 (fonts and text) doesnt work, same error.
Missing something, should I write text other way?
Other examples works fine.


Comments
Re: fonts doesnt work with linux (ubuntu 8.04)
This is a known issue. Font routines have been rewritten more or less from scratch, but some parts are not yet commited to SVN.
Re: fonts doesnt work with linux (ubuntu 8.04)
Could you please commit this changings to SVN because I can't run my game on linux for this problem. Thank you.
Re: fonts doesnt work with linux (ubuntu 8.04)
Can we get an update on this issue? I am experiencing the same issue when I test on Ubuntu 8.04 x64.
For now I have disabled the affected code in my app.
Re: fonts doesnt work with linux (ubuntu 8.04)
I've fixed the issue, I just need to clean up and commit the code.
Edit: Commited the fix, but there are still pending issues with fonts on Linux.