latex3 / fontspec

Font selection in LaTeX for XeTeX and LuaTeX
http://latex3.github.io/fontspec/
LaTeX Project Public License v1.3c
275 stars 33 forks source link

URLs do not use OpenType features under LuaLaTeX #474

Closed adunning closed 6 months ago

adunning commented 2 years ago

Description

When writing a URL that includes numbers, these will appear as lining figures regardless of which OpenType features are enabled. This is a very old bug, previously filed under Luaotfload, but the issue was determined not to rest there and it appears to have dropped off the radar.

Check/indicate

Minimal example demonstrating the issue

\documentclass{article}

\usepackage{unicode-math}
\setmainfont{TeX Gyre Pagella}[Numbers = {Lowercase, Proportional}]
\usepackage{url}
\urlstyle{same}

\begin{document}

  1234567890

  \url{http://example.com/1234567890}

\end{document}
Screenshot 2022-08-29 at 19 44 06

Further details

There is a workaround on StackExchange but it no longer works with newer versions of LuaLaTeX.

u-fischer commented 2 years ago

There was a workaround on StackExchange, but it no longer works with newer versions of LuaLaTeX.

Sverre's answer works fine for me (but you have to change the font name, Libertine Serif imho no longer works.)

adunning commented 2 years ago

Sverre's answer works fine for me

Quite right, thank you – I've found the problem there, at least!

khaledhosny commented 6 months ago

I don’t see a fontspec issue here, it seems to be bad interaction between url package (that uses math mode) and luaotfload’s node mode (that does not work in math mode).

adunning commented 6 months ago

Where then would one file a report on this? In spite of it providing core functionality, url appears to be unmaintained.