Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Character problem zero-width joiner with xecolor in font XB Zar #22

Open
4 tasks
mojtabaahmadi2020tl opened this issue Apr 26, 2022 · 0 comments
Open
4 tasks
Assignees
Labels
bug Something isn't working

Comments

@mojtabaahmadi2020tl
Copy link

mojtabaahmadi2020tl commented Apr 26, 2022

Brief outline of the issue

Check/indicate

Minimal example showing the issue

% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode


\documentclass{article}
\usepackage{xecolor}
\usepackage{xepersian}
\settextfont{XB Zar}[Scale=1.5]
\chardef\myzwj="200D % zero-width joiner
\newenvironment{mycoloredtext}{%
\XeTeXinterchartokenstate = 1
\newXeTeXintercharclass \mycharclassi
\newXeTeXintercharclass \mycharclassii
\newXeTeXintercharclass \mycharclassiii
\XeTeXcharclass "0628 \mycharclassi 
\XeTeXcharclass "0627 \mycharclassii
\XeTeXcharclass "0631 \mycharclassiii
\XeTeXinterchartoks 255 \mycharclassi = {\xecolor{red}}
\XeTeXinterchartoks \mycharclassi \mycharclassii = {\myzwj\xecolor{blue}\myzwj}
\XeTeXinterchartoks \mycharclassii \mycharclassiii = {\xecolor{green}}
}{}
\begin{document}
\begin{mycoloredtext}
بار
\end{mycoloredtext}
\end{document}

Expected behavior

درود جناب وفا، حرف ب رنگ نشده و به حرف ا نچسبیده. در ضمن در فونت سری IR مشکلی در چسبیده شدن حروف نداره!
به نظر میرسه مشکل از xetex باشه

Log and PDF files

test_xecolor_char_TL2022.log

test_xecolor_char_TL2022.pdf

@mojtabaahmadi2020tl mojtabaahmadi2020tl added the bug Something isn't working label Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants