ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Mojca Miklavec" <mojca.miklavec.lists@gmail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Cc: Jonathan Kew <jonathan_kew@sil.org>
Subject: Re: XeTeX and OpenType LM
Date: Fri, 2 Feb 2007 14:23:57 +0100	[thread overview]
Message-ID: <6faad9f00702020523i7f10b847j52a9bf8e74c2e634@mail.gmail.com> (raw)
In-Reply-To: <45C2F59E.1010804@wxs.nl>

On 2/2/07, Hans Hagen wrote:
> Mojca Miklavec wrote:
> > ... much much text .. begging for []'s ...
> >
> How about this ... no quotes in specs, only file: or name: in front of
> the name, and for xetex we default to filenames using file:

I would default to "name:"

> It means that existing defs need to be adapted, but this syntax is
> better than funny " [ ] etc and more extensible (i can intercept the
> prefixes in luatex and treat them accordingly)
>
> \unprotect
>
> \def\donoparsefontspec % #1 == \cs
>   {\edef\fontfile{\truefontname\somefontname}%
>    \ifx\fontfile\s!unknown \let\fontfile\defaultfontfile \fi
>    \checkfontfilename
>    \edef\lastfontname{\fontfile\somefontspec}%
>    \ifx\fontclass\empty
>      \expandafter\definefontlocal
>    \else
>      \expandafter\definefontglobal
>    \fi} % #1 == \cs
>
> \ifnum\contextmarkmode=4
>
>     \let\checkfontfilename\relax
>
> \else
>
>     \def\checkfontfilename
>       {\expandafter\docheckfontfilename\fontfile:\empty:\empty\relax}
>
>     \def\docheckfontfilename#1:#2:#3#4\relax
>       {\edef\temp{#1}%
>        \ifx\temp\v!file
>           \edef\fontfile{\fontfilefile{#2}}%
>        \else\ifx\temp\v!name
>           \edef\fontfile{\fontfilename{#2}}%
>        \else
>           \edef\fontfile{\fontfilesome{#2}}%
>        \fi\fi}
>
>     \def\fontfilename#1{"#1"}
>     \def\fontfilefile#1{"#1"}
>     \def\fontfilesome#1{"#1"}
>
>     \beginXETEX
>
>         \def\fontfilename#1{"#1"}
>         \def\fontfilefile#1{"[#1]"}
>         \def\fontfilesome#1{"[#1]"}
>
>     \endXETEX
>
> \fi
>
> \protect
>
> \starttext
>     \definefont
>         [blabla]
>         [name:Latin Modern Something]
>     \definefont
>         [blabla]
>         [file:texnansi-lmr10]
>     \blabla test
> \stoptext

Great!

I need to try to run these, but I like the syntax. Although it would
probably make sense to default to "name" (so: no brackets,
\def\fontfilesome#1{"#1"}) under XeTeX. Those fonts that come as .otf
are relatively rare and for those (I have Polish fonts in mind)
ConTeXt can provide ready typescripts with "file:" prefix. I assume
that for most users it would be an overhead having to write "name:"
for each single font that they want to use, and most such fonts are
probably installed on the system.

There is one more thing though. I'm taking these from Adam's notes on the wiki:

\definefontsynonym
    [DidotCaps]
    ['Didot:mapping=tex-text;
         Letter Case=Small Capitals;Ligatures=!Common Ligatures']
    [encoding=uc]

I have to check the state of special features in case of
[this/syntay/for/fonts.otf], but is it possible that the colon might
interfere with definitions such as the one above?

Now I need to actualy run your code on some examples ...

Mojca

  reply	other threads:[~2007-02-02 13:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-31  4:44 Mojca Miklavec
2007-01-31 11:09 ` Hans Hagen
2007-01-31 16:58   ` Mojca Miklavec
2007-01-31 17:16     ` Jonathan Kew
2007-01-31 19:12       ` Hans Hagen
2007-02-02  8:26     ` Hans Hagen
2007-02-02 13:23       ` Mojca Miklavec [this message]
2007-02-02 13:50         ` Hans Hagen
2007-02-02 15:40           ` Mojca Miklavec

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=6faad9f00702020523i7f10b847j52a9bf8e74c2e634@mail.gmail.com \
    --to=mojca.miklavec.lists@gmail.com \
    --cc=jonathan_kew@sil.org \
    --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).