A strange discrepancy between LuaTeX and XeTeX
Philip Taylor
P.Taylor at Rhul.Ac.Uk
Thu Mar 6 23:22:04 CET 2025
On 05/03/2025 15:22, Philip Taylor wrote:
My wine list, previously referred to, include the following font definition —
\font \vfont = "ITC Zapf Chancery"/B:color=007700;embolden=4;slant=-0.1 at 11pt
In XeTeX, characters set in this font appear as intended (green, emboldened, slight slant). In LuaTeX, they appear green-with-black-stroke, emboldened, slight slant. Does anyone have any idea from whence cometh the black stroke ?
I should add that, at one additional level of abstraction, I do know from whence comes the black stroke — it comes from the "embolden=4" attribute. But why should LuaTeX embolden by stroking in black when XeTeX emboldens by stroking in the font's fill colour ?
I still do not know why my (intended-to-be-emboldened-green) characters gain a black stroke when rendered using LuaTeX but not when rendered using XeTeX, but thanks to Zdeněk <https://dml.cz/browse-author-items?id=22042> Wagner<https://dml.cz/browse-author-items?id=22042>’s article Tisk obrysu písma v PDF <https://dml.cz/handle/10338.dmlcz/150078><https://dml.cz/handle/10338.dmlcz/150078> I now think that I know how to resolve the problem. The following code fragment demonstrates the solution at which I finally arrived —
\def \VeganV {{\ \Vfont \raise 0,2 ex \hbox {(}{V}\raise 0,2 ex \hbox {\kern 0,1 em )}}}
\def \veganv {{\ \vfont \raise 0,2 ex \hbox {(v)}}}
\font \vfont = "Zapf Chancery Medium Italic BT":embolden=4 at 11pt
\font \Vfont = "Zapf Chancery Medium Italic BT":embolden=6 at 11pt
\def \CMYK #1#2#3#4#5%
{%
\pdfextension literal direct {q #1 #2 #3 #4 k #1 #2 #3 #4 K}%
#5%
\pdfextension literal direct {Q}%
}
\def \Green #1{\CMYK 1 0 1 0 {#1}}
\def \v {\Green \veganv}
\def \V {\Green \VeganV}
My sincere thank to Zdeněk for publishing that article.
--
Philip Taylor
This email, its contents and any attachments are intended solely for the addressee and may contain confidential information. In certain circumstances, it may also be subject to legal privilege. Any unauthorised use, disclosure, or copying is not permitted. If you have received this email in error, please notify us and immediately and permanently delete it. Any views or opinions expressed in personal emails are solely those of the author and do not necessarily represent those of Royal Holloway, University of London. It is your responsibility to ensure that this email and any attachments are virus free.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texhax/attachments/20250306/1403edc0/attachment.htm>
More information about the texhax
mailing list.