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

Incorrect faked bold font in xetex #692

Closed
stone-zeng opened this issue Jun 17, 2019 · 6 comments
Closed

Incorrect faked bold font in xetex #692

stone-zeng opened this issue Jun 17, 2019 · 6 comments

Comments

@stone-zeng
Copy link

When use tikz node immediately after a faked bold text, the second node (and the nodes afterwards) will be emboldened.

LaTeX version (with fontspec, compiled with xelatex):

\documentclass{article}
\usepackage{tikz,fontspec}
\setmainfont[AutoFakeBold]{Times New Roman}
\begin{document}
\textbf{a}
\tikz{\node at (0,0) {A}; \node at (0.5,0) {B}; \node at (1,0) {C};}
\end{document}

image

Plain TeX version (compiled with xetex):

% Workaround for #675
\catcode`@=11
\def\XC@tgt@mod#1{#1}
\def\XC@sdef#1#2{\edef#1{#2}}
\catcode`@=12
\input tikz.tex

\font\tmrb="[XITS-Regular.otf]:embolden=5" at 10pt
{\tmrb a} \tikz{\node at (0,0) {A}; \node at (0.5,0) {B};}
\bye

image

See CTeX-org/ctex-kit#440.

@hmenke hmenke added the xetex label Jun 17, 2019
@hmenke
Copy link
Member

hmenke commented Jun 19, 2019

This might be a bug in XeTeX. I inspected the resulting XDV of

\input pgf.tex
\font\tmrb="[XITS-Regular.otf]:embolden=5" at 10pt
{\tmrb a}
\pgfpicture
\pgfnode{rectangle}{center}{A}{}{}
\pgftransformshift{\pgfpoint{0.5cm}{0cm}}
\pgfnode{rectangle}{center}{B}{}{}
\endpgfpicture
\bye

and I can't find anything suspicious in terms of PDF literals. The stack seems to be balanced, i.e. same number of q and Q in the correct locations.

@aminophen
Copy link
Contributor

This might be a bug in XeTeX.

I transferred this report to https://tug.org/pipermail/dvipdfmx/2019-June/000014.html

@hmenke
Copy link
Member

hmenke commented Jun 23, 2019

@aminophen Thank you very much for taking care of this. From the linked thread I understand that this is a problem in dvipdfmx rather than PGF. I'm closing this for now.

@hmenke hmenke closed this as completed Jun 23, 2019
@aminophen
Copy link
Contributor

It seems that the problem is fixed in dvipdfm-x r51507.

@stone-zeng
Copy link
Author

Thanks!

@aminophen
Copy link
Contributor

In r53973, dvipdfmx restored the previous behavior due to

so the fake-bold problem reappeared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants