0

I'm trying to use a font that I downloaded from a website's source as a .woff2 file that was then converted to a .ttf file using this site. The font, "Harding Text Web" from the journal Nature, includes latin, greek, and math symbols in the regular, italic, bold, and bold italic versions of it as verified with FontForge. Here's some basic code that doesn't cause the error but puts the math into Computer Modern while the "Hi lol" is in Harding:

\documentclass[12pt]{article}

\usepackage{mathspec} \setmainfont{Harding Text Web} \setmathfont{Harding Text Web}

\begin{document}

Hi lol $1234 \int \pm$

\end{document}

I've tried both \usepackage{unicode-math} and \usepackage{mathastext} and neither solve the issue. Including \usepackage{mathastext} allows me to write letters and numbers in Harding while any Greek and math symbols are written in Computer Modern.

\documentclass[12pt]{article}

\usepackage{mathspec} \setmainfont{Harding Text Web} \usepackage{mathastext}

\begin{document}

Hi lol $1234 \int \pm$

\end{document}

While using \usepackage{unicode-math} as:

\documentclass[12pt]{article}

\usepackage{amsmath} \usepackage{fontspec} \setmainfont{Harding Text Web} \usepackage{unicode-math} \setmathfont{Harding Text Web}

\begin{document}

Hi lol $1234 \int \pm$

\end{document}

draws the errors:

Package fontspec Warning: Font "Harding Text Web" does not contain requested
(fontspec)                Script "Math".

Package fontspec Warning: OpenType feature 'Style=MathScript' (ssty) not (fontspec) available for font 'Harding Text Web' with script (fontspec) 'CustomDefault' and language 'Default'.

Package fontspec Warning: OpenType feature 'Style=MathScriptScript' (ssty) not (fontspec) available for font 'Harding Text Web' with script (fontspec) 'CustomDefault' and language 'Default'.

One thing I noticed in FontForge is that while the Unicode for symbols like an integral and plus-minus symbol are correct in the toolbar, they are listed as "U+????" when I hover my mouse over them and their Unicode char is defined as "-1" in the glyph info. Also, if I define the Greek like:

\Umathchardef\alpha="0 \symmtletterfont `α

it works, but I'd rather not have that many lines in my preamble just to define the Greek alphabet.

This seems to be an issue for this user, as well but I have not tried the solution, yet. If I define the

adamzr
  • 1
  • for unicode-math package it isn't enough to have the symbols, the font needs to have an opentype math table that has all the font parameters tex (and microsoft word etc) needs to typeset math, subscript positioning, stretchy delimiter constructions, spacing around relations etc – David Carlisle May 18 '21 at 06:53
  • Math symbols are not enough-many text fonts contain a number of math symbols. A real math font must also contain a math table. – Ulrike Fischer May 18 '21 at 06:53
  • 1
    In addition to the other comments, you are most likely not allowed to use the font like this anyway. The only version of "Harding Text Web" I'm aware of contains the explicit statement "Not to be used for anything other than web font use!" and even web font use is only permitted if you have a valid license. – Marcel Krüger May 18 '21 at 11:15
  • @MarcelKrüger even if this is just for personal use? I primarily just like the font and plan to use it for things like class/group handouts – adamzr May 18 '21 at 14:27
  • 2
    @adamzr IANAL, but the license of the font does not seem to allow personal use. Even if it did, I wouldn't be sure that class/group handouts even count as personal use. – Marcel Krüger May 18 '21 at 16:21

0 Answers0