[lucida] install Lucida Bright OpenType for TeXLive (2024-03-21 release)
Bruno Voisin
bvoisin at icloud.com
Sun Mar 24 16:03:46 CET 2024
Dear Hong,
Beware that, by default, this list sends answers to the original poster only, not to the list. To ensure that answers go to the whole list, you need to use Reply-To-All.
For this reason I'm quoting your whole message below, so that people from the list can see it.
> On 24 Mar 2024, at 11:38, hf at hongfeng.ch wrote:
>
> Dear Bruno,
>
> Thank you so much for your guide. Here are more details about the drawback about
> my installation of Lucida Bright Opentype font on TeXLive:
>
> 1. The system I use is Pop!_OS (GNU/Linux, on an x86 PC).
>
> 2. I have unzipped the font into the `texmf-local` as recommended by the instruction.
>
> Before unzipping, I tried this:
>
> ``
> $ kpsewhich -var-value=TEXMFLOCAL
> /home/hf/xanadu/WORKSPACE/texlive/texmf-local
> $
>
> ```
>
> I also did the `mktexlsr` to refresh the font database.
>
> 3. Test. Here it is the simple tex file I tried:
>
> ```
> \documentclass[11pt]{article}
>
> \usepackage{fontspec} % support opentype text fonts
> \defaultfontfeatures{Scale=.92}
>
> \title{Lucida OpenType fonts from TUG}
> \author{\TeX\ Users Group\\[2pt]\code{https://tug.org/lucida}}
> \begin{document}
>
> \maketitle
>
> This document contains examples of the Lucida OpenType fonts available
> through TUG. They can be used with any OpenType-aware application,
> including the Lua\TeX\ and \XeTeX\ extensions of \TeX\ (but not
> pdf\TeX). A brief overview:
>
> \end{document}
> ```
>
> I got the error message:
>
> ```
> $ pdflatex test
> This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2022/dev/Debian) (preloaded format=pdflatex)
> restricted \write18 enabled.
> entering extended mode
> (./test.tex
> LaTeX2e <2021-11-15> patch level 1
> L3 programming layer <2022-01-21>
> (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
> Document Class: article 2021/10/04 v1.4n Standard LaTeX document class
> (/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo))
> (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.sty
> (/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
> (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty
> (/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)))
>
> ! Fatal Package fontspec Error: The fontspec package requires either XeTeX or
> (fontspec) LuaTeX.
> (fontspec)
> (fontspec) You must change your typesetting engine to,
> (fontspec) e.g., "xelatex" or "lualatex" instead of
> (fontspec) "latex" or "pdflatex".
>
> Type <return> to continue.
> ...
>
> l.45 \msg_fatal:nn {fontspec} {cannot-use-pdftex}
>
> ?
> ```
Two things here:
- I see you used lucidaot.tex as the basis for your test file. However, you removed too much: loading fontspec is not enough, you need to tell it to use the Lucida fonts, writing
\setmainfont{LucidaBrightOT.otf}
and so forth. Attached is a fixed version of your file.
- You cannot use pdfLaTeX. As written in the TUG doc, and even in the text of the test file itself, only XeLaTeX and LuaLaTeX can use Opentype fonts. pdfLaTeX can't. So it's either of
xelatex test
lualatex test
but certainly not
pdflatex test
Choosing LuaLaTeX, you may have to wait for a couple of seconds while luaotfload-tool creates its font name database.
> 4. I prefer to use ConTeXt over Latex, tried this simple tex file named `try-context.tex` too:
>
> ```
> \setupbodyfont[lucida-ot]
>
> \starttext
>
> Testing Lucida Bright's OpenType font.
>
> \stoptext
> ```
>
> I ran this:
>
> ```
> $ context try-context > try-context.log
> ```
>
> The `try-context.pdf` generated succcessfully, but the font used is the default
> cmr, not the Lucida Bright OpenType. The log file is quite long, and I attached it
> with this email for your analyze.
>
> (BTW, I'd done the `mtxrun --generate` before this test, I also attached the log
> of this command as attached file for your reference.)
Here I can't help unfortunately. I'm no ConTeXt user myself. Running your example with either old-style ConTeXt ("context --luatex", based on LuaTeX) or new-style ConTeXt ("context", based on LuaMetaTeX), I get the same as you: Latin Modern, not Lucida.
After over two hours looking at the ConTeXt doc in texmf-dist/doc/context, the input files inside texmf-dist/tex/context, and also on the web at <https://wiki.contextgarden.net/Fonts>, especially
https://wiki.contextgarden.net/Lucida_-_Old_Content
https://wiki.contextgarden.net/Math_fonts
https://wiki.contextgarden.net/Typescripts_examples
https://wiki.contextgarden.net/Use_the_fonts_you_want
I feel none the wiser.
I have the impression ConTeXt has support files for Lucida OpenType,
type-imp-lucida.mkiv
lucida-text.lfg
lucida-math.lfg
These are not included in TeX Live, but can be retrieved from the full ConTeXt distribution at
https://www.pragma-ade.nl/download-1.htm
or from the GitHub mirror at
https://github.com/contextgarden/context/tree/main/tex/context/fonts/mkiv
I installed them in TEXMFLOCAL/tex/context/fonts/mkiv, ran "sudo mktexlsr", for good measure ran also
context --luatex --generate
mtxrun --script fonts --reload
I then modified your test file to be
\loadtypescriptfile[lucida]
\setupbodyfont[lucida]
\starttext
Testing Lucida Bright's OpenType font.
\stoptext
Doesn't work, I still get Latin Modern and absolutely no mention of Lucida in the log. I tried using \usetypescriptfile instead of \loadtypescriptfile, call the typescript file as lucida-opentype, set the body font to lucidaot: nothing has the faintest effect, it's always Latin Modern, not Lucida.
It's been more than three hours now, I'm giving up. Sorry!
Bruno
> Best,
> Hong
-------------- next part --------------
A non-text attachment was scrubbed...
Name: try-latex.pdf
Type: application/pdf
Size: 9066 bytes
Desc: not available
URL: <https://tug.org/pipermail/lucida/attachments/20240324/84bd3464/attachment.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: try-latex.tex
Type: application/octet-stream
Size: 1408 bytes
Desc: not available
URL: <https://tug.org/pipermail/lucida/attachments/20240324/84bd3464/attachment.obj>
-------------- next part --------------
More information about the lucida
mailing list.