ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Florian Wobbe <Florian.Wobbe@awi.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Math and bold font
Date: Sun, 05 Dec 2010 18:34:34 +0100	[thread overview]
Message-ID: <1E09188B-E8D3-46C5-BDA0-0DBA1E6C29F8@awi.de> (raw)
In-Reply-To: <op.vm8ue9we0g5ws1@lk-2008-nbk>

[-- Attachment #1: Type: text/plain, Size: 3029 bytes --]

On Dec 5, 2010, at 14:58 , Procházka Lukáš wrote:

> Hello,
> 
> thanks for the explanation -
> 
> On Sat, 04 Dec 2010 09:55:25 +0100, Hans Hagen <pragma@wxs.nl> wrote:
> 
>> On 3-12-2010 5:00, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
>>> 
>>> to get slanted chars, I have to call \it or \sl or \bi explicitly. OK, I
>> 
>> In fact in math these are not font switches, but switches to a different
>> alphabet.  In traditional tex that normally is a font switch so one gets
>> the other bold or whatever shapes for free, given that they are in that
>> font (so it's a side effect of the way math alphabets are implemented),
>> but not so in open type math.
>> 
>> there is no default math font in mkiv: one uses regular math or bold
>> math (given that there are two font(set)s available which is seldom the
>> case) and within them gets bold or heavy alphabets (plus a few chars)
> 
> - So does it mean that the Vladimir's "cambria case" is exactly the seldom case when regular and bold math are available, both defining Greek chars like \alpha as well?
> 
>>>> \setupbodyfont[cambria]
>>>> 
>>>> \starttext
>>>> This is a test.
>>>> $a=\alpha$
>>>> $\bf a=\alpha$
>>>> $\bi a=\alpha$
>>>> \stoptext
> 
> Please, could you give more examples of normal and bold math fonts "of the same kin" (to be used for normal and bold math), both having Greek letters as well?

Hi,

this does not work with cambria math:

$\bf a=\alpha$
$\bi a=\alpha$

You should get the unicode math set of cambria math this way:

bold math: $\fontchar{u1D41A}=\fontchar{u1D6C2}$
bold italic math: $\fontchar{u1D482}=\fontchar{u1D736}$

I wonder if there are shorthand macros for accessing the unicode math slots for script, bold, sans, etc.

Really strange things happen though (see attachment):

% tested with all three:
%\setupbodyfont[cambria]
%\setupbodyfont[asana]
\setupbodyfont[xits]

\startTEXpage[offset=1ex]

This fails:
$a=\alpha$
$\fontchar{u1D41A}=\fontchar{u1D6C2}$
$\fontchar{u1D482}=\fontchar{u1D736}$

However, this is OK (unicode inserted directly): $𝐚𝒂$

{\tfx
This is small but the math remains unscaled and displays questionmarks:
$a=\alpha$
$\fontchar{u1D41A}=\fontchar{u1D6C2}$
$\fontchar{u1D482}=\fontchar{u1D736}$
}

{\tfa
This is big and math font is also big and displays correctly:
$a=\alpha$
$\fontchar{u1D41A}=\fontchar{u1D6C2}$
$\fontchar{u1D482}=\fontchar{u1D736}$
}

{\tfa\tfx
This is normal (\type{\tfa\tfx}!) but the math remains big and displays ok:
$a=\alpha$
$\fontchar{u1D41A}=\fontchar{u1D6C2}$
$\fontchar{u1D482}=\fontchar{u1D736}$
}

\stopTEXpage


> - Vladimir showed "cambria". Unfortunately, his solution changes the entire document bodyfont (i.e. non-math font as well).

You could of cause create your own font (e.g. pagella with cambria math):

\starttypescript [pagella]
  \definetypeface [\typescriptone] [mm] [math] [cambria] [default]
\stoptypescript

\setupbodyfont[pagella]

Florian


[-- Attachment #2: unicode-math-xits.pdf --]
[-- Type: application/pdf, Size: 14120 bytes --]

[-- Attachment #3: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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:[~2010-12-05 17:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-03  7:51 Procházka Lukáš Ing. - Pontex s. r. o.
2010-12-03 15:30 ` Vladimir Lomov
2010-12-03 16:00   ` Procházka Lukáš Ing. - Pontex s. r. o.
2010-12-04  8:55     ` Hans Hagen
2010-12-05 13:58       ` Procházka Lukáš
2010-12-05 17:34         ` Florian Wobbe [this message]
2010-12-05 19:27           ` Math and bold font: \definetypeface Procházka Lukáš
2010-12-05 21:48             ` Florian Wobbe
2010-12-06 14:37               ` Procházka Lukáš Ing. - Pontex s. r. o.
2010-12-08 10:24                 ` Florian Wobbe
2010-12-10 13:25                   ` Procházka Lukáš Ing. - Pontex s. r. o.
2010-12-06 10:11       ` Math and bold font Vladimir Lomov
2010-12-06 16:55         ` Procházka Lukáš Ing. - Pontex s. r. o.
     [not found]       ` <op.vm8ptgm00g5ws1@lk-2008-nbk>
2010-12-06 14:27         ` Hans Hagen

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=1E09188B-E8D3-46C5-BDA0-0DBA1E6C29F8@awi.de \
    --to=florian.wobbe@awi.de \
    --cc=ntg-context@ntg.nl \
    /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).