Errors with libttf (was Font metric data not found or bad)











up vote
1
down vote

favorite












I'm having trouble loading some right-to-left fonts in a document I'm working on. I chose one at random — Avestan.



MWE requires that you download https://noto-website-2.storage.googleapis.com/pkgs/NotoSansAvestan-hinted.zip and put the .ttf file in a "fonts/" subdirectory relative to the MWE:



documentclass[a4paper]{article}
usepackage{fontspec}
usepackage[english]{babel}
newfontfamilyavestanfont[Path=fonts/,UprightFont=*-Regular,Extension=.ttf]{Noto Sans Avestan}
newcommand{textavestan}[1]{bgrouptextdir TRTavestanfont #1egroup}
begin{document}
Test Avestan: textavestan{𐬰𐬀𐬭𐬀𐬚𐬎𐬱𐬙𐬭𐬀}
end{document}


Compilation errors with lualatex:



!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "NotoSansAvestan-Regular" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................


Furthermore,



! Font TU/NotoSansAvestan(0)/m/n/10=[fonts/NotoSansAvestan-Regular.ttf]:mode=node; at 10pt not loadable: metric data not found or bad.


Any recommendations on how to get this font to work are appreciated.



Edit
Some friendly helpers in the comments were wondering if it's an environmental issue. I've tried this on a clean cygwin texlive install, and using texlive-portable from the install manager on Windows. Using the mwe.tex from above and putting NotoSansAvestan-Regular.ttf in the fonts/ subdirectory, I have the following clean environment set up:




  • C:temptexlive-portable: new install of texlive w/ babel, babel-english, luatex, fontspec, and luaotfload

  • C:tempmwemwe.tex: the mwe.tex example

  • C:tempmwefontsNotoSansAvestan-Regular.ttf: the font extracted from the .zip package


With what I think is a fairly clean setup now, from C:tempmwe, I run:



>C:temptexlive-portablebinwin32lualatex.exe mwe
This is LuaTeX, Version 1.0.4 (TeX Live 2017/W32TeX)
restricted system commands enabled.
(./mwe.tex
LaTeX2e <2017-04-15>
(using write cache: C:/TEMP/texlive-portable/texmf-var/luatex-cache/generic)(us
ing read cache: C:/TEMP/texlive-portable/texmf-var/luatex-cache/generic C:/TEMP
/texlive-portable/texmf-var/luatex-cache/generic)
luaotfload | main : initialization completed in 0.297 seconds
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/base/size10.clo(load luc: C:/TEM
P/texlive-portable/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-regular.l
uc))) (c:/TEMP/texlive-portable/texmf-dist/tex/latex/fontspec/fontspec.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/l3kernel/expl3.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/l3kernel/expl3-code.tex)
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/l3kernel/l3pdfmode.def)))
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/base/fontenc.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/base/tuenc.def))
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/fontspec/fontspec.cfg)(load luc:
C:/TEMP/texlive-portable/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-bo
ld.luc)(load luc: C:/TEMP/texlive-portable/texmf-var/luatex-cache/generic/fonts
/otl/lmroman10-italic.luc)))
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel/babel.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel/switch.def)
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel/luababel.def)
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel-english/english.ldf
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel/babel.def
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel/luababel.def))))

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "NotoSansAvestan-Regular" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................

l.4 ...=*-Regular,Extension=.ttf]{Noto Sans Avestan}

?


EDIT 2
Ok, I finally got it to work! The font from http://fonts.gstatic.com/ea/notosansavestan/v1/download.zip works just fine, but the font from https://noto-website-2.storage.googleapis.com/pkgs/NotoSansAvestan-hinted.zip is giving me the aforementioned errors. I guess the question is now, "Why is the official Avestan font not loading in lualatex?"



Ttfdump is also failing:



$ ttfdump.exe NotoSansAvestan-Regular.ttf
Unrecognized GPOS lookupFormat


It appears that libttf is the culprit here.










share|improve this question
















bumped to the homepage by Community 1 hour ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • If you haven’t installed the font as a system font (I assume you haven’t, since you’re putting it in a subdirectory of your project), you must refer to it by filename, not by the name of the font.
    – Thérèse
    Apr 5 at 20:31










  • It is installed as a system font, I just set up the MWE so that anyone can experience the errors without having to install the font first.
    – Squinky86
    Apr 5 at 20:33










  • In that case, I can’t reproduce the problem on my system.
    – Thérèse
    Apr 5 at 20:34










  • Is the example you're using identical to the one above? If not, can you please share what you modified? I feel like I'm missing something stupid.
    – Squinky86
    Apr 5 at 21:04










  • Identical, except that I removed the reference to the subdirectory since I’ve had the font installed as a system font for months now.
    – Thérèse
    Apr 5 at 21:05















up vote
1
down vote

favorite












I'm having trouble loading some right-to-left fonts in a document I'm working on. I chose one at random — Avestan.



MWE requires that you download https://noto-website-2.storage.googleapis.com/pkgs/NotoSansAvestan-hinted.zip and put the .ttf file in a "fonts/" subdirectory relative to the MWE:



documentclass[a4paper]{article}
usepackage{fontspec}
usepackage[english]{babel}
newfontfamilyavestanfont[Path=fonts/,UprightFont=*-Regular,Extension=.ttf]{Noto Sans Avestan}
newcommand{textavestan}[1]{bgrouptextdir TRTavestanfont #1egroup}
begin{document}
Test Avestan: textavestan{𐬰𐬀𐬭𐬀𐬚𐬎𐬱𐬙𐬭𐬀}
end{document}


Compilation errors with lualatex:



!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "NotoSansAvestan-Regular" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................


Furthermore,



! Font TU/NotoSansAvestan(0)/m/n/10=[fonts/NotoSansAvestan-Regular.ttf]:mode=node; at 10pt not loadable: metric data not found or bad.


Any recommendations on how to get this font to work are appreciated.



Edit
Some friendly helpers in the comments were wondering if it's an environmental issue. I've tried this on a clean cygwin texlive install, and using texlive-portable from the install manager on Windows. Using the mwe.tex from above and putting NotoSansAvestan-Regular.ttf in the fonts/ subdirectory, I have the following clean environment set up:




  • C:temptexlive-portable: new install of texlive w/ babel, babel-english, luatex, fontspec, and luaotfload

  • C:tempmwemwe.tex: the mwe.tex example

  • C:tempmwefontsNotoSansAvestan-Regular.ttf: the font extracted from the .zip package


With what I think is a fairly clean setup now, from C:tempmwe, I run:



>C:temptexlive-portablebinwin32lualatex.exe mwe
This is LuaTeX, Version 1.0.4 (TeX Live 2017/W32TeX)
restricted system commands enabled.
(./mwe.tex
LaTeX2e <2017-04-15>
(using write cache: C:/TEMP/texlive-portable/texmf-var/luatex-cache/generic)(us
ing read cache: C:/TEMP/texlive-portable/texmf-var/luatex-cache/generic C:/TEMP
/texlive-portable/texmf-var/luatex-cache/generic)
luaotfload | main : initialization completed in 0.297 seconds
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/base/size10.clo(load luc: C:/TEM
P/texlive-portable/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-regular.l
uc))) (c:/TEMP/texlive-portable/texmf-dist/tex/latex/fontspec/fontspec.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/l3kernel/expl3.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/l3kernel/expl3-code.tex)
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/l3kernel/l3pdfmode.def)))
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/base/fontenc.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/base/tuenc.def))
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/fontspec/fontspec.cfg)(load luc:
C:/TEMP/texlive-portable/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-bo
ld.luc)(load luc: C:/TEMP/texlive-portable/texmf-var/luatex-cache/generic/fonts
/otl/lmroman10-italic.luc)))
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel/babel.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel/switch.def)
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel/luababel.def)
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel-english/english.ldf
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel/babel.def
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel/luababel.def))))

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "NotoSansAvestan-Regular" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................

l.4 ...=*-Regular,Extension=.ttf]{Noto Sans Avestan}

?


EDIT 2
Ok, I finally got it to work! The font from http://fonts.gstatic.com/ea/notosansavestan/v1/download.zip works just fine, but the font from https://noto-website-2.storage.googleapis.com/pkgs/NotoSansAvestan-hinted.zip is giving me the aforementioned errors. I guess the question is now, "Why is the official Avestan font not loading in lualatex?"



Ttfdump is also failing:



$ ttfdump.exe NotoSansAvestan-Regular.ttf
Unrecognized GPOS lookupFormat


It appears that libttf is the culprit here.










share|improve this question
















bumped to the homepage by Community 1 hour ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • If you haven’t installed the font as a system font (I assume you haven’t, since you’re putting it in a subdirectory of your project), you must refer to it by filename, not by the name of the font.
    – Thérèse
    Apr 5 at 20:31










  • It is installed as a system font, I just set up the MWE so that anyone can experience the errors without having to install the font first.
    – Squinky86
    Apr 5 at 20:33










  • In that case, I can’t reproduce the problem on my system.
    – Thérèse
    Apr 5 at 20:34










  • Is the example you're using identical to the one above? If not, can you please share what you modified? I feel like I'm missing something stupid.
    – Squinky86
    Apr 5 at 21:04










  • Identical, except that I removed the reference to the subdirectory since I’ve had the font installed as a system font for months now.
    – Thérèse
    Apr 5 at 21:05













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I'm having trouble loading some right-to-left fonts in a document I'm working on. I chose one at random — Avestan.



MWE requires that you download https://noto-website-2.storage.googleapis.com/pkgs/NotoSansAvestan-hinted.zip and put the .ttf file in a "fonts/" subdirectory relative to the MWE:



documentclass[a4paper]{article}
usepackage{fontspec}
usepackage[english]{babel}
newfontfamilyavestanfont[Path=fonts/,UprightFont=*-Regular,Extension=.ttf]{Noto Sans Avestan}
newcommand{textavestan}[1]{bgrouptextdir TRTavestanfont #1egroup}
begin{document}
Test Avestan: textavestan{𐬰𐬀𐬭𐬀𐬚𐬎𐬱𐬙𐬭𐬀}
end{document}


Compilation errors with lualatex:



!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "NotoSansAvestan-Regular" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................


Furthermore,



! Font TU/NotoSansAvestan(0)/m/n/10=[fonts/NotoSansAvestan-Regular.ttf]:mode=node; at 10pt not loadable: metric data not found or bad.


Any recommendations on how to get this font to work are appreciated.



Edit
Some friendly helpers in the comments were wondering if it's an environmental issue. I've tried this on a clean cygwin texlive install, and using texlive-portable from the install manager on Windows. Using the mwe.tex from above and putting NotoSansAvestan-Regular.ttf in the fonts/ subdirectory, I have the following clean environment set up:




  • C:temptexlive-portable: new install of texlive w/ babel, babel-english, luatex, fontspec, and luaotfload

  • C:tempmwemwe.tex: the mwe.tex example

  • C:tempmwefontsNotoSansAvestan-Regular.ttf: the font extracted from the .zip package


With what I think is a fairly clean setup now, from C:tempmwe, I run:



>C:temptexlive-portablebinwin32lualatex.exe mwe
This is LuaTeX, Version 1.0.4 (TeX Live 2017/W32TeX)
restricted system commands enabled.
(./mwe.tex
LaTeX2e <2017-04-15>
(using write cache: C:/TEMP/texlive-portable/texmf-var/luatex-cache/generic)(us
ing read cache: C:/TEMP/texlive-portable/texmf-var/luatex-cache/generic C:/TEMP
/texlive-portable/texmf-var/luatex-cache/generic)
luaotfload | main : initialization completed in 0.297 seconds
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/base/size10.clo(load luc: C:/TEM
P/texlive-portable/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-regular.l
uc))) (c:/TEMP/texlive-portable/texmf-dist/tex/latex/fontspec/fontspec.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/l3kernel/expl3.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/l3kernel/expl3-code.tex)
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/l3kernel/l3pdfmode.def)))
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/base/fontenc.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/base/tuenc.def))
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/fontspec/fontspec.cfg)(load luc:
C:/TEMP/texlive-portable/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-bo
ld.luc)(load luc: C:/TEMP/texlive-portable/texmf-var/luatex-cache/generic/fonts
/otl/lmroman10-italic.luc)))
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel/babel.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel/switch.def)
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel/luababel.def)
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel-english/english.ldf
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel/babel.def
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel/luababel.def))))

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "NotoSansAvestan-Regular" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................

l.4 ...=*-Regular,Extension=.ttf]{Noto Sans Avestan}

?


EDIT 2
Ok, I finally got it to work! The font from http://fonts.gstatic.com/ea/notosansavestan/v1/download.zip works just fine, but the font from https://noto-website-2.storage.googleapis.com/pkgs/NotoSansAvestan-hinted.zip is giving me the aforementioned errors. I guess the question is now, "Why is the official Avestan font not loading in lualatex?"



Ttfdump is also failing:



$ ttfdump.exe NotoSansAvestan-Regular.ttf
Unrecognized GPOS lookupFormat


It appears that libttf is the culprit here.










share|improve this question















I'm having trouble loading some right-to-left fonts in a document I'm working on. I chose one at random — Avestan.



MWE requires that you download https://noto-website-2.storage.googleapis.com/pkgs/NotoSansAvestan-hinted.zip and put the .ttf file in a "fonts/" subdirectory relative to the MWE:



documentclass[a4paper]{article}
usepackage{fontspec}
usepackage[english]{babel}
newfontfamilyavestanfont[Path=fonts/,UprightFont=*-Regular,Extension=.ttf]{Noto Sans Avestan}
newcommand{textavestan}[1]{bgrouptextdir TRTavestanfont #1egroup}
begin{document}
Test Avestan: textavestan{𐬰𐬀𐬭𐬀𐬚𐬎𐬱𐬙𐬭𐬀}
end{document}


Compilation errors with lualatex:



!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "NotoSansAvestan-Regular" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................


Furthermore,



! Font TU/NotoSansAvestan(0)/m/n/10=[fonts/NotoSansAvestan-Regular.ttf]:mode=node; at 10pt not loadable: metric data not found or bad.


Any recommendations on how to get this font to work are appreciated.



Edit
Some friendly helpers in the comments were wondering if it's an environmental issue. I've tried this on a clean cygwin texlive install, and using texlive-portable from the install manager on Windows. Using the mwe.tex from above and putting NotoSansAvestan-Regular.ttf in the fonts/ subdirectory, I have the following clean environment set up:




  • C:temptexlive-portable: new install of texlive w/ babel, babel-english, luatex, fontspec, and luaotfload

  • C:tempmwemwe.tex: the mwe.tex example

  • C:tempmwefontsNotoSansAvestan-Regular.ttf: the font extracted from the .zip package


With what I think is a fairly clean setup now, from C:tempmwe, I run:



>C:temptexlive-portablebinwin32lualatex.exe mwe
This is LuaTeX, Version 1.0.4 (TeX Live 2017/W32TeX)
restricted system commands enabled.
(./mwe.tex
LaTeX2e <2017-04-15>
(using write cache: C:/TEMP/texlive-portable/texmf-var/luatex-cache/generic)(us
ing read cache: C:/TEMP/texlive-portable/texmf-var/luatex-cache/generic C:/TEMP
/texlive-portable/texmf-var/luatex-cache/generic)
luaotfload | main : initialization completed in 0.297 seconds
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/base/size10.clo(load luc: C:/TEM
P/texlive-portable/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-regular.l
uc))) (c:/TEMP/texlive-portable/texmf-dist/tex/latex/fontspec/fontspec.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/l3kernel/expl3.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/l3kernel/expl3-code.tex)
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/l3kernel/l3pdfmode.def)))
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/base/fontenc.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/base/tuenc.def))
(c:/TEMP/texlive-portable/texmf-dist/tex/latex/fontspec/fontspec.cfg)(load luc:
C:/TEMP/texlive-portable/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-bo
ld.luc)(load luc: C:/TEMP/texlive-portable/texmf-var/luatex-cache/generic/fonts
/otl/lmroman10-italic.luc)))
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel/babel.sty
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel/switch.def)
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel/luababel.def)
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel-english/english.ldf
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel/babel.def
(c:/TEMP/texlive-portable/texmf-dist/tex/generic/babel/luababel.def))))

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "NotoSansAvestan-Regular" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................

l.4 ...=*-Regular,Extension=.ttf]{Noto Sans Avestan}

?


EDIT 2
Ok, I finally got it to work! The font from http://fonts.gstatic.com/ea/notosansavestan/v1/download.zip works just fine, but the font from https://noto-website-2.storage.googleapis.com/pkgs/NotoSansAvestan-hinted.zip is giving me the aforementioned errors. I guess the question is now, "Why is the official Avestan font not loading in lualatex?"



Ttfdump is also failing:



$ ttfdump.exe NotoSansAvestan-Regular.ttf
Unrecognized GPOS lookupFormat


It appears that libttf is the culprit here.







fonts fontspec luaotfload






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 6 at 4:12

























asked Apr 5 at 19:21









Squinky86

62




62





bumped to the homepage by Community 1 hour ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 1 hour ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • If you haven’t installed the font as a system font (I assume you haven’t, since you’re putting it in a subdirectory of your project), you must refer to it by filename, not by the name of the font.
    – Thérèse
    Apr 5 at 20:31










  • It is installed as a system font, I just set up the MWE so that anyone can experience the errors without having to install the font first.
    – Squinky86
    Apr 5 at 20:33










  • In that case, I can’t reproduce the problem on my system.
    – Thérèse
    Apr 5 at 20:34










  • Is the example you're using identical to the one above? If not, can you please share what you modified? I feel like I'm missing something stupid.
    – Squinky86
    Apr 5 at 21:04










  • Identical, except that I removed the reference to the subdirectory since I’ve had the font installed as a system font for months now.
    – Thérèse
    Apr 5 at 21:05


















  • If you haven’t installed the font as a system font (I assume you haven’t, since you’re putting it in a subdirectory of your project), you must refer to it by filename, not by the name of the font.
    – Thérèse
    Apr 5 at 20:31










  • It is installed as a system font, I just set up the MWE so that anyone can experience the errors without having to install the font first.
    – Squinky86
    Apr 5 at 20:33










  • In that case, I can’t reproduce the problem on my system.
    – Thérèse
    Apr 5 at 20:34










  • Is the example you're using identical to the one above? If not, can you please share what you modified? I feel like I'm missing something stupid.
    – Squinky86
    Apr 5 at 21:04










  • Identical, except that I removed the reference to the subdirectory since I’ve had the font installed as a system font for months now.
    – Thérèse
    Apr 5 at 21:05
















If you haven’t installed the font as a system font (I assume you haven’t, since you’re putting it in a subdirectory of your project), you must refer to it by filename, not by the name of the font.
– Thérèse
Apr 5 at 20:31




If you haven’t installed the font as a system font (I assume you haven’t, since you’re putting it in a subdirectory of your project), you must refer to it by filename, not by the name of the font.
– Thérèse
Apr 5 at 20:31












It is installed as a system font, I just set up the MWE so that anyone can experience the errors without having to install the font first.
– Squinky86
Apr 5 at 20:33




It is installed as a system font, I just set up the MWE so that anyone can experience the errors without having to install the font first.
– Squinky86
Apr 5 at 20:33












In that case, I can’t reproduce the problem on my system.
– Thérèse
Apr 5 at 20:34




In that case, I can’t reproduce the problem on my system.
– Thérèse
Apr 5 at 20:34












Is the example you're using identical to the one above? If not, can you please share what you modified? I feel like I'm missing something stupid.
– Squinky86
Apr 5 at 21:04




Is the example you're using identical to the one above? If not, can you please share what you modified? I feel like I'm missing something stupid.
– Squinky86
Apr 5 at 21:04












Identical, except that I removed the reference to the subdirectory since I’ve had the font installed as a system font for months now.
– Thérèse
Apr 5 at 21:05




Identical, except that I removed the reference to the subdirectory since I’ve had the font installed as a system font for months now.
– Thérèse
Apr 5 at 21:05










1 Answer
1






active

oldest

votes

















up vote
0
down vote













This appears to be a bug with fontspec and/or luatex; however, I do have a workaround for anyone running into a similar problem.



Problem: fontspec/luatex is unable to read the .ttf file.



Solution: Convert the .ttf file to a valid .otf file, and luatex will be able to see it.



Using fontforge, I scripted the failing fonts as follows:



fontforge -lang=ff -c 'Open($1); Generate($2)' NotoSansAvestan-Regular.ttf NotoSansAvestan-Regular.otf


then changed the mwe to:



documentclass[a4paper]{article}
usepackage{fontspec}
usepackage[english]{babel}
newfontfamilyavestanfont[Path=fonts/,UprightFont=*-Regular,Extension=.otf]{Noto Sans Avestan}
newcommand{textavestan}[1]{bgrouptextdir TRTavestanfont #1egroup}
begin{document}
Test Avestan: textavestan{𐬰𐬀𐬭𐬀𐬚𐬎𐬱𐬙𐬭𐬀}
end{document}


and everything works. I would prefer a solution that doesn't rely on an outside tool (fontforge), but at least I have something that gets me a workable solution.



PS: If anyone can figure out a solution to this problem that does not require fontforge, I'll mark their answer as the "accepted" one.






share|improve this answer























  • Update: I still believe that this is a bug, and it is still present with TeXLive 2018. Emails to the package maintainers have gone unanswered. The selected workaround still works.
    – Squinky86
    May 15 at 2:58











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f425074%2ferrors-with-libttf-was-font-metric-data-not-found-or-bad%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













This appears to be a bug with fontspec and/or luatex; however, I do have a workaround for anyone running into a similar problem.



Problem: fontspec/luatex is unable to read the .ttf file.



Solution: Convert the .ttf file to a valid .otf file, and luatex will be able to see it.



Using fontforge, I scripted the failing fonts as follows:



fontforge -lang=ff -c 'Open($1); Generate($2)' NotoSansAvestan-Regular.ttf NotoSansAvestan-Regular.otf


then changed the mwe to:



documentclass[a4paper]{article}
usepackage{fontspec}
usepackage[english]{babel}
newfontfamilyavestanfont[Path=fonts/,UprightFont=*-Regular,Extension=.otf]{Noto Sans Avestan}
newcommand{textavestan}[1]{bgrouptextdir TRTavestanfont #1egroup}
begin{document}
Test Avestan: textavestan{𐬰𐬀𐬭𐬀𐬚𐬎𐬱𐬙𐬭𐬀}
end{document}


and everything works. I would prefer a solution that doesn't rely on an outside tool (fontforge), but at least I have something that gets me a workable solution.



PS: If anyone can figure out a solution to this problem that does not require fontforge, I'll mark their answer as the "accepted" one.






share|improve this answer























  • Update: I still believe that this is a bug, and it is still present with TeXLive 2018. Emails to the package maintainers have gone unanswered. The selected workaround still works.
    – Squinky86
    May 15 at 2:58















up vote
0
down vote













This appears to be a bug with fontspec and/or luatex; however, I do have a workaround for anyone running into a similar problem.



Problem: fontspec/luatex is unable to read the .ttf file.



Solution: Convert the .ttf file to a valid .otf file, and luatex will be able to see it.



Using fontforge, I scripted the failing fonts as follows:



fontforge -lang=ff -c 'Open($1); Generate($2)' NotoSansAvestan-Regular.ttf NotoSansAvestan-Regular.otf


then changed the mwe to:



documentclass[a4paper]{article}
usepackage{fontspec}
usepackage[english]{babel}
newfontfamilyavestanfont[Path=fonts/,UprightFont=*-Regular,Extension=.otf]{Noto Sans Avestan}
newcommand{textavestan}[1]{bgrouptextdir TRTavestanfont #1egroup}
begin{document}
Test Avestan: textavestan{𐬰𐬀𐬭𐬀𐬚𐬎𐬱𐬙𐬭𐬀}
end{document}


and everything works. I would prefer a solution that doesn't rely on an outside tool (fontforge), but at least I have something that gets me a workable solution.



PS: If anyone can figure out a solution to this problem that does not require fontforge, I'll mark their answer as the "accepted" one.






share|improve this answer























  • Update: I still believe that this is a bug, and it is still present with TeXLive 2018. Emails to the package maintainers have gone unanswered. The selected workaround still works.
    – Squinky86
    May 15 at 2:58













up vote
0
down vote










up vote
0
down vote









This appears to be a bug with fontspec and/or luatex; however, I do have a workaround for anyone running into a similar problem.



Problem: fontspec/luatex is unable to read the .ttf file.



Solution: Convert the .ttf file to a valid .otf file, and luatex will be able to see it.



Using fontforge, I scripted the failing fonts as follows:



fontforge -lang=ff -c 'Open($1); Generate($2)' NotoSansAvestan-Regular.ttf NotoSansAvestan-Regular.otf


then changed the mwe to:



documentclass[a4paper]{article}
usepackage{fontspec}
usepackage[english]{babel}
newfontfamilyavestanfont[Path=fonts/,UprightFont=*-Regular,Extension=.otf]{Noto Sans Avestan}
newcommand{textavestan}[1]{bgrouptextdir TRTavestanfont #1egroup}
begin{document}
Test Avestan: textavestan{𐬰𐬀𐬭𐬀𐬚𐬎𐬱𐬙𐬭𐬀}
end{document}


and everything works. I would prefer a solution that doesn't rely on an outside tool (fontforge), but at least I have something that gets me a workable solution.



PS: If anyone can figure out a solution to this problem that does not require fontforge, I'll mark their answer as the "accepted" one.






share|improve this answer














This appears to be a bug with fontspec and/or luatex; however, I do have a workaround for anyone running into a similar problem.



Problem: fontspec/luatex is unable to read the .ttf file.



Solution: Convert the .ttf file to a valid .otf file, and luatex will be able to see it.



Using fontforge, I scripted the failing fonts as follows:



fontforge -lang=ff -c 'Open($1); Generate($2)' NotoSansAvestan-Regular.ttf NotoSansAvestan-Regular.otf


then changed the mwe to:



documentclass[a4paper]{article}
usepackage{fontspec}
usepackage[english]{babel}
newfontfamilyavestanfont[Path=fonts/,UprightFont=*-Regular,Extension=.otf]{Noto Sans Avestan}
newcommand{textavestan}[1]{bgrouptextdir TRTavestanfont #1egroup}
begin{document}
Test Avestan: textavestan{𐬰𐬀𐬭𐬀𐬚𐬎𐬱𐬙𐬭𐬀}
end{document}


and everything works. I would prefer a solution that doesn't rely on an outside tool (fontforge), but at least I have something that gets me a workable solution.



PS: If anyone can figure out a solution to this problem that does not require fontforge, I'll mark their answer as the "accepted" one.







share|improve this answer














share|improve this answer



share|improve this answer








edited Apr 9 at 17:27

























answered Apr 6 at 16:39









Squinky86

62




62












  • Update: I still believe that this is a bug, and it is still present with TeXLive 2018. Emails to the package maintainers have gone unanswered. The selected workaround still works.
    – Squinky86
    May 15 at 2:58


















  • Update: I still believe that this is a bug, and it is still present with TeXLive 2018. Emails to the package maintainers have gone unanswered. The selected workaround still works.
    – Squinky86
    May 15 at 2:58
















Update: I still believe that this is a bug, and it is still present with TeXLive 2018. Emails to the package maintainers have gone unanswered. The selected workaround still works.
– Squinky86
May 15 at 2:58




Update: I still believe that this is a bug, and it is still present with TeXLive 2018. Emails to the package maintainers have gone unanswered. The selected workaround still works.
– Squinky86
May 15 at 2:58


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f425074%2ferrors-with-libttf-was-font-metric-data-not-found-or-bad%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Lallio

Unable to find Lightning Node

Futebolista