1

I feel exhausted and frustrated from trying to use some of the fonts from: https://tug.org/FontCatalogue/ , e.g. Calligraphical and Handwritten Fonts, Other (mostly decorative) Fonts, etc. I have tried many of the comments/suggestions from tex.stackexchange.com and I still fail :-(. I have carefully examined the log files but nothing I saw in them was the "key" to solving the problems associated with the LaTeX code. I have been using LaTeX for over 40 years and thought I could find at least one possible solution; but, now I must stop working on this.

Please, I beg of you, take a close look at why there are so many font problems being reported with miktex 22, 23 and see if there is a fix that really works.

I am using miktex 4.9 console in the administrator mode. I have reinstalled miktex at least 7 times by now -- still font problems. The following is taken from the System Report.txt file generated by TeXstudio 4.5.1 (git 4.5.1) Using Qt Version 6.4.2, compiled with Qt 6.4.2 RTeXstudio (4.5.1):

dpi: 96 where pdflatex: C:\Program Files\MiKTeX\miktex\bin\x64\pdflatex.exe

PDFLATEX: pdflatex.exe -version MiKTeX-pdfTeX 4.14 (MiKTeX 23.1)

I will prepare an example that should be helpful in finding the problems associated with "special" fonts in TeXstudio.

How can I upload the tex file for this example to be prepared?

3
  • 7
    every font that says "open type or ttf only" is only for xelatex/luatex. If the description mention only type1 fonts it is for pdflatex. I have no idea what miktex 4.9. should be, my miktex has version 23.1 (and its pdftex has version 4.14). If you want help, you should show a complete, small example what you are trying and the log-file of the compilation. Apr 14, 2023 at 12:08
  • The best practice in these case is usually to reinstall the MikTeX contribution. As Ulrike mentioned: there is no MikTeX version 4.9.x. So I suggest to visit the site of MikTeX and download a fresh distribution file.
    – alchemist
    Apr 14, 2023 at 14:08
  • I tried adding comment(s) but was never able to post it
    – Birdy
    Apr 16, 2023 at 13:11

2 Answers 2

2

I will take the wild guess that since you have been using TeX for 40 years, you are still trying to do things the ancient way.

Can you compile with lualatex? Yes, it's in MiKTeX. You text must be utf-8 encoded (I believe even Windows does that, nowadays). Your fonts must be *.otf or *.ttf but NOT the old Type 1 PostScript fonts. They do not need to come from TeX (even system fonts will work). Try this, compiled with lualatex:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Your Favorite Font} % Actual font name.
\begin{document}
Hello, World!
\end{document}

Now, some TeX fonts are not available as *.otf or *.ttf. In this case, you can use the FontForge program to import the existing font format, and convert it to *.otf (Open Type).

BIG EDIT: I can get Starburst to work. Do these things:

  1. Download the initials zip package directly from CTAN. Unzip it in your home directory (not within TeX).

  2. Install FontForge. Open file Starburst.pfb in FontForge.

  3. FontForge Menu Encoding > Reencode > Unicode (BMP).

  4. Edit > Select > Select All.

  5. Element > Correct Direction.

  6. Hints > Clear Hints.

  7. Element > Overlap > Remove Overlap.

  8. Element > Font Info > PS Private > New > BlueValues

  9. File > Generate Fonts > choose OpenType (CFF).

You will get a dialog box informing you that there are missing extrema, wrong direction, self-intersection. Ignore that, and generate the font. The messages are meaningful, but not worth fixing without expertise.

Then you will have Starburst.otf. It is an OpenType font.

In a place such as your TEXMFHOME directory, create fonts/opentype/initials and drop a copy of Starburst.otf in there. Then refresh the files (MiKTeX has a button to press, Linux uses command mktexlsr).

Do not \usepackage{initials} or starburst or anything of the sort. Instead, compile with lualatex, like this:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{EB Garamond} % or whatever
\newfontface\shazam{Starburst}
\begin{document}
{\shazam Hello World !}\par
And hello to Martians, too.\par
\end{document}

Result:

result

Ok @rallg, Your procedure for using FontForge, although rather complex, worked and the following Latex code worked with Texstudio and Texmaker :-).

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Lucida Sans} % or whatever
\newfontface\shazam{Starburst-Regular}
\begin{document}
{\shazam Hello World !}\par
And hello to Martians, too.\par
\end{document}

I still can not understand how to add a comment on someone else's comment. Example, if I hit a CR (carriage return) for a new line, then my comment on their comment is posted -- this is not what should happen IMHO!

4
  • Your comments were very useful @rallg. Yes, I can compile with LuaLaTeX (Texmaker 5.1.3) and I used your short example with: \setmainfont{QTCaslan}, compiled with LuaLaTeX and this worked fine :-). However, when I tried the Starburst Regular fonts (Type 1) this failed with both LaTeX (Texstudio) and LuaLaTex (Texmaker). How can I get the latex code to you?
    – Birdy
    Apr 16, 2023 at 12:43
  • Thanks for the tip on FontForge
    – Birdy
    Apr 16, 2023 at 13:19
  • @Birdy See the "big edit" to my original answer. Detailed explanation of what works for me, and should work for you.
    – rallg
    Apr 16, 2023 at 20:16
  • @Birdy Happy to hear that it worked. Now, all those FontForge steps are not necessarily needed. In many cases, it is enough to open the *.pfb file, then immediately generate the Open Type CFF font. But I echoed the steps I took, out of force of habit.
    – rallg
    Apr 17, 2023 at 16:32
1

run in a terminal the command luafindfont and you'll get the complete list of fonts which can be used by the different latex engines. Fonts in the directory .../opentype/. or .../truetype/ or in a system directory can only be used with lualatex/xelatex and all other by pdflatex :

bash-5.2$ luafindfont -n "*"
  No.                                            Filename                                                                                   Path
   1.                                Aboensis-Regular.otf                     /usr/local/texlive/2022/texmf-dist/fonts/opentype/public/aboensis/
   2.                                     academicons.ttf                  /usr/local/texlive/2022/texmf-dist/fonts/truetype/public/academicons/
   3.                      Academy Engraved LET Fonts.ttf                                                    /System/Library/Fonts/Supplemental/
   4.                                 ACaslonPro-Bold.otf                                                      /Users/voss/Library/Fonts/Caslon/
   5.                           ACaslonPro-BoldItalic.otf                                                      /Users/voss/Library/Fonts/Caslon/
   6.                               ACaslonPro-Italic.otf                                                      /Users/voss/Library/Fonts/Caslon/
   ....
   ....
6644.            ヒラギノ角ゴシック W9.ttc                                                                 /System/Library/Fonts/
6645.            ヒラギノ角ゴシック W9.ttc                                                                 /System/Library/Fonts/
6646.                                      儷宋_Pro.ttf                                                   /Users/voss/Library/Fonts/KozukaPro/
6647.                                    华文仿宋.ttf                                                   /Users/voss/Library/Fonts/KozukaPro/
6648.                                    华文楷体.ttf                                                   /Users/voss/Library/Fonts/KozukaPro/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .