2

I'm trying out Context and have hit a bump. I need to create a macro which inserts a symbol from another font at a different size in the running text. I'm done this in XeLaTeX before but I'm having trouble doing this in Context.

The following is my MWE (ConTeXt):

\definefont[sakkal][name:Sakkal Majalla at 36pt]

\def\mySakkal{{\sakkal TEST}}

\starttext

This is normal text and this is \mySakkal{} which should be bigger.

\stoptext

The font does change but the font size does not. My ConTeXt version is 2016.05.17 19:20.

For reference, here is the MWE in in XeLaTeX:

\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{english}

\newfontfamily\sakkalfont[
Script=Arabic,%
Numbers=Proportional,%
Scale=2.0,%
]{Sakkal Majalla}

\newcommand{\mySakkal}{{\sakkalfont{TEST}}}

\begin{document}
This is regular text and this is \mySakkal{} which should be bigger.
\end{document}

The following is the results of both.

Output Results

5
  • 1
    Your example gives the expected result here with the latest context version (2016.11.04 20:50), the fontsize changes. Which version are you using? Btw, you can scale the font relative to its surrounding size with the syntax \definefont[sakkal][name:Sakkal Majalla sa 1.2] (I assume that's what you xelatex syntax does, though I am not sure).
    – Thomas
    Commented Nov 17, 2016 at 11:21
  • Thanks for the suggestions, I've updated the MWE to show both and also the output for each. My ConTeXt version is 2016.05.17 19:20. I'm using TeXLive 2016. Commented Nov 17, 2016 at 12:10
  • @KhalidHussain The ConTeXt releases don't necessarily make it into TeX Live: you are best grabbing their 'minimals' distribution
    – Joseph Wright
    Commented Nov 17, 2016 at 12:14
  • @JosephWright, whose 'minimals'? TeX Live or ConTeXt? I'm going to try updating TeX Live to see if that helps. Commented Nov 17, 2016 at 12:21
  • @KhalidHussain wiki.contextgarden.net/ConTeXt_Standalone As I said, ConTeXt releases don't necessarily go into TL (They don't go to CTAN).
    – Joseph Wright
    Commented Nov 17, 2016 at 12:22

2 Answers 2

2

I tested your example with ConTeXt from texlive, and I get the expected output again. Are you sure ConTeXt finds your font file?Here is my output, with indication of the version used (I use the file syntax for specifying the font instead of name because I didn't want to install it, but that shouldn't make any difference):

enter image description here

1
  • Just tried out your method. Yes it works if I use file instead of name. I copied the font out of the Fonts folder and tested it. That's weird. Commented Nov 17, 2016 at 13:20
2

The devil is in the details.

After spending mobile bandwidth downloading the latest ConTeXt and just barely getting it running, I was met with the same problem.

The space in the middle of the font name was causing the problem.

The following works perfectly:

\definefont[sakkal][name:SakkalMajalla at 36pt]

\def\mySakkal{{\sakkal TEST}}

\starttext

This is normal text and this is \mySakkal{} which should be bigger.

\stoptext

You must log in to answer this question.

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