Port ThaiChunk & ThaiDisplayUtils from Java sourcecode by virasak@gmail.com