LyXInstalling Open Type Fonts for Use with LyX

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
efroselli
Posts: 24
Joined: Wed Feb 20, 2013 1:24 pm

Installing Open Type Fonts for Use with LyX

Post by efroselli »

The marketing department of my company wants me to produce documentation using some Adobe Open Type fonts (Myriad and Museo). The fonts are very easy to install in Windows and to use in Windows based word processors like FrameMaker or Word, so they can't understand why I would have a problem. But the technical department wants me to use LyX, and the fonts are apparently hell to set up in LyX!

I've been doing some research on the internet. I found an article dating from 2006 that gives a very daunting procedure.

I really don't feel confident attempting all of that as a newbie. Is there anything easier that might have been invented since?

Also, I see a lot in TeX forums about using XeTeX to have access to Open Type fonts, but I can't figure out how to use it. How would I go about using XeTeX with LyX? I've already discovered that export/import from LyX to other formats often doesn't work.

Thanks to anyone who can offer guidance.

EFR

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

efroselli
Posts: 24
Joined: Wed Feb 20, 2013 1:24 pm

Installing Open Type Fonts for Use with LyX

Post by efroselli »

I think I've figured out how to use XeTeX with LyX. Instead of clicking on the eyes icon to compile, I select File>Export>PDF (XeTeX).

Also I made the following modifications to the preamble of the document.

Code: Select all

%\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{xunicode}
\usepackage{fontspec}
\usepackage{xltxtra}
\setmainfont[Mapping=tex-text]{Myriad Pro}
I checked the box Fonts > Use non-TeX fonts (via XeTeX/LuaTeX) in the Document Settings.

But I still have a problem. When I try to compile, a message appears below the screen "failed to convert input string UTF16."

Then the compilation fails, and I get this error message (among others):

Code: Select all

! Unable to load picture or PDF file 'C:/Users/me/Documents/IMCC'.
<to be read again> 
                   C
l.123 \tableofcontents
                      {}
The requested image couldn't be read because 
it was not a recognized image format.
The image nearest the complaint is called in the cls file and is in *.png format. The standard PDF compilation never had a problem with it. Is there something else I need to do to get XeTeX to compile it?

Thanks,

EFR
efroselli
Posts: 24
Joined: Wed Feb 20, 2013 1:24 pm

Re: Installing Open Type Fonts for Use with LyX

Post by efroselli »

Got XeTex and fonts figured out on Friday but am still having compilation errors with the part of code in the class that calls two image files. I've posted that problem in a separate topic in the XeTeX branch so this one is closed.
Post Reply