latex3 / fontspec

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

Spurious unsupported script warning with XeTeX possibly opentype specific or related to variant scripts #516

Closed cfr42 closed 6 months ago

cfr42 commented 6 months ago

Description

fontspec warns that David CLM does not support the Script Hebrew, even though it does. The warning is produced only for XeTeX - luaTeX doesn't complain - and does not seem to affect the output.

Possibly this is because the font is opentype, but I'm not certain. I could not reproduce the warning with the truetype font I tried.

Or perhaps it is because David CLM supports two sub-types of the Hebrew script, though fontspec's Script key doesn't support these.

Check/indicate

Minimal example demonstrating the issue

\documentclass[12pt]{article}

\usepackage{polyglossia}
\usepackage{amsfonts}

\setmainlanguage{hebrew}
\setotherlanguage{english}

\newfontfamily{\hebrewfont}[Script=Hebrew]{David CLM}
% \newfontfamily{\hebrewfont}[Script=Hebrew]{DejaVu Sans}
\newfontfamily{\englishfont}{Latin Modern Roman}

\begin{document}

\title{שם ומספר הקורס}
\author{השם שלי}
\maketitle

\end{document}

Produces

Package fontspec Warning: Font "David CLM" does not contain requested Script
(fontspec)                "Hebrew".

Further details

https://tex.stackexchange.com/q/717421/ [but not really about this issue]

otfinfo -s fonts/opentype/public/culmus/DavidCLM-Medium.otf
hebr            Hebrew
hebr.JII        Hebrew/Yiddish
hebr.JUD        Hebrew/Ladino

For comparison with the truetype font I tried:

otfinfo -s fonts/truetype/public/dejavu/DejaVuSans.ttf
DFLT            Default
arab            Arabic
arab.KUR        Arabic/Kurdish
arab.SND        Arabic/Sindhi
arab.URD        Arabic/Urdu
armn            Armenian
brai            Braille
cans            Canadian Syllabics
cher            Cherokee
cyrl            Cyrillic
cyrl.MKD        Cyrillic/Macedonian
cyrl.SRB        Cyrillic/Serbian
geor            Georgian
grek            Greek
hani            CJK Ideographic
hebr            Hebrew
kana            Hiragana/Katakana
lao             Lao
latn            Latin
latn.ISM        Latin/Inari Sami
latn.KSM        Latin/Kildin Sami
latn.LSM        Latin/Lule Sami
latn.MOL        Latin/Moldavian
latn.NSM        Latin/Northern Sami
latn.ROM        Latin/Romanian
latn.SKS        Latin/Skolt Sami
latn.SSM        Latin/Southern Sami
math            Mathematical Alphanumeric Symbols
nko             N'Ko
ogam            Ogham
runr            Runic
tfng            Tifinagh
thai            Thai
wspr commented 6 months ago

Thanks for the report — there have been some changes to the fontspec code in this area recently and I can't reproduce the behaviour in current builds. There will be a release in this weekend and after that comes out please let me know if the issue re-appears.