Text Data from X Client for usage in android app

view story

http://unix.stackexchange.com – Is it possible to write a program such that it can capture the data from an X Client to X server and extract only the Text data inside it? I have to port a legacy application to android and the application only has text data. There is an X-Server developed in android but it does not have a window manager and link Here he declared fonts for displaying text data . libX11 documentation XDrawString & XDrawText . How does these draw the text ? ASCII ? (HowTos)