ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* bold and nonbold math
@ 2009-08-18 15:18 Hans van der Meer
  2009-08-18 16:50 ` Wolfgang Schuster
  2009-08-19  7:15 ` Hans Hagen
  0 siblings, 2 replies; 4+ messages in thread
From: Hans van der Meer @ 2009-08-18 15:18 UTC (permalink / raw)
  To: NTG ConTeXt


[-- Attachment #1.1: Type: text/plain, Size: 1566 bytes --]

Working on typescripts for Y&Y's LucidaBright (which are type1 fonts)  
for MKIV (hoping to maintain compatibilty with MKII), the following  
code produces all math in bold, even the first x+y.
   \usetypescript[luc]\setupbodyfont[luci]\starttext $x+y$ -- $\bfmath  
x+y$ \stoptext

I studied the new manual chapter on typescripts as well as have worked  
in analogy with existent typescripts in the current ConTeXt base. I  
certainly am missing an important clue here.

The relevant portions of the typescript are:

\starttypescriptcollection[luci]

\starttypescript [luci]
   \definetypeface [luci][mm][math][lucibr][default]
   \definetypeface [luci][mm][bfmath][lucibr][default] % removal  
prints nonbold math only
\stoptypescript
...
% typescripts for text in serif, sans etc. omitted but contain:
   \definefontsynonym [LucidaBright][lbr.tfm][encoding=\typescriptthree]
   \definefontsynonym [LucidaBright-Demi][lbd.tfm][encoding= 
\typescriptthree]
...
\starttypescript [math] [lucibr] [name]
   \usemathcollection [lucibr]
   \definefontsynonym [MathRoman][LucidaBright] ... etc.
   \definebodyfont [default] [mm] [mr=MathRoman mo 1, ex=MathExtension  
mo 1, ... etc.]
   .. math font tfm definitions
\stoptypescript
\starttypescript [bfmath] [lucibr] [name]
   \usemathcollection [lucibr]
   \definefontsynonym [MathRomanBold] [LucidaBright-Demi] ... etc.
   \definebodyfont [default] [mm] [mrbf=MathRomanBold mo 1,  
exbf=MathExtensionBold mo 1, ... etc.]
   .. bold font tfm definitions
\stoptypescript

\stoptypescriptcollection

Hans van der Meer





[-- Attachment #1.2: Type: text/html, Size: 4833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bold and nonbold math
  2009-08-18 15:18 bold and nonbold math Hans van der Meer
@ 2009-08-18 16:50 ` Wolfgang Schuster
  2009-08-19 10:06   ` Hans van der Meer
  2009-08-19  7:15 ` Hans Hagen
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2009-08-18 16:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: type-lucida.tex --]
[-- Type: application/octet-stream, Size: 4681 bytes --]

%D \module
%D   [       file=type-lucida,
%D        version=2008.12.24,
%D          title=\CONTEXT\ Typescript Macros,
%D       subtitle=Lucida Collection,
%D         author=Wolfgang Schuster,
%D           date=\currentdate,
%D      copyright=Wolfgang Schuster]

\starttypescriptcollection [lucida]

\starttypescript [serif] [lucida]
  \setups[font:fallback:serif]
  \definefontsynonym [Serif]           [LucidaBright-Regular]
  \definefontsynonym [SerifBold]       [LucidaBright-Bold]
  \definefontsynonym [SerifItalic]     [LucidaBright-Italic]
  \definefontsynonym [SerifBoldItalic] [LucidaBright-BoldItalic]
  \definefontsynonym [SerifCaps]       [LucidaBright-Smallcaps]
\stoptypescript

\starttypescript [serif] [lucida]
  \definefontsynonym [LucidaBright-Regular]    [name:lucidabright]           [features=default]
  \definefontsynonym [LucidaBright-Bold]       [name:lucidabrightdemi]       [features=default]
  \definefontsynonym [LucidaBright-Italic]     [name:lucidabrightitalic]     [features=default]
  \definefontsynonym [LucidaBright-BoldItalic] [name:lucidabrightdemiitalic] [features=default]
  \definefontsynonym [LucidaBright-Smallcaps]  [name:lucidabrightsmallcaps]  [features=default]
\stoptypescript

\starttypescript [sans] [lucida]
  \setups[font:fallback:sans]
  \definefontsynonym [Sans]           [LucidaSans-Regular]
  \definefontsynonym [SansBold]       [LucidaSans-Bold]
  \definefontsynonym [SansItalic]     [LucidaSans-Italic]
  \definefontsynonym [SansBoldItalic] [LucidaSans-BoldItalic]
\stoptypescript

\starttypescript [sans] [lucida]
  \definefontsynonym [LucidaSans-Regular]    [name:lucidasans]           [features=default]
  \definefontsynonym [LucidaSans-Bold]       [name:lucidasansdemi]       [features=default]
  \definefontsynonym [LucidaSans-Italic]     [name:lucidasansitalic]     [features=default]
  \definefontsynonym [LucidaSans-BoldItalic] [name:lucidasansdemiitalic] [features=default]
\stoptypescript

\starttypescript [mono] [lucida]
  \setups[font:fallback:mono]
  \definefontsynonym [Mono]           [LucidaTypewriter-Regular]
  \definefontsynonym [MonoBold]       [LucidaTypewriter-Bold]
  \definefontsynonym [MonoItalic]     [LucidaTypewriter-Italic]
  \definefontsynonym [MonoBoldItalic] [LucidaTypewriter-BoldItalic]
\stoptypescript

\starttypescript [mono] [lucida]
  \definefontsynonym [LucidaTypewriter-Regular]    [name:lucidatypewriter]            [features=default]
  \definefontsynonym [LucidaTypewriter-Bold]       [name:lucidatypewriterbold]        [features=default]
  \definefontsynonym [LucidaTypewriter-Italic]     [name:lucidatypewriteroblique]     [features=default]
  \definefontsynonym [LucidaTypewriter-BoldItalic] [name:lucidatypewriterboldoblique] [features=default]
\stoptypescript

\starttypescript [mono] [lucida]
  \setups[font:fallback:mono]
  \definefontsynonym [Mono]           [LucidaSansTypewriter-Regular]
  \definefontsynonym [MonoBold]       [LucidaSansTypewriter-Bold]
  \definefontsynonym [MonoItalic]     [LucidaSansTypewriter-Italic]
  \definefontsynonym [MonoBoldItalic] [LucidaSansTypewriter-BoldItalic]
\stoptypescript

\starttypescript [mono] [lucida]
  \definefontsynonym [LucidaSansTypewriter-Regular]    [name:lucidasanstypewriter]            [features=default]
  \definefontsynonym [LucidaSansTypewriter-Bold]       [name:lucidasanstypewriterbold]        [features=default]
  \definefontsynonym [LucidaSansTypewriter-Italic]     [name:lucidasanstypewriteroblique]     [features=default]
  \definefontsynonym [LucidaSansTypewriter-BoldItalic] [name:lucidasanstypewriterboldoblique] [features=default]
\stoptypescript

\starttypescript [handwriting] [lucida]
  \definefontsynonym [Handwriting] [LucidaHandwriting-Italic]
\stoptypescript

\starttypescript [handwriting] [lucida]
  \definefontsynonym [LucidaHandwriting-Italic] [name:lucidahandwritingitalic] [features=default]
\stoptypescript

\starttypescript [calligraphy] [lucida]
  \definefontsynonym [Calligraphy] [LucidaCalligraphy-Italic]
\stoptypescript

\starttypescript [calligraphy] [lucida]
  \definefontsynonym [LucidaCalligraphy-Italic] [name:lucidacalligraphyitalic] [features=default]
\stoptypescript

\starttypescript [lucida]
    \definetypeface [lucida] [rm] [serif]       [lucida] [default]
    \definetypeface [lucida] [ss] [sans]        [lucida] [default]
    \definetypeface [lucida] [tt] [mono]        [lucida] [default]
    \definetypeface [lucida] [mm] [math]        [lucida] [default]
    \definetypeface [lucida] [hw] [handwriting] [lucida] [default]
    \definetypeface [lucida] [cg] [calligraphy] [lucida] [default]
    \quittypescriptscanning
\stoptypescript

\stoptypescriptcollection

\endinput

[-- Attachment #2: Type: text/plain, Size: 325 bytes --]


Am 18.08.2009 um 17:18 schrieb Hans van der Meer:

> Working on typescripts for Y&Y's LucidaBright (which are type1  
> fonts) for MKIV (hoping to maintain compatibilty with MKII), the  
> following code produces all math in bold, even the first x+y.

You can use mine as start, math is defined in type-otf.mkiv.

Wolfgang


[-- Attachment #3: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bold and nonbold math
  2009-08-18 15:18 bold and nonbold math Hans van der Meer
  2009-08-18 16:50 ` Wolfgang Schuster
@ 2009-08-19  7:15 ` Hans Hagen
  1 sibling, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2009-08-19  7:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hans van der Meer wrote:
> Working on typescripts for Y&Y's LucidaBright (which are type1 fonts) 
> for MKIV (hoping to maintain compatibilty with MKII), the following code 
> produces all math in bold, even the first x+y.
>   \usetypescript[luc]\setupbodyfont[luci]\starttext $x+y$ -- $\bfmath 
> x+y$ \stoptext
> 
> I studied the new manual chapter on typescripts as well as have worked 
> in analogy with existent typescripts in the current ConTeXt base. I 
> certainly am missing an important clue here.

the most important clue is that mkii and mkiv are different

(1) instead of many families we only use two, see type-siz.mkiv, where 
you can find lines like:

   \definebodyfont [12pt] [mm] [mr=LMMathRoman12-Regular sa 1, 
mb=LMMathRoman12-Bold sa 1]

(2) there is a distinction between bold alphabets (see unicode math) and 
a complete switch to bold; so, \bf cum suis deal with alphabets, while 
\mb switches to the bold math family

(3) we use either opentype math fonts or virtual ones, i.e. if you use 
lucida, which is traditional, we need an entry in math-vfu.lua, and in 
the beta that is the case (but not for bold)

(4) no math vectors are used in mkiv, only unicode

(5) as loading and switching comes a price, we need to enable it with
\enableboldmath before loading fonts

so, although most things on the outside are the same in mkii/mkiv there 
are some fundamental differences

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bold and nonbold math
  2009-08-18 16:50 ` Wolfgang Schuster
@ 2009-08-19 10:06   ` Hans van der Meer
  0 siblings, 0 replies; 4+ messages in thread
From: Hans van der Meer @ 2009-08-19 10:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1560 bytes --]

I examined the typescript given and started to apply it. I get however  
a strange error in that a font is not found.
I replaced my line:
   \definefontsynonym [LucidaCalligraphy-Italic]	[file:lbc.tfm]
with the given:
   \definefontsynonym [LucidaCalligraphy-Italic] 
[name:lucidahandwritingitalic][features=default]

The font search then comes in the afm-directory, as proved by the log  
(in part):
fontnames | identifying tree font files with suffix afm
fontnames | error when identifying afm font /Users/hans/TeX/context/ 
beta/tex/texmf-local/fonts/afm/yandy/lucida/lbmitex.afm: no matching  
pfb file
fontnames | error when identifying afm font /Users/hans/TeX/context/ 
beta/tex/texmf-local/fonts/afm/yandy/lucida/lbmrtex.afm: no matching  
pfb file
...
(these being math font files)

The needed lbc.afm contains:
...
Comment UniqueID 5029013
Comment MS-WindowsName LucidaCalligraphy
Comment MacIntoshName LucidaCalligraphy
FontName LucidaCalligraphy-Italic
FullName Lucida Calligraphy Italic
FamilyName LucidaCalligraphy
Weight Normal
...

Any reason why it is not found on the font search through the [name:]  
scheme?

On 18 aug 2009, at 18:50, Wolfgang Schuster wrote:

> <type-lucida.tex>
> Am 18.08.2009 um 17:18 schrieb Hans van der Meer:
>
>> Working on typescripts for Y&Y's LucidaBright (which are type1  
>> fonts) for MKIV (hoping to maintain compatibilty with MKII), the  
>> following code produces all math in bold, even the first x+y.
>
> You can use mine as start, math is defined in type-otf.mkiv.
>
> Wolfgang


Hans van der Meer





[-- Attachment #1.2: Type: text/html, Size: 4883 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-08-19 10:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-18 15:18 bold and nonbold math Hans van der Meer
2009-08-18 16:50 ` Wolfgang Schuster
2009-08-19 10:06   ` Hans van der Meer
2009-08-19  7:15 ` Hans Hagen

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).