Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve fonts auto installation #267

Closed
cderv opened this issue Jan 18, 2021 · 0 comments · Fixed by #268
Closed

Improve fonts auto installation #267

cderv opened this issue Jan 18, 2021 · 0 comments · Fixed by #268

Comments

@cderv
Copy link
Contributor

cderv commented Jan 18, 2021

I think we need to see how to improve the font installation.
We have several ways to detect missing font but it is still not enough to have theme auto install.

For example, see rstudio/rticles#362 (comment):

  • We correctly get in the log : ! Package fontspec Error: The font "Caladea" cannot be found.
  • We correctly have the missfont.log analyzed and Caladea[.](tfm|afm|mf|otf) is found (with mktextfm that i believe we should not catch 🤔 )
  • However, the files are not found after command tlmgr search --file --global "/Caladea[.](tfm|afm|mf|otf)" because the files we look for are for examples Caladea-Bold-tlf-ot1.tfm or Caladea-Italic-tlf-t1.tfm

If we use a more generic regex, we found the package,

tlmgr_search("/Caladea.*[.](tfm|afm|mf|otf)", stdout = TRUE, .quiet = FALSE)
tlmgr search --file --global "/Caladea.*[.](tfm|afm|mf|otf)"
 [1] "tlmgr.pl: package repository http://ctan.math.washington.edu/tex-archive/systems/texlive/tlnet (verified)"
 [2] "caladea:"                                                                                                 
 [3] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-Bold-tlf-ly1--base.tfm"                                      
 [4] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-Bold-tlf-ly1.tfm"                                            
 [5] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-Bold-tlf-ot1.tfm"                                            
 [6] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-Bold-tlf-t1--base.tfm"                                       
 [7] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-Bold-tlf-t1.tfm"                                             
 [8] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-Bold-tlf-ts1--base.tfm"                                      
 [9] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-Bold-tlf-ts1.tfm"                                            
[10] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-BoldItalic-tlf-ly1--base.tfm"                                
[11] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-BoldItalic-tlf-ly1.tfm"                                      
[12] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-BoldItalic-tlf-ot1.tfm"                                      
[13] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-BoldItalic-tlf-t1--base.tfm"                                 
[14] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-BoldItalic-tlf-t1.tfm"                                       
[15] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-BoldItalic-tlf-ts1--base.tfm"                                
[16] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-BoldItalic-tlf-ts1.tfm"                                      
[17] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-Italic-tlf-ly1--base.tfm"                                    
[18] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-Italic-tlf-ly1.tfm"                                          
[19] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-Italic-tlf-ot1.tfm"                                          
[20] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-Italic-tlf-t1--base.tfm"                                     
[21] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-Italic-tlf-t1.tfm"                                           
[22] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-Italic-tlf-ts1--base.tfm"                                    
[23] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-Italic-tlf-ts1.tfm"                                          
[24] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-Regular-tlf-ly1--base.tfm"                                   
[25] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-Regular-tlf-ly1.tfm"                                         
[26] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-Regular-tlf-ot1.tfm"                                         
[27] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-Regular-tlf-t1--base.tfm"                                    
[28] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-Regular-tlf-t1.tfm"                                          
[29] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-Regular-tlf-ts1--base.tfm"                                   
[30] "\ttexmf-dist/fonts/tfm/huerta/caladea/Caladea-Regular-tlf-ts1.tfm"                              

So maybe only changing the regex will help.
Or we need something more clever/ 🤔

yihui pushed a commit that referenced this issue Jan 20, 2021
…a', we should also try to find Caladea-(Bold|Italic|Regular) (#268)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant