[lucida] Lucida OpenType installation problem

Bruno Voisin bvoisin at me.com
Fri Jul 4 14:33:38 CEST 2014


Le 4 juil. 2014 à 01:27, Bruno Voisin <bvoisin at me.com> a écrit :

> Le 4 juil. 2014 à 00:43, Karl Berry <karl at freefriends.org> a écrit :
> 
>>   Does that mean that it would be enough to say simply
>>  \setmainfont{LucidaBrightOT.otf}
>>  \setsansfont{LucidaSansOT.otf}
>>  \setmonofont{LucidaSansTypewriterOT.otf}
>>  \setmathfont{LucidaBrightMathOT.otf}
>> 
>> Yes, that is my understanding of what will work, approximately speaking,
>> once the .fontspec file is created.  I haven't delved into it in detail,
>> though.
>> 
>> (In principle, it seems to me it could even know what the sans/mono/math
>> fonts are and set them too, but that's probably asking too much.)
>> 
>>   I don't see any .fontspec file in the existing configuration.
>> 
>> Right, creating that is what needs to be done :).
> 
> To get things started, here's a failed attempt. [...]

Looking more closely, with lucidaot.tex as a test file and the bold etc. specifications commented out, namely

	\setmainfont[% main rm
	%      ItalicFont=LucidaBrightOT-Italic.otf,
	%        BoldFont=LucidaBrightOT-Demi.otf,
	%  BoldItalicFont=LucidaBrightOT-DemiItalic.otf,
	  ]{LucidaBrightOT.otf}

Then, a LucidaBrightOT.fontspec file containing

	\defaultfontfeatures[LucidaBrightOT.otf]
	  {
	   BoldFont=LucidaBrightOT-Demi.otf,
	   ItalicFont=LucidaBrightOT-Italic.otf,
	   BoldItalicFont=LucidaBrightOT-DemiItalic.otf,
	  }

yields for lucidaot.tex:

	!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
	!
	./lucidaot.tex:21: LaTeX error: "kernel/key-unknown"
	! 
	! The key 'fontspec/BoldFont' is unknown and is being ignored.
	! 
	! See the LaTeX3 documentation for further information.
	! 
	! For immediate help type H <return>.
	!...............................................  
	                                                  
	l.21   ]{LucidaBrightOT.otf}

On the other hand, if \rmfamily is used instead of LucidaBrightOT.otf in the .fontspec file, namely

	\defaultfontfeatures[\rmfamily]
	  {
	   BoldFont=LucidaBrightOT-Demi.otf,
	   ItalicFont=LucidaBrightOT-Italic.otf,
	   BoldItalicFont=LucidaBrightOT-DemiItalic.otf,
	  }

then everything works OK.

This looks like a fontspec bug to me, and happens with both XeLaTeX and LuaLaTeX, hence might reside within the lines

	\DeclareDocumentCommand \defaultfontfeatures { t+ o m }

and following from fontspec-xetex.sty and fontspec-luatex.sty (perhaps within \cs_new:Nn \__fontspec_sanitise_fontname:Nn). Unfortunately this is all written in LaTeX 3 idiom, which I cannot speak, hence I can't contribute to a fix.

Bruno Voisin



More information about the lucida mailing list