0

I installed a font from .ttf via LuaTeX (mtxrun --script font --reload) but I am not able to use it in title with my own size.

I have this:

\definefontfamily[Signika][ss][signika]

and I am trying to set this font to title:

\setuphead[section][style=Signika]

This works, but I want to change the size. I found out I can do that with \switchtobodyfont:

\setuphead[section][style={\switchtobodyfont[Signika,18pt]}

But that does not work... Font and font size simply does not change.

When I try defining font like:

\definefont[myfont][Signika at 18pt]

It outputs this:

fonts           > defining > unknown font 'Signika', loading aborted
fonts           > defining > unable to define 'Signika' as 'myfont--0'
fonts           > defining > font with asked name 'Signika' is not found using lookup 'file'

Can I somehow set font size for title?

6
  • 4
    You have to create a minimal example for your problem. – Wolfgang Schuster Nov 12 '19 at 18:00
  • I somehow edited post to be more specific. – skuroedov Nov 12 '19 at 21:05
  • Do you get usefull information with mtxrun --script fonts --list --all signika. – Wolfgang Schuster Nov 12 '19 at 21:10
  • I have managed this problem, thank you. – skuroedov Nov 12 '19 at 21:14
  • This doesn't explain why \switchtobodyfont doesn't work where you forgot in the example the right bracket (]) for the second argument of \setuphead. – Wolfgang Schuster Nov 12 '19 at 21:27
1

I just have realised that \definefont requires fontname of font not identifier neither familyname.

You can find this information running mtxrun --script fonts --list --pattern=signika. Instead of signika select name of your font.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.