conflict of \fontname (auto_font_shape fails with TTC fonts) #57
Comments
This would patch all fonts regardless of their type which has been the cause of trouble in the past. Here is my proposal: phi-gamma@ce418e1 Can you test it? I don‘t have a Mac, nor the Optima font, nor do I understand the fontspec code, so I won’t be much of help here. |
Then, how about this one? luatexbase.add_to_callback("luaotfload.patch_font", |
I’ve added it like this: ff293e5 in the compatibility callback. |
Works well now. Thanks a lot. |
\documentclass{article} This tex source breaks the process with error: ! LuaTeX error ./luaotfload-merged.lua:2972: bad argument #2 to 'find_file' (invalid option 'ttc(0)'). So please revert the "fontdata.name" for the time being. We need more digging into this issue. |
@dohyunkim as you have more experience with TTC subfonts, do you happen to know what is the maximum number of subfonts permitted? |
@phi-gamma I don't know whether there is any limit to the number of subfonts. On my Mac, "Avenir Next Condensed.ttc" has twelve subfonts, that is from 0 to 11. |
The |
Thanks @dohyunkim, @khaledhosny. I’ve added a less strict test for subfonts. |
see latex3/fontspec#152
So, how about patching fontdata.name like this:
luatexbase.add_to_callback("luaotfload.patch_font",
function(fontdata)
fontdata.name = fontdata.fullname or fontdata.psname or fontdata.name
end,
"luaotfload.tex_fontname_patch")
The text was updated successfully, but these errors were encountered: