Replaced size_t with nt_size_t
Added glyph object to correct text placement
Fixed memory leak