I just installed Haxe 3.2.1, Lime 2.8.2, OpenFL 3.5.3, etc. I generated the TextRendering sample project. When I run the SWF, it seems to crash (I don’t think I have the Flash debugger). When I run the Neko version, it crashes with this stack:
Called from ? line 1
Called from ApplicationMain.hx line 93
Called from ApplicationMain.hx line 28
Called from lime/app/Preloader.hx line 58
Called from lime/app/Preloader.hx line 242
Called from lime/app/Event.hx line 145
Called from Main.hx line 54
Called from Main.hx line 209
Uncaught exception - Invalid field access : h
This sample didn’t work with Haxe 3.1.3 and OpenFL 2.0.2. I’m pretty sure my environment is set up correctly (because Lime/HaxeFlixel seem to work correctly otherwise).
I am getting the same error with the sample. The call responsible seems to be images.exists (position.glyph) on line 209 - Some testing showed images.get yields a similar error. The issue appears to be accessing the Map object returned by textLayout.font.renderGlyphs.
Looking at the source code it’s no wonder - renderGlyphs has been completely commented out returning nothing but null since commit 23be78719850b17421b68960f690709599e25330 a few months ago.
(I wonder how it worked on your different setup, did you install an older version there?)
@Anheurystics I don’t remember, sorry. What I do remember, is that it was environmental (bad install of something). Upgrading/installing everything fresh, on a new machine (I use Linux VMs), fixed the problem.
I get a similar stack today:
Called from ? line 1
Called from ApplicationMain.hx line 93
Called from ApplicationMain.hx line 28
Called from lime/app/Preloader.hx line 58
Called from lime/app/Preloader.hx line 242
Called from lime/app/Event.hx line 145
Called from Main.hx line 54
Called from Main.hx line 209
Uncaught exception - Invalid field access : exists
This is with lime 2.9.1 (the one that installs when you use HaxeFlixel). I get the same version with lime 3.7.4 (the latest version I have installed).
TextRendering is not currently working, but the other samples should work fine. OpenFL uses different APIs (Cairo and canvas) for text rendering, but there are plans to update Lime text support with Harfbuzz bindings and porting text measurement logic from OpenFL into an updated TextLayout API, which should make it easier to add OpenGL text support in the future