From: Mikael Persson <mickep@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Fourier in ConTeXt (was Fonts readily available in Context)
Date: Fri, 16 Jan 2009 13:02:12 +0100 [thread overview]
Message-ID: <d5fddde00901160402s65fadfeasfcf4fa42b18bd1a@mail.gmail.com> (raw)
In-Reply-To: <d5fddde00901152334q58af054dqc6f5d007e3e51a84@mail.gmail.com>
On Fri, Jan 16, 2009 at 8:34 AM, Mikael Persson <mickep@gmail.com> wrote:
> On Thu, Jan 15, 2009 at 6:37 PM, Aditya Mahajan <adityam@umich.edu> wrote:
>> On Thu, 15 Jan 2009, Mojca Miklavec wrote:
>>
>>> On Thu, Jan 15, 2009 at 2:11 PM, Mikael Persson wrote:
>>>>
>>>> On Wed, Jan 14, 2009 at 6:26 PM, Mojca Miklavec
>>>> <mojca.miklavec.lists@gmail.com> wrote:
>>>>>
>>>>> On Wed, Jan 14, 2009 at 3:54 PM, Mikael Persson wrote:
>>>>>>
>>>>>> Mojca, does it work both in mkii and mkiv for you?
>>>>>
>>>>> I only tested in mkii so far (I suspect that mkiv suffers from the
>>>>> lack of Utopia in proper format, so one would need to check
>>>>> typescripts).
>>>>>
>>>>> Mojca
>>>>
>>>> Thank you Mojca for your help!
>>>>
>>>> I'm also being a bit curious about the [tf] in
>>>>
>>>> \definemathsymbol [hat] [accent] [tf] ["2]
>>>>
>>>> In math-fou.tex I see
>>>> mi (Math Italics?)
>>>> sy (Symbols?)
>>>> ex (Extension?)
>>>> mr (Math Roman?)
>>>>
>>>> 2) I guess all [mr] (10 or so) in math-fou.tex safely can be changed to
>>>> [tf]?
>>>
>>> I would not just bet on it. I would try it first. If mr works, one
>>> should better leave mr, but I have no idea why it fails.
>>
>> The reason \hat is defined using tf is because the math font does not have
>> accents. This is the same thing with Euler, and last I checked (about a
>> months ago), Euler accents work perfectly in MKIV. So, in principle it
>> should work with Fourier also.
>>
>> I do not have time right now to look into it, maybe sometime next week.
>>
>>>> 3) Does anyone know what has to be done to get this working in mkiv?
>>>
>>> Hans, what's the strategy with non-unicode fonts, in particular
>>> Utopia? It doesn't come in otf format, but could still be used in both
>>> mkiv and XeTeX. Is there some type-something.tex foreseen for such
>>> fonts?
>>
>> Another possibility is to redistribute the fonts as otf. From what I
>> understand from the license (http://tug.ctan.org/tex-archive/fonts/utopia/)
>> it is ok to modify the fonts (ie change the format) as long as you do not
>> call the modified font utopia, and remove all references to Adobe. Are there
>> tools to convert type 1 to otf?
>>
>> Aditya
>
> Thanks Mojca and Aditya for your help. I just found out that if I change
>
> \definefontsynonym [MathRoman] [Utopia-Regular]
> to
> \definefontsynonym [MathRoman] [futr8t]
> in the typescript file, and define the math accents as:
>
> \def\grave{\mathaccent"7000}
> \def\acute{\mathaccent"7001}
> \def\hat{\mathaccent"7002}
> \def\tilde{\mathaccent"7003}
> \def\ddot{\mathaccent"7004}
> \def\mathring{\mathaccent"7006}
> \def\check{\mathaccent"7007}
> \def\breve{\mathaccent"7008}
> \def\bar{\mathaccent"7009}
> \def\dot{\mathaccent"700A}
>
> they all work (both in mkii and mkiv). Can someone explain how to
> convert these definitions to context versions, for example like
> \definemathsymbol [acute] [accent] [tf] ["1]?
>
> Best regards, Mikael
>
I thought I tested this before, but
\startmathcollection [fou]
\definemathsymbol [acute] [accent] [mr] ["1]
\definemathsymbol [grave] [accent] [mr] ["0]
\definemathsymbol [ddot] [accent] [mr] ["4]
\definemathsymbol [tilde] [accent] [mr] ["3]
\definemathsymbol [bar] [accent] [mr] ["9]
\definemathsymbol [breve] [accent] [mr] ["8]
\definemathsymbol [check] [accent] [mr] ["7]
\definemathsymbol [hat] [accent] [mr] ["2]
\definemathsymbol [dot] [accent] [mr] ["A]
\definemathsymbol [mathring] [accent] [mr] ["6]
\stopmathcollection
works as long as one has
\definefontsynonym [MathRoman] [futr8t]
and not
\definefontsynonym [MathRoman] [Utopia-Roman]% putr8a
or
\definefontsynonym [MathRoman] [futr8r]
or ...
It thus seems that type-fou.tex does not need any changes.
Below is a working type script:
%%%%%%%%% type-fourier.tex
\starttypescript [serif] [utopia]
\setups[font:fallback:serif]
\definefontsynonym [Serif] [Utopia-Regular]
\definefontsynonym [SerifItalic] [Utopia-Italic]
\definefontsynonym [SerifBold] [Utopia-Bold]
\definefontsynonym [SerifBoldItalic] [Utopia-BoldItalic]
\stoptypescript
\starttypescript [serif] [utopia]
\definefontsynonym [Utopia-Regular] [file:putr8a][features=default]
\definefontsynonym [Utopia-Italic] [file:putri8a][features=default]
\definefontsynonym [Utopia-Bold] [file:putb8a][features=default]
\definefontsynonym [Utopia-BoldItalic] [file:putbi8a][features=default]
\stoptypescript
\starttypescript [math] [fourier] [name]
\definefontsynonym [MathRoman] [futr8t]
\definefontsynonym [MathItalic] [futmii]
\definefontsynonym [MathSymbol] [futsy]
\definefontsynonym [MathExtension] [fourier-mex]
\loadmapfile[fourier.map]
\stoptypescript
\starttypescript [fourier,utopia]
\definetypeface [\typescriptone] [rm] [serif] [utopia] [default]
\definetypeface [\typescriptone] [ss] [sans] [modern]
[default][rscale=1.07]
\definetypeface [\typescriptone] [tt] [mono] [modern]
[default][rscale=1.07]
\definetypeface [\typescriptone] [mm] [math] [fourier]
[default][encoding=default]
\usemathcollection[fou]
\quittypescriptscanning
\stoptypescript
%%%%%%%%%%%%%%
And a working test file:
%%%%%%%% Test file
\usetypescriptfile[type-fourier]
\usetypescript[fourier][ec]
\setupbodyfont[fourier]
\enablemathcollection[fou]
\starttext
Test: acute $\acute{a}$ grave $\grave{a}$ ddot $\ddot{a}$ tilde
$\tilde{a}$ bar $\bar{a}$ breve $\breve{a}$ check $\check{a}$ hat
$\hat{a}$ dot $\dot{a}$ mathring $\mathring{a}$ widetilde
$\widetilde{ab}$.
\startformula
\hat{f}(x)=
\startcases
\NC x \MC x>0\NR
\NC -x \MC x<0\NR
\stopcases
\stopformula
\stoptext
%%%%%%%
Could this \enablemathcollection[fou] go somewhere else?
Best regards, Mikael
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2009-01-16 12:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-14 8:50 Mikael Persson
2009-01-14 12:16 ` Mojca Miklavec
2009-01-14 12:57 ` Mikael Persson
2009-01-14 13:38 ` Mojca Miklavec
2009-01-14 14:10 ` Mojca Miklavec
2009-01-14 14:54 ` Mikael Persson
2009-01-14 17:26 ` Mojca Miklavec
2009-01-15 13:11 ` Mikael Persson
2009-01-15 16:15 ` Mojca Miklavec
2009-01-15 17:37 ` Aditya Mahajan
2009-01-16 7:34 ` Mikael Persson
2009-01-16 12:02 ` Mikael Persson [this message]
2009-01-16 8:09 ` Yue Wang
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=d5fddde00901160402s65fadfeasfcf4fa42b18bd1a@mail.gmail.com \
--to=mickep@gmail.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).