[lucida] Three remarks/reports about Lucida OpenType

Bruno Voisin bvoisin at me.com
Sun Mar 25 22:49:00 CEST 2012


Hello,

As the subject says, here are three remarks after a weekend experimenting with the newly released Lucida OpenType. This is on a Mac with OS X Lion and MacTeX 2011; the fonts were installed (for testing purposes) both in the system directory /Library/Fonts and in the TeX directory /usr/local/texlive/texmf-local/fonts/opentype. All three issues have been discussed to some extent on the (private) MacTeX list already.


(1) Loading the fonts with fontspec, it seems that XeLaTeX finds the bold and bold italic fonts but LuaLaTeX doesn't. For the latter, you have to indicate that bold is actually demibold, as in

	\setmainfont[%
	  BoldFont={* Demibold},
	  BoldItalicFont={* Demibold Italic}
	  ]{Lucida Bright OT}
	\setsansfont[%
	  BoldFont={* Demibold},
	  BoldItalicFont={* Demibold Italic}
	  ]{Lucida Sans OT}


(2) The example lucidaot.tex typesets successfully with LuaLaTeX but not XeLaTeX. This seems to be caused by the test loading hyperref.sty when hyperlinks are supported and url.sty when they aren't: only \ipdf is tested for, true for LuaLaTeX but false for XeLaTeX. As a consequence, with XeLaTeX you get:

	./lucidaot.tex:72: Undefined control sequence.
	\Url Error ->\url used in a moving argument. 

	l.72 ...s Group\\[2pt]\url{http://tug.org/lucida}}

If you replace the test, originally

	\usepackage{ifpdf} % live url's if pdf.
	\ifpdf
	\usepackage[breaklinks,colorlinks,linkcolor=black,citecolor=black,
	            urlcolor=black,hyperfootnotes=false]{hyperref}
	\else \usepackage{url}
	\fi

by

	\usepackage{ifpdf} % live url's if pdf.
	\usepackage{ifxetex}
	\ifpdf
	\usepackage[breaklinks,colorlinks,linkcolor=black,citecolor=black,
	            urlcolor=black,hyperfootnotes=false]{hyperref}
	\else \ifxetex
	\usepackage[breaklinks,colorlinks,linkcolor=black,citecolor=black,
	            urlcolor=black,hyperfootnotes=false]{hyperref}
	\else \usepackage{url}
	\fi\fi

or maybe even better

	\usepackage{ifluatex}
	\usepackage{ifxetex}
	\ifluatex
	\usepackage[breaklinks,colorlinks,linkcolor=black,citecolor=black,
	            urlcolor=black,hyperfootnotes=false]{hyperref}
	\else \ifxetex
	\usepackage[breaklinks,colorlinks,linkcolor=black,citecolor=black,
	            urlcolor=black,hyperfootnotes=false]{hyperref}
	\else \usepackage{url}
	\fi\fi

then all's fine with both LuaLaTeX and XeLaTeX.


(3) The italic corrections present for the Type 1 fonts seem present but smaller for the OpenType fonts loaded with XeTeX, and absent with LuaTeX. Here's a small example file, to be typeset with plain LuaTeX or XeTeX, assuming you have both the Type 1 and OpenType fonts installed:

	\input ifxetex.sty
	\input ifluatex.sty
	\ifxetex
	  \font\lbrot="Lucida Bright OT:mapping=tex-text"
	  \font\lbiot="Lucida Bright OT Italic:mapping=tex-text"
	\else\ifluatex
	  \input luaotfload.sty
	  \font\lbrot="Lucida Bright OT:+tlig,+trep"
	  \font\lbiot="Lucida Bright OT Italic:+tlig,+trep"
	\fi\fi
	\font\lbrps=hlhr8y
	\font\lbips=hlhri8y
	\noindent \lbrps Italic correction with Type~1 font: {\lbips Doklady\/}:\par
	\noindent \lbrot Italic correction with OpenType font: {\lbiot Doklady\/}:
	\bye

and the output I got with XeTeX (above) and LuaTeX (below) -- look at the space between the italic "Doklady" and the following ":":



This is to some extent logical: italic corrections are a specific feature of TeX metrics, defined in the TFM files accompanying the Type 1 fonts. OpenType fonts do not have -- I think -- this info, so XeTeX since version 0.99 computes its own italic corrections based on the glyph shapes.

For LuaTeX I'm not aware of any such mechanism. If there is, does anybody know how to activate it?


Bruno Voisin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/lucida/attachments/20120325/4d2d1a45/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Capture d??cran 2012-03-25 ? 22.36.04.png
Type: image/png
Size: 91295 bytes
Desc: not available
URL: <http://tug.org/pipermail/lucida/attachments/20120325/4d2d1a45/attachment-0001.png>


More information about the lucida mailing list