Re: [XeTeX] asterisk in font name - font error

2020-12-24 Thread Carlos Franke
Am Donnerstag, den 24.12.2020, 11:13 + schrieb David Carlisle:
>  >if that doesn't go anywhere, I will try at latex2e's (their bug
> tracker
> is much more active than fontspec's).
> 
> Please don't do that, it just increases our administrative overload.
>
> If it is fixable on our side then all relevant people will already
> have seen your report here and at fontspec github, posting it again
> at the 2e github (where there is no relevant code) will just mean
> that we see it again.

Alright, noted! I see that it doesn't make sense to re-post on the
other bug tracker when there is so much overlap between the three
channels' participants (which I didn't know.)

(Happy holidays to all to whom that applies!)

Carlos



Re: [XeTeX] asterisk in font name - font error

2020-12-24 Thread David Carlisle
 >if that doesn't go anywhere, I will try at latex2e's (their bug tracker
is much more active than fontspec's).

Please don't do that, it just increases our administrative overload.

If it is fixable on our side then all relevant people will already have
seen your report here and at fontspec github, posting it again at the 2e
github (where there is no relevant code) will just mean that we see it
again.

David


Re: [XeTeX] asterisk in font name - font error

2020-12-23 Thread Carlos Franke
> > the problem should be reported to the
> > authors of the "fontspec" and "LaTeX2e" packages, as it is
> > probable that the problem lies solely therein.
> 
> That LaTeX2e is involved is very improbable. fontspec could be
> involved as it uses the * as a wildcard in some places.

Alright, I have filed the bug on the fontspec bug tracker:

https://github.com/wspr/fontspec/issues/437

If that doesn't go anywhere, I will try at latex2e's (their bug tracker
is much more active than fontspec's).

As another workaround, I have managed to change the font family name in
the OTF files of Jost* using the following fontforge python script:

   import fontforge
   import sys

   for fontname in sys.argv[1:]:
   font = fontforge.open(fontname)
   font.familyname = "Jost"
   font.generate(fontname+"-starless.otf")

After installing the generated "starless" fonts, I can use them with
xelatex as "Jost" (without asterisk).



Re: [XeTeX] asterisk in font name - font error

2020-12-15 Thread Carlos Franke
Hi!

On 12/14/2020 9:42 AM, Ulrike Fischer wrote:
> > I wouldn't use xltxtra, and the Mapping is unneeded too, but beside
> > this it should work.
> > 
> > […]
> > 
> > If you get an error with this the fonts are perhaps not correctly
> > installed. Where did you put them? Did you really installed the
> > otf?

Am Montag, den 14.12.2020, 10:37 -0600 schrieb Lorna Evans:
> It may be a font installation issue if you are on Windows. 

I am on Linux (based on Ubuntu 20.04). I had moved the otf (yes) files
to ~/.local/share/fonts/Jost/ and ran "sudo fc-cache". I also tried
~/.fonts/Jost/ and the command "sudo fc-cache -f -v". In any case the
fonts were usable from other programs (gnome-font-viewer, lowriter),
but xelatex still gave the same error. (lualatex unrelatedly complains
"module 'luaotfload-main' not found".)

It now works after I moved the otf files to /usr/share/fonts (and
rerunning fc-cache). /usr/Iocal/share/fonts/ wouldn't do. To all other
programmes the different directories are equivalent, just xelatex needs
/usr/share/fonts.

Thanks for encouraging me!

c



Re: [XeTeX] asterisk in font name - font error

2020-12-14 Thread Akira Kakuto

On 2020/12/15 0:31, Ulrike Fischer wrote:

It doesn''t work for me in windows. With plain + xetex I still get
error because of the *

kpathsea:make_tex: Invalid filename `Jost*', contains '*'

Loading the font by file name works fine:

\font\test="[Jost-500-Medium.otf]"


Recent installer adds
$LOCALAPPDATA/Microsoft/Windows/Fonts//
for OSFONTDIR on Windows.
Thus XeTeX can find font there if used by file name.
In this case, non-ascii characters in file path are allowd.

However, in order to use by font name, users should add
c:/Users/username/AppData/Local/Microsoft/Windows/Fonts
in fonts.conf, if the computer is not used by multiusers.
My port of fontconfig for Windows does not allow non-ascii characters
in file path. So if "username" contains non-ascii characters,
it should be replaced by a symbolic link which contains ascii
characters only.

My port of fontconfig for Windows does not allow config dir for
users for simplicity. So in multiuser system, there is no way to
use fonts in .../AppData/Local/Microsoft/Windows/Fonts by font name.

Anyway it is best to install fonts in c:/Windows/Fonts for all users.

Best,
Akira


Re: [XeTeX] asterisk in font name - font error

2020-12-14 Thread Lorna Evans
It may be a font installation issue if you are on Windows. Windows made 
a change awhile back where the default place to install is to a user 
folder.


On my system it is: C:\Users\username\AppData\Local\Microsoft\Windows\Fonts

If the fonts are in there, delete them.

Then reinstall the fonts "for all users" and it will go into 
C:\Windows\Fonts. This has taken care of my issues with fonts in XeTeX.


Lorna

On 12/14/2020 9:42 AM, Ulrike Fischer wrote:

Am Sun, 13 Dec 2020 17:01:16 +0100 schrieb Carlos Franke:



This would be a neat workaround. However it doesn't compile on my
system either. Running "xelatex temp2.tex" (temp2.tex being Apostolos'
code, only with Minion Pro replaced with another font as I don't have
Minion Pro installed) I get a similar error as before:

[...]

(./temp2.aux) (/usr/share/texlive/texmf-
dist/tex/latex/base/ts1cmr.fd)kpathsea:make_tex: Invalid filename
`[Jost-500-Medium.otf]/OT', contains '['


! Package fontspec Error: The font "Jost-500-Medium" cannot be
found.


I am likely making some very basic mistake. I would be grateful for any
hint.

I wouldn't use xltxtra, and the Mapping is unneeded too, but beside
this it should work.

\documentclass{article}
\usepackage{fontspec}
\setsansfont{Jost-500-Medium.otf}[
  BoldFont = Jost-700-Bold.otf ,
  ItalicFont = Jost-500-MediumItalic.otf,
  BoldItalicFont = Jost-700-BoldItalic.otf]

\begin{document}
\LARGE
\sffamily this is an example \textit{italics}, \textbf{bold},
and \textbf{\textit{bold italics}}.

\end{document}

If you get an error with this the fonts are perhaps not correctly
installed. Where did you put them? Did you really installed the otf?
(the repo seems to provide also ttf.)

Try also to compile with lualatex, it is normally less picky
regarding fonts (and one can inspect the names.lua).


Be that as it may, I am wondering: Should xelatex ideally work with the
font name "Jost*" like it does with "Minion Pro" and others?

Exotic names can always be problematic. And * has the meaning of a
wildcard in various places. I prefer to stick to file names.




Re: [XeTeX] asterisk in font name - font error

2020-12-14 Thread David Carlisle
On Mon, 14 Dec 2020 at 16:10, Apostolos Syropoulos via XeTeX 
wrote:

> >Works for me, Ulrike :
> >
> >
> > \font \Jost = "Jost*"
> > \Jost Hallo
> >
> > \end
> >
> >
> >Of course, one has to install the font in the first place.
>
> The above code works just fine in Solaris.
> A.S.
>
> --
> Apostolos Syropoulos
> Xanthi, Greece
>
>
>
For me (testing on cygwin and installing the fonts in ~/.fonts)  the Phil's
plain tex example works but I think it is somewhat underspecified which
font you actually get (I got Jost-Black which is a bit.. black...)


$ pdffonts phil.pdf
name type  encoding emb
sub uni object ID
 -  ---
--- --- -
HMHLTQ+Jost-BlackCID TrueType  Identity-H   yes
yes yes  5  0
JRRHPJ+CMR10 Type 1C   Builtin  yes
yes yes  6  0



fontspec does get confused by the  * (probably while trying to figure out
the bold/italic etc variants of the main font) and I  get the

! Package fontspec Error: The font "JostJost*" cannot be found.

error

Which is arguably a fontspec bug but since the "main" font is of a rather
arbitrary weight if loaded as  Jost* it is probably better to specify the
weights as in Ulrike's example anyway.

I did try to avoid the wildcard using a catcode 11 *,  interestingly that
gives a different error, so gets closer but doesn't actually work (for some
definition of "interesting")

\documentclass{article}
\usepackage{fontspec}

\setmainfont{Jost\Ucharcat`\* 11 }

\begin{document}

Hallo

\end{document}


Re: [XeTeX] asterisk in font name - font error

2020-12-14 Thread Apostolos Syropoulos via XeTeX
>Works for me, Ulrike :
>
>
> \font \Jost = "Jost*"
> \Jost Hallo
>
> \end
>
>
>Of course, one has to install the font in the first place.

The above code works just fine in Solaris.
A.S.

--
Apostolos Syropoulos
Xanthi, Greece




Re: [XeTeX] asterisk in font name - font error

2020-12-14 Thread Philip Taylor

Ulrike Fischer wrote:

It doesn''t work for me in windows. With plain + xetex I still get
error because of the *

kpathsea:make_tex: Invalid filename `Jost*', contains '*'

Works for me, Ulrike :


\font \Jost = "Jost*"

\Jost Hallo

\end



Of course, one has to install the font in the first place.
Philip Taylor



Re: [XeTeX] asterisk in font name - font error

2020-12-14 Thread Ulrike Fischer
Am Sun, 13 Dec 2020 17:01:16 +0100 schrieb Carlos Franke:


> This would be a neat workaround. However it doesn't compile on my
> system either. Running "xelatex temp2.tex" (temp2.tex being Apostolos'
> code, only with Minion Pro replaced with another font as I don't have
> Minion Pro installed) I get a similar error as before:
> 
>[...]
> 
>(./temp2.aux) (/usr/share/texlive/texmf-
>dist/tex/latex/base/ts1cmr.fd)kpathsea:make_tex: Invalid filename
>`[Jost-500-Medium.otf]/OT', contains '['
> 
> 
>! Package fontspec Error: The font "Jost-500-Medium" cannot be
>found.
> 
> 
> I am likely making some very basic mistake. I would be grateful for any
> hint.

I wouldn't use xltxtra, and the Mapping is unneeded too, but beside
this it should work. 

\documentclass{article}
\usepackage{fontspec}
\setsansfont{Jost-500-Medium.otf}[
 BoldFont = Jost-700-Bold.otf ,
 ItalicFont = Jost-500-MediumItalic.otf,
 BoldItalicFont = Jost-700-BoldItalic.otf]

\begin{document}
\LARGE
\sffamily this is an example \textit{italics}, \textbf{bold},
and \textbf{\textit{bold italics}}.

\end{document}

If you get an error with this the fonts are perhaps not correctly
installed. Where did you put them? Did you really installed the otf?
(the repo seems to provide also ttf.)

Try also to compile with lualatex, it is normally less picky
regarding fonts (and one can inspect the names.lua). 

> 
> Be that as it may, I am wondering: Should xelatex ideally work with the
> font name "Jost*" like it does with "Minion Pro" and others? 

Exotic names can always be problematic. And * has the meaning of a
wildcard in various places. I prefer to stick to file names. 


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/



Re: [XeTeX] asterisk in font name - font error

2020-12-14 Thread Ulrike Fischer
Am Sun, 13 Dec 2020 16:10:59 + schrieb Philip Taylor:


> I can see no reason why XeLaTeX users of "Jost*" should be forced
> to use a work-around.  As the font "Jost*" can be successfully
> loaded and used with XeTeX,

It doesn''t work for me in windows. With plain + xetex I still get
error because of the * 

kpathsea:make_tex: Invalid filename `Jost*', contains '*'

Loading the font by file name works fine:

\font\test="[Jost-500-Medium.otf]"

> the problem should be reported to the
> authors of the "fontspec" and "LaTeX2e" packages, as it is
> probable that the problem lies solely therein.

That LaTeX2e is involved is very improbable. fontspec could be
involved as it uses the * as a wildcard in some places.


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/



Re: [XeTeX] asterisk in font name - font error

2020-12-13 Thread Philip Taylor

Carlos Franke wrote:



[Apostolos Syropoulos's suggestion]
would be a neat workaround. However it doesn't compile on my
system either. Running "xelatex temp2.tex" (temp2.tex being Apostolos'
code, only with Minion Pro replaced with another font as I don't have
Minion Pro installed) I get a similar error as before:

I am likely making some very basic mistake. I would be grateful for any
hint.

Be that as it may, I am wondering: Should xelatex ideally work with the
font name "Jost*" like it does with "Minion Pro" and others? Or should
people (and programs like pandoc) who want to produce xelatex-
compatible LaTeX code with the Jost* fonts use the syntax proposed by
Apostolos?


I can see no reason why XeLaTeX users of "Jost*" should be forced to use 
a work-around.  As the font "Jost*" can be successfully loaded and used 
with XeTeX, the problem should be reported to the authors of the 
"fontspec" and "LaTeX2e" packages, as it is probable that the problem 
lies solely therein.


/Philip Taylor/


Re: [XeTeX] asterisk in font name - font error

2020-12-13 Thread Carlos Franke
Apostolos Syropoulos via XeTeX:
> When I use the command \setsansfont{Jost*} I get exactly the sme
> error, however, in the following sample file I have used an
> alternative syntax and this works just fine.
[...]

This would be a neat workaround. However it doesn't compile on my
system either. Running "xelatex temp2.tex" (temp2.tex being Apostolos'
code, only with Minion Pro replaced with another font as I don't have
Minion Pro installed) I get a similar error as before:

   [...]

   (./temp2.aux) (/usr/share/texlive/texmf-
   dist/tex/latex/base/ts1cmr.fd)kpathsea:make_tex: Invalid filename
   `[Jost-500-Medium.otf]/OT', contains '['


   ! Package fontspec Error: The font "Jost-500-Medium" cannot be
   found.


I am likely making some very basic mistake. I would be grateful for any
hint.

Be that as it may, I am wondering: Should xelatex ideally work with the
font name "Jost*" like it does with "Minion Pro" and others? Or should
people (and programs like pandoc) who want to produce xelatex-
compatible LaTeX code with the Jost* fonts use the syntax proposed by
Apostolos?


Sorry for taking so long for this reply! I had the seemingly smart idea
of setting up a filter for this mailing list right away, so that mails
are sorted neatly into a XeTeX folder instead of my inbox. The result
was that I forgot about the matter for over a week :(. I'll try to do
better!

Carlos



Re: [XeTeX] asterisk in font name - font error

2020-12-02 Thread Apostolos Syropoulos via XeTeX
>When I try to compile a pdf using Jost* as main font (
>\setmainfont[]{Jost*}), I get the following error:
>
>  kpathsea:make_tex: Invalid filename
>  `JostJost*/OT:script=latn;language=dflt;', contains '*'
>
>  ! Package fontspec Error: The font "JostJost*" cannot be found.

When I use the command \setsansfont{Jost*} I get exactly the sme error,
however, in the following sample file I have used an alternative syntax
and this works just fine.

\documentclass[a4paper]{article}
\usepackage{xltxtra}
\begin{document}
\setmainfont{Minion Pro}
\setsansfont{Jost-500-Medium.otf}[
Mapping=tex-text,Scale=MatchLowercase,
BoldFont = Jost-700-Bold.otf ,
ItalicFont = Jost-500-MediumItalic.otf,
BoldItalicFont  = Jost-700-BoldItalic.otf]

\LARGE
\sffamily this is an example \textit{italics}, \textbf{bold}, 
and \textbf{\textit{bold italics}}.

\end{document}

Hope this helps.

--
Apostolos Syropoulos
Xanthi, Greece

[2] Select to donate zero dollars in order to download the free
version.



Re: [XeTeX] asterisk in font name - font error

2020-12-02 Thread Zdenek Wagner
Is it possible that some macro package changes the category of * to 13
and defines it somehow?

Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz

st 2. 12. 2020 v 18:12 odesílatel Philip Taylor
 napsal:
>
> No problems here, Carlos, using XeTeX rather than XeLaTeX
>
> \font \Jost = "Jost*"
>
> \Jost Hallo
>
> \end
>
>
> This is XeTeX, Version 3.14159265-2.6-0.92 (TeX Live 2020/W32TeX) 
> (preloaded format=xetex)
>
> \write18 enabled.
>
> entering extended mode
>
> (./untitled-1.tex [1] )
>
> Output written on untitled-1.pdf (1 page).
>
> SyncTeX written on untitled-1.synctex.gz.
>
>
> Transcript written on untitled-1.log.
>
>
> It may therefore be that the problem lies with "fontspec" or with the XeLaTeX 
> format.
> Philip Taylor
> 
> Carlos Franke wrote:
>
> Hello!
>
> I'm having trouble using the typeface Jost* [0] [1] with xelatex.
>
>



Re: [XeTeX] asterisk in font name - font error

2020-12-02 Thread Philip Taylor

No problems here, Carlos, using XeTeX rather than XeLaTeX


\font \Jost = "Jost*"

\Jost Hallo

\end



This is XeTeX, Version 3.14159265-2.6-0.92 (TeX Live 2020/W32TeX) 
(preloaded format=xetex)


\write18 enabled.

entering extended mode

(./untitled-1.tex [1] )

Output written on untitled-1.pdf (1 page).

SyncTeX written on untitled-1.synctex.gz.


Transcript written on untitled-1.log.



It may therefore be that the problem lies with "fontspec" or with the 
XeLaTeX format.

/Philip Taylor/

Carlos Franke wrote:

Hello!

I'm having trouble using the typeface Jost* [0] [1] with xelatex.




[XeTeX] asterisk in font name - font error

2020-12-02 Thread Carlos Franke
Hello!

I'm having trouble using the typeface Jost* [0] [1] with xelatex. My
impression is that the asterisk in the font name is the source of the
trouble, and this is a bug either in xelatex or in the font itself (in
cade it would be violating some standard for font names). However I am
not proficient in LaTeX at all (I only ever use it via pandoc or lyx)
and hence not very confident in my judgement of this being a bug.

I have tried installing the OTF version of Jost* [2] either into
/usr/share/fonts and $HOME/.local/share/fonts and run "sudo fc-cache".

When I try to compile a pdf using Jost* as main font (
\setmainfont[]{Jost*}), I get the following error:

   kpathsea:make_tex: Invalid filename
   `JostJost*/OT:script=latn;language=dflt;', contains '*'

   ! Package fontspec Error: The font "JostJost*" cannot be found.

An example .tex file is attached. It is not minimal because it was
generated by pandoc.

Any help or suggestions on where to properly report this are welcome

Carlos


[0] https://github.com/indestructible-type/Jost
[1] https://indestructibletype.com/Jost.html
[2] Select to donate zero dollars in order to download the free
version.
% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[
  ngerman,
]{scrartcl}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
  \usepackage{unicode-math}
  \defaultfontfeatures{Scale=MatchLowercase}
  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
  \setmainfont[]{Jost*}
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
  \usepackage[]{microtype}
  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
  \IfFileExists{parskip.sty}{%
\usepackage{parskip}
  }{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
  \KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\hypersetup{
  pdftitle={Titel},
  pdflang={de-DE-1996},
  hidelinks,
  pdfcreator={LaTeX via pandoc}}
\urlstyle{same} % disable monospaced font for URLs
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\ifxetex
  % Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic)
  \usepackage{polyglossia}
  \setmainlanguage[]{german}
\else
  \usepackage[shorthands=off,main=ngerman]{babel}
\fi

\title{Titel}
\author{}
\date{}

\begin{document}
\maketitle

Test.

\end{document}