\nopdfcompression

% At the ConTeXt 2013 meeting Taco suggested to add ActualText entries to the
% shapes. It took us a bit of experimenting and the current implementation of
% this is quite okay, but beware: some viewers will add a space when copying
% such characters.

\starttext

    \definemetafont[bidi-symbols][bidi-symbols.mp]

    \startbuffer
        xxx{\demo\char"202A}\relax xxx\quad % lre
        xxx{\demo\char"202B}\relax xxx\quad % rle
        xxx{\demo\char"202C}\relax xxx\quad % pdf
        xxx{\demo\char"202D}\relax xxx\quad % lro
        xxx{\demo\char"202E}\relax xxx\quad % rlo
    \stopbuffer

    \definefont[demo][demo@bidi-symbols]

    \getbuffer \blank

    \definefont[demo][demo@bidi-symbols at \the\dimexpr3\exheight]

    \getbuffer \blank

    \definefont[demo][demo@bidi-symbols at \the\dimexpr4\exheight]

    \getbuffer \blank

\stoptext

