ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Wolfgang Schuster" <schuster.wolfgang@googlemail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: Losing my patience with (understanding) ConTeXt/LuaTeX's font handling... [ re: Whacko font behaviour ? ( Or Am I ? :O) ]
Date: Fri, 18 Jul 2008 17:12:56 +0200	[thread overview]
Message-ID: <115224fb0807180812gf2c8055pc48cfee1d1253555@mail.gmail.com> (raw)
In-Reply-To: <326847810807170800nd6a634cyb0a0b62d00305be2@mail.gmail.com>

On Thu, Jul 17, 2008 at 5:00 PM, Alan Stone
<software.list.1es9s@gmail.com> wrote:
> Thanks Wolfgang.
>
>> calm down.
>
> Done.
>
> I've let some steam off earlier on.    OoOo<:O)
>
>>\setuphead[chapter][style=\
>>
>> >myHeadingsFont\myChapterFont]
>> >
>> >You have to load 'myHeadingsfont' typescript before you can use
>> >them because they are not available on outer level, only fonts used
>> >as bodyfont can be accesed without this selection.
>
> That works indeed.
>
>>I found the information to solve your problem in the fonts manual and
>>you should read it if you need more information.
>
> Oh, the number of times I read it. One more time a moment ago.
>
> Sooo... the Da Fonti Code is hidden in there. In which section of the manual
> did you find the clue ?

I found at page 9 and 9 what I needed.

> In my quest to further understand how this stuff works, I've been testing
> the following...
>
> \setuppapersize [A4][A4]
>
> \starttypescript [serif] [mySerifFont]
>     \definefontsynonym [mySerifFontRegular] [name:Times New Roman]
> [features=default]
>     \definefontsynonym [mySerifFontItalic] [name:Times New Roman Italic]
> [features=default]
>     \definefontsynonym [mySerifFontBold] [name:Times New Roman Bold]
> [features=default]
>     \definefontsynonym [mySerifFontBoldItalic] [name:Times New Roman Bold
> Italic] [features=default]
> \stoptypescript
> \starttypescript [serif] [mySerifFont]
>     \setups[font:fallback:serif]
>     \definefontsynonym [Serif] [mySerifFontRegular]
>     \definefontsynonym [SerifItalic] [mySerifFontItalic]
>     \definefontsynonym [SerifBold] [mySerifFontBold]
>     \definefontsynonym [SerifBoldItalic] [mySerifFontBoldItalic]
> \stoptypescript
> %\starttypescript [mySerifFont]
> %    \definetypeface [mySerifFont] [rm] [serif] [mySerifFont] [default]
> %\stoptypescript
>
> \starttypescript [sans] [mySansFont]
>     \definefontsynonym [mySansFontRegular] [name:Arial] [features=default]
>     \definefontsynonym [mySansFontItalic] [name:Arial Italic]
> [features=default]
>     \definefontsynonym [mySansFontBold] [name:Arial Bold] [features=default]
>     \definefontsynonym [mySansFontBoldItalic] [name:Arial Bold Italic]
> [features=default]
> \stoptypescript
> \starttypescript [sans] [mySansFont]
>     \setups[font:fallback:sans]
>     \definefontsynonym [Sans] [mySansFontRegular]
>     \definefontsynonym [SansItalic] [mySansFontItalic]
>     \definefontsynonym [SansBold] [mySansFontBold]
>     \definefontsynonym [SansBoldItalic] [mySansFontBoldItalic]
> \stoptypescript
> %\starttypescript [mySansFont]
> %    \definetypeface [mySansFont] [ss] [sans] [mySansFont] [default]
> %\stoptypescript
>
> \starttypescript[myFonts]
>     \definetypeface [mySerifFont] [rm] [serif] [mySerifFont] [default]
>     \definetypeface [mySansFont] [ss] [sans] [mySansFont] [default]
> \stoptypescript

\starttypescript[myFonts]
    \definetypeface [myFonts] [rm] [serif] [mySerifFont] [default]
    \definetypeface [myFonts] [ss] [sans] [mySansFont] [default]
\stoptypescript

You need the same name for both typefaces.

> \usetypescript[myFonts]
>
> \setupbodyfont[mySerifFont,12pt]            % this displays the correct font
> %\setupbodyfont[mySansFont,12pt]        % this displays the correct font

\setupbodyfont[myFonts]

> \definefont[myChapterFont][mySansFont sa 1.728]     % compile error at line
> 57 with (2) [and (1)]
> %\definefont[myChapterFont][Arial sa 1.728]               % this works with
> (1), compile error at line 57 with (2)
> %\definefont[myChapterFont][Sans sa 1.728]               % defaults to LM
> font with (1), compile error at line 57 with (2)
>
> %\setuphead[chapter][style=\myChapterFont]                      % (1)
> %\setuphead[chapter][style=\myFonts\myChapterFont]      % (2)
> %\setuphead[chapter][style=\tfc\mySansFont]                     % (3) this
> works
>
> \starttext
>
> \chapter{chapter test}      % line 57
>
> \section{section test}
>
> text test
>
> \stoptext
>
>
> Looking for further clues.
>
> Alan
>
> P.S. Resistance is futile Fontzi...I will assimilate you!

I will add to my todo list "Write a few lines about font installation
for XeTeX and LuaTeX and how to use them in style keys".

Regards,
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________


  reply	other threads:[~2008-07-18 15:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-16 19:18 Alan Stone
2008-07-16 23:14 ` Diego Depaoli
2008-07-16 23:23   ` Diego Depaoli
2008-07-17  6:30   ` Wolfgang Schuster
2008-07-17 15:39     ` Diego Depaoli
2008-07-18 15:16       ` Wolfgang Schuster
2008-07-18 21:22         ` Diego Depaoli
2008-07-19  4:49           ` Charles P. Schaum
2008-07-19 10:03             ` Alan Stone
2008-07-19 13:25               ` John Culleton
2008-07-21  6:38                 ` Wolfgang Schuster
2008-07-17  6:43 ` Wolfgang Schuster
2008-07-17 15:00   ` Alan Stone
2008-07-18 15:12     ` Wolfgang Schuster [this message]
2008-07-18 15:56       ` Olivier Guéry
2008-07-18 20:45       ` Alan Stone
2008-07-18 21:44         ` Andrea Valle
2008-07-17 11:32 ` Wolfgang Schuster
2008-07-20 11:13 Alan Stone
2008-07-21  6:29 ` Wolfgang Schuster
2008-07-21  7:26   ` Alan Stone

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=115224fb0807180812gf2c8055pc48cfee1d1253555@mail.gmail.com \
    --to=schuster.wolfgang@googlemail.com \
    --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).