Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Luaotfload has problems finding a font that is installed in my texmf tree. The source:

\input luaotfload.sty
\font\myfont={CMU Sans Serif Demi Condensed} at 10pt
\myfont
foo
\bye

The font is in texmf-dist/fonts/opentype/public/cm-unicode/cmunssdc.otf and kpsewhich finds it. What can I do now?

Edit: a sister font {CMU Sans Serif Bold Extended Oblique} works fine. Same directory...

share|improve this question
    
Try searching for this font in the font database (a plain text file named otfl-names.lua, in the directory \luatex-cache\generic\names in one of your texmf trees). Maybe it has a slightly different name there, so it isn't found by your specification. –  diabonas Mar 30 '11 at 14:44
    
The name is from the database itself. So somehow mkluatexfontdb finds the font in the tree but luaotfload can't load it. It is taken from the names.fullname entry. –  topskip Mar 30 '11 at 14:50
2  
Not a solution, but to say that I see the same behaviour on the Mac and on Windows, both with TL 2010. CMU Sans Serif Bold Extended Oblique is found, but CMU Sans Serif Demi Condensed is not. I wonder therefore about the font file: it does seem to be that one that is an issue. –  Joseph Wright Mar 30 '11 at 15:29

2 Answers 2

Well at first look in otfl-names.lua if the font is there and if you are using the correct name.

If the font is not there, the folder is not cached. Why and what to do about it depends on your system. mkluatexfontdb --help says:

Fonts are searched in directories on Windows or Linux that have been
searched with fontconfig.

On Mac OS X, only fonts located in the following standard font locations are
included in the font database:
    ~/Library/Fonts          /Library/Fonts
    /System/Library/Fonts    /Network/Library/Fonts
In particular, fonts installed in other locations with "Font Book" will not
be available.
share|improve this answer
    
The font is in the database. Also fonts included in the texmf tree are included in the database (on all systems I guess, I am on OS X). –  topskip Mar 30 '11 at 14:57
    
Why didn't you say directly that you already checked the database? Well the above message says that in OS X fonts in texmf trees are not available. I don't know why it is nevertheless in the database and I can't make tests as I have windows. –  Ulrike Fischer Mar 30 '11 at 15:04
    
Of course I should have mentioned that directly. Didn't think about it. Sorry –  topskip Mar 30 '11 at 15:09
1  
@Urlike, no texmf tree is searched in all systems, the above message is misleading, I'll try to fix it when I've time (I'm half sleeping now). –  Khaled Hosny Mar 31 '11 at 0:40

I have no explanation for the strange behaviour of luaotfload at all, but for me (TeX Live 2010, Windows), the font is loaded when using exactly the same font name as fc-list does, which is CMU Sans Serif Demi Condensed:style=DemiCondensed:

\input luaotfload.sty
\font\myfont={CMU Sans Serif Demi Condensed:style=DemiCondensed} at 10pt
\myfont
foo
\bye

works fine for me.

share|improve this answer
1  
Also works for me on the Mac, even though it's not listed by fc-list! –  Joseph Wright Mar 30 '11 at 16:09
    
@joseph: we don't use FontConfig on mac at all (on linux, we may read its configuration files if present), fonts in texmf tree are located using kpse. –  Khaled Hosny Mar 31 '11 at 0:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.