ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Joshua Krämer" <joshua.kraemer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: ntg-context-wvrSQK3plZs@public.gmane.org
Subject: Re: Mixing math and text font
Date: Thu, 9 Jan 2014 22:30:49 +0100	[thread overview]
Message-ID: <20140109223049.0c0b89f9@Klapprechner1.site> (raw)
In-Reply-To: <3D8BAFF0-5C1A-434C-91A0-D90A99B019BE@gmail.com>

Am Thu, 9 Jan 2014 20:41:15 +0100
schrieb Wolfgang Schuster <schuster.wolfgang@gmail.com>:

> > (3) I have a typeface that uses unusual style names: "roman1",
> > "roman2", "italic1", "italic2";  1 is regular, 2 is bold weight.
> > The following works:
> > 
> > \definefontfamily[xxxface][serif][xxx][regularfont=xxxroman1, 
> > italicfont=xxxitalic1, boldfont=xxxroman2]
> > \setupbodyfont[xxxface]
> > \starttext
> > abc {\it abc} {\bf abc}
> > \stoptext
> > 
> > This works for roman1 only:
> > 
> > \definefontfamily[xxxface][serif][xxx][regularfont=spec:roman1, 
> > italicfont=spec:italic1, boldfont=spec:roman2]
> > 
> > Even this works for roman1 only:
> > 
> > \definefontfamily[xxxface][serif][xxx][regularfont=spec:roman1, 
> > italicfont=xxxitalic1, boldfont=xxxroman2]
> 
> The name of the font files has nothing to do with way how
> \definefontfamily collects the individual files for each style, to do
> this it uses internal names and values from the font.

I've got the values from the output of "mtxrun --script fonts --list
--all --pattern=xxx" (and compared with the name/style values in
Fontforge), so I don't understand why "spec:roman1" works, but
"spec:italic1" doesn't.

Additionally, what I think must be a bug is that
"italicfont=file:xxxitalic1, boldfont=file:xxxroman2" works but stops
working if I add "regularfont=spec:roman1":

\definefontfamily[xxxface][serif][xxx][regularfont=spec:roman1,
italicfont=file:xxxitalic1, boldfont=file:xxxroman2]

Maybe if one of the values uses the "spec:" selector, all the values
are treated as spec values despite the "file:" selector given?


> When you use a opentype math font the upright, italic, bold etc.
> characters are all in the same file which uses only the regular style
> (a few math fonts provide also a bold style which can be useful in
> headings).
> 
> Because there is only a upright math font you have to set a fallbacks
> also for the upright style even when the font you’re using is italic,
> e.g.
> 
> \definefallbackfamily[xxxface][math][xxx][tf=file:xxxitalic1,preset=math:lowercaseitalic]

Thanks, this works.  For some reason, "tf=" works, but "regularfont="
doesn't.

And by the way, this works:
\definefontfamily[leitura][serif][Leitura News][regularfont=spec:roman2]

and this doesn't work:
\definefontfamily[leitura][serif][Leitura News][tf=spec:roman2]

So in some cases only "regularfont" seems to work, and in some cases
only "tf".

Kind regards,
Joshua


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2014-01-09 21:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-04 15:04 Joshua Krämer
2014-01-04 16:44 ` Wolfgang Schuster
2014-01-04 17:22   ` Joshua Krämer
2014-01-04 18:50     ` Wolfgang Schuster
2014-01-08 10:52       ` Joshua Krämer
2014-01-08 19:39         ` Wolfgang Schuster
2014-01-09 11:01           ` Joshua Krämer
2014-01-09 11:14             ` Joshua Krämer
2014-01-09 19:41             ` Wolfgang Schuster
2014-01-09 21:30               ` Joshua Krämer [this message]
2014-01-09 21:41                 ` Wolfgang Schuster
2014-01-09 22:12                   ` Joshua Krämer
2014-01-09 22:11                     ` Wolfgang Schuster
2014-01-04 17:47 ` Aditya Mahajan
2014-01-04 18:11   ` Joshua Krämer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140109223049.0c0b89f9@Klapprechner1.site \
    --to=joshua.kraemer-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=ntg-context-wvrSQK3plZs@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).