diff --git a/lime/system/System.hx b/lime/system/System.hx index 96f121134..0518c3121 100644 --- a/lime/system/System.hx +++ b/lime/system/System.hx @@ -214,7 +214,7 @@ class System { #elseif nodejs if (__nodeNDLLModule == null) { - __nodeNDLLModule = untyped require('bindings')('node_ndll'); + __nodeNDLLModule = untyped require('ndll'); } #end diff --git a/lime/text/Font.hx b/lime/text/Font.hx index bb0c7a065..e1d18c8ac 100644 --- a/lime/text/Font.hx +++ b/lime/text/Font.hx @@ -128,7 +128,7 @@ class Font { lime_font_set_size (src, fontSize); var bytes = new ByteArray (); - bytes.bigEndian = false; + bytes.endian = "littleEndian"; if (lime_font_render_glyph (src, glyph, bytes)) { @@ -143,7 +143,11 @@ class Font { var data = new ByteArray (width * height); bytes.readBytes (data, 0, width * height); + #if js + var buffer = new ImageBuffer (data.byteView, width, height, 1); + #else var buffer = new ImageBuffer (new UInt8Array (data), width, height, 1); + #end var image = new Image (buffer, 0, 0, width, height); image.x = x; image.y = y; @@ -182,7 +186,7 @@ class Font { lime_font_set_size (src, fontSize); var bytes = new ByteArray (); - bytes.bigEndian = false; + bytes.endian = "littleEndian"; if (lime_font_render_glyphs (src, glyphList, bytes)) { @@ -307,7 +311,11 @@ class Font { } + #if js + buffer.data = data.byteView; + #else buffer.data = new UInt8Array (data); + #end return map; diff --git a/lime/text/TextLayout.hx b/lime/text/TextLayout.hx index 1bd7b5b6e..b2d804905 100644 --- a/lime/text/TextLayout.hx +++ b/lime/text/TextLayout.hx @@ -56,7 +56,7 @@ class TextLayout { if (__buffer == null) { __buffer = new ByteArray (); - __buffer.bigEndian = false; + __buffer.endian = "littleEndian"; }