ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Font woes
@ 2002-04-07  4:36 Idris Samawi Hamid
  2002-04-07 20:02 ` Idris Samawi Hamid
  0 siblings, 1 reply; 7+ messages in thread
From: Idris Samawi Hamid @ 2002-04-07  4:36 UTC (permalink / raw)


Dear folks,

I still can't get my Arabic fonts working. ConTeXt (omega format) keeps trying to load cmr12 instead. Also, setting up sizes is not clear to me.

I tried the following typescript:
=======================================================
%type-mtnaskhi.tex

\usetypescriptfile[type-buy]

\starttypescript [naskh] [mtnaskhi]
  \definefontsynonym [Mtnaskh-Roman]       [mtnaskh]  
  \definefontsynonym [Mtnaskh-Bold]        [mtnaskhb]  
  \definefontsynonym [Mtnaskh-Italic]      [mtnaskh] 
  \definefontsynonym [Mtnaskh-Bold-Italic] [mtnaskhb] 
\stoptypescript

\starttypescript [naskh] [mtnaskhi] [name]
  \usetypescript[serif][fallback]
  \definefontsynonym [Serif]           [Mtnaskh-Roman]
  \definefontsynonym [SerifBold]       [Mtnaskh-Bold]
  \definefontsynonym [SerifItalic]     [Mtnaskh-Italic]
  \definefontsynonym [SerifBoldItalic] [Mtnaskh-Bold-Italic]
\stoptypescript

\starttypescript [Mtnaskh]
  \definetypeface [MyMtnaskh] [rm] [naskh] [mtnaskhi] [default] 
\stoptypescript
===============================================================

I tried using this font as follows:
===============================================================
\usetypescriptfile[type-mtnaskhi]
\usetypescript[Mtnaskh]
\setupbodyfont[MyMtnaskh]

\starttext

<Arabic text here>

\stoptext
================================================================

Let me explain my situation. I have a font family, mtnaskhi, with 3 raw fonts: 

mtnaskh;
mtnaskhb;
mtnaskh8. 

The encoding is OT1. `mtnaskhi' is the complete family name.

These fonts constitute a ``naskh'' family analogous to a 
``roman'' or ``serif'' family in Latin. I want to use these as follows:

mtnaskh for main text greater than 9pt;
mtnaskh8 for main text smaller than 9pt (like footnotes)
mtnaskhb for bold text;

All other medium styles should be substituted by the main text fonts as dictated by size
All other bold styles should be substituted by the bold text font.
Each font should be scaled by 1.6. 

Put another way, I'm trying to translate the following NFSS code into typescripts:

\DeclareFontShape{OT1}{mtnaskhi}{m}{n}{
   <9-> [1.6] mtnaskh
   <-9> [1.6] mtnaskh8
}{}
\DeclareFontShape{OT1}{mtnaskhi}{bx}{n}{
   <-> [1.6] mtnaskhb
}{}

These fonts are already installed on my system and listed in config.ps and config for dvipdfm. Plain Omega and Lambda have worked fine up to now so the problem is not in my font installation.

What am I doing wrong? How do I set up my needed sizes (which I have not done in the above typescript).

Best wishes
Idris

==========================
Dr. Idris Samawi Hamid
Depatment of Philosophy
Colorado State University
Fort Collins, CO 80526


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

* Re: Font woes
  2002-04-07  4:36 Font woes Idris Samawi Hamid
@ 2002-04-07 20:02 ` Idris Samawi Hamid
  2002-04-10 14:46   ` Idris Samawi Hamid
  0 siblings, 1 reply; 7+ messages in thread
From: Idris Samawi Hamid @ 2002-04-07 20:02 UTC (permalink / raw)


Dear folks,

Here are two Gamma (context-omega) files which any of you can test right out of the box with a standard Omega distribution (1.15 is current and on the latest TeX-Live). Just compile the omega 
format as per Han's instructions: 

texexec --make --alone --tex=omega en

texexec --tex=omega om-test.tex

The two files are identical except that one (om-test.tex) uses typescripts and the other (om-test2.tex) uses \font from Plain. Use odvips (not dvips) or dvipdfm to view. 

om-test2.tex works and u can see the Arabic;
om-test.tex does not work; it substitutes cmr.

A question: The headline in om-test2.tex prints Arabic in the main body but uses cmr for the headline. How can I set the headline font using \font?

First the typescript. Two raw virtual fonts, omarab and omarabb. The encoding is OT1:
%==========================================
%type-omarabic.tex

\usetypescriptfile[type-buy]

\starttypescript [naskh] [omarabic]
  \definefontsynonym [Omarab-Roman]       [omarab]  
  \definefontsynonym [Omarab-Bold]        [omarabb]  
  \definefontsynonym [Omarab-Italic]      [omarab] 
  \definefontsynonym [Omarab-Bold-Italic] [omarabb] 
\stoptypescript

\starttypescript [naskh] [omarabic] [name]
  \usetypescript[serif][fallback]
  \definefontsynonym [Serif]           [Omarab-Roman]
  \definefontsynonym [SerifBold]       [Omarab-Bold]
  \definefontsynonym [SerifItalic]     [Omarab-Italic]
  \definefontsynonym [SerifBoldItalic] [Omarab-Bold-Italic]
\stoptypescript

\starttypescript [Omarab]
  \definetypeface [MyOmarab] [rm] [naskh] [omarabic] [default] 
\stoptypescript
%==========================================

Now om-test.tex
%==========================================
%om-test.tex
\pagedir TRT %
\bodydir TRT %
\textdir TRT %
\pardir TRT
\hoffset=-9cm

\usetypescriptfile[type-omarabic]
\usetypescript[Omarab]
\setupbodyfont[MyOmarab]

     \ocp\ArabUni=7arb2uni
     \ocp\UniCUni=uni2cuni
     \ocp\CUniArab=cuni2oar
     \ocplist\ArabicOCP=
     \addbeforeocplist 1 \ArabUni
     \addbeforeocplist 1 \UniCUni
     \addbeforeocplist 1 \CUniArab
     \nullocplist

\starttext%
\pushocplist \ArabicOCP

\raggedright \noindent qaAla: yaA jaAbir! `alayka biAlbayaAni wa
Alma`aAniy.

qaAla: qultu: wa maA AlbayaAnu wa Alma`aAniy?

qaAla: qaAla `aliyyuN (`): 'aammaA AlbayaAnu, fahuwa 'aan ta`rifa ALLaha
subHaAnahu; laysa kamithlihi shay||uN fata`buduhu wa laA tushriku bihi
shay'yaNA. 'ammaA Alma`aAniy, fanaHnu ma`aAniyhi: wa naHnu janbuhu, wa
yaduhu, wa lisaAnuhu, wa 'aamruhu, wa Hukmuhu, wa `ilmuhu, wa Haqquhu.
'iidhaA shi'ynaA, shaA||a ALLahu; wa yuriydu ALLahu maA nuriyduhu~...

\popocplist %
\stoptext
%==========================================

Finally, om-test2.tex:
%==========================================
%om-test2tex
\pagedir TRT %
\bodydir TRT %
\textdir TRT %
\pardir TRT
\hoffset=-9cm

%\usetypescriptfile[type-omarab]
%\usetypescript[Omarab]
%\setupbodyfont[MyOmarab]

\font\naskh=omarab at 14pt %
\naskh

     \ocp\ArabUni=7arb2uni
     \ocp\UniCUni=uni2cuni
     \ocp\CUniArab=cuni2oar
     \ocplist\ArabicOCP=
     \addbeforeocplist 1 \ArabUni
     \addbeforeocplist 1 \UniCUni
     \addbeforeocplist 1 \CUniArab
     \nullocplist

\starttext%
\pushocplist\ArabicOCP

\raggedright \noindent qaAla: yaA jaAbir! `alayka biAlbayaAni wa
Alma`aAniy.

qaAla: qultu: wa maA AlbayaAnu wa Alma`aAniy?

qaAla: qaAla `aliyyuN (`): 'aammaA AlbayaAnu, fahuwa 'aan ta`rifa ALLaha
subHaAnahu; laysa kamithlihi shay||uN fata`buduhu wa laA tushriku bihi
shay'yaNA. 'ammaA Alma`aAniy, fanaHnu ma`aAniyhi: wa naHnu janbuhu, wa
yaduhu, wa lisaAnuhu, wa 'aamruhu, wa Hukmuhu, wa `ilmuhu, wa Haqquhu.
'iidhaA shi'ynaA, shaA||a ALLahu; wa yuriydu ALLahu maA nuriyduhu~...

\popocplist%
\stoptext
%==========================================

I hope this helps u guys to help me find the problem. I am still trying to solve the size callibration problem as well.

>The encoding is OT1. `mtnaskhi' is the complete family name.
>
>These fonts constitute a ``naskh'' family analogous to a 
>``roman'' or ``serif'' family in Latin. I want to use these as follows:
>
>mtnaskh for main text greater than 9pt;
>mtnaskh8 for main text smaller than 9pt (like footnotes)
>mtnaskhb for bold text;
>
>All other medium styles should be substituted by the main text fonts as dictated by size
>All other bold styles should be substituted by the bold text font.
>Each font should be scaled by 1.6. 
>
>Put another way, I'm trying to translate the following NFSS code into typescripts:
>
>\DeclareFontShape{OT1}{mtnaskhi}{m}{n}{
>   <9-> [1.6] mtnaskh
>   <-9> [1.6] mtnaskh8
>}{}
>\DeclareFontShape{OT1}{mtnaskhi}{bx}{n}{
>   <-> [1.6] mtnaskhb
>}{}

Best wishes
Idris

==========================
Dr. Idris Samawi Hamid
Depatment of Philosophy
Colorado State University
Fort Collins, CO 80526


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

* Re: Font woes
  2002-04-07 20:02 ` Idris Samawi Hamid
@ 2002-04-10 14:46   ` Idris Samawi Hamid
  0 siblings, 0 replies; 7+ messages in thread
From: Idris Samawi Hamid @ 2002-04-10 14:46 UTC (permalink / raw)


Sorry to be a pest, but has anyone been able to look at the two test files I sent a few days ago? Again, they require nothing but a standard Omega distribution so any one can compile them. I really hope to get my own fonts working with 
ConTeXt so I can move on to really learning the system. But I just can't bear going back to PlainFSS.

Also, I could not fint type-buy in my ConTeXt distribution from TeX-Live from Sept.`01. Is it a new file?

Finally, how hard would it be to write a perl script that can translate a LaTeX FD file into a typescript file? I'd do it, but I don't know Perl:-) I think an fd2typescript utility would be extremely useful. Or at least a document explaining how to port a 
generic fd file to typescripts. (If I ever figure this out I'd be glad to write such a how-to). So many of us (I presume) are migrating from LaTeX so an explanation of typescript files in comparison/contrast with fd fileswould help us a lot. 

Thnx in advance and best wishes
Idris

=============================================
4/7/02 2:02:36 

>Dear folks,
>
>Here are two Gamma (context-omega) files which any of you can test right out of the box with a standard Omega distribution (1.15 is current and on the latest TeX-Live). Just compile the omega 
>format as per Han's instructions: 
:
:
>>Put another way, I'm trying to translate the following NFSS code into typescripts:
>>
>>\DeclareFontShape{OT1}{mtnaskhi}{m}{n}{
>>   <9-> [1.6] mtnaskh
>>   <-9> [1.6] mtnaskh8
>>}{}
>>\DeclareFontShape{OT1}{mtnaskhi}{bx}{n}{
>>   <-> [1.6] mtnaskhb
>>}{}

==========================
Dr. Idris Samawi Hamid
Depatment of Philosophy
Colorado State University
Fort Collins, CO 80526


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

* Re: Font woes
  2002-04-08  7:54   ` Hans Hagen
@ 2002-04-08 14:04     ` Idris Samawi Hamid
  0 siblings, 0 replies; 7+ messages in thread
From: Idris Samawi Hamid @ 2002-04-08 14:04 UTC (permalink / raw)
  Cc: ntg-context

4/8/02 1:54:19 AM, Hans Hagen <pragma@wxs.nl> wrote:

>when using omega, mak esure that you don't say --pdf or 
>\setupoutput[pdftex]; also instruct (o)dvips to use the outline fonts and 
>not the bitmaps

I'm using neither option; odvips and dvipdfm work fine in PlainOmega and Lambda. See my next mail with the two samples om-test amd om-test2. Why does it work with \font but not with 
typescripts? If u look at the log file in e.g., om-test.tex, u will see that cmr is called during the ConTeXt run before the odvips cycle. Also, look at the output of omtest.tex. Part of the typescript code 
gets printed verbatim. I must be doing something else wrong.

Best wishes
Idris
==========================
Dr. Idris Samawi Hamid
Depatment of Philosophy
Colorado State University
Fort Collins, CO 80526


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

* Re: Font woes
  2002-04-07 18:22 ` Idris Samawi Hamid
@ 2002-04-08  7:54   ` Hans Hagen
  2002-04-08 14:04     ` Idris Samawi Hamid
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2002-04-08  7:54 UTC (permalink / raw)
  Cc: ntg-context

At 12:22 PM 4/7/2002 -0600, Idris Samawi Hamid wrote:
>4/7/02 3:08:35 AM, "h+i" <na199@worldonline.de> wrote:
>
> >As pdftex (with context) uses his own psfonts.map (e.g
> >texfm/pdftex/config/psfonts.map) your ps-fonts should be mentioned there.
> >From your explanation below it is not clear if you have done this.
> >hh
>
>Thnx 4 the reply! However, I am not using the pdftex format but rather the 
>omega format. In any case, just to cover all bases, I added a map file to 
>pdftex.cfg and rebuilt the ls-R database. I still get
>cmr12. And I'm still not sure how to get my sizes callibrated.

when using omega, mak esure that you don't say --pdf or 
\setupoutput[pdftex]; also instruct (o)dvips to use the outline fonts and 
not the bitmaps

Hans

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                                   fall-back web server: 
www.pragma-ade.nl
-------------------------------------------------------------------------


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

* Re: Font woes
  2002-04-07  9:08 h+i
@ 2002-04-07 18:22 ` Idris Samawi Hamid
  2002-04-08  7:54   ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Idris Samawi Hamid @ 2002-04-07 18:22 UTC (permalink / raw)


4/7/02 3:08:35 AM, "h+i" <na199@worldonline.de> wrote:

>As pdftex (with context) uses his own psfonts.map (e.g 
>texfm/pdftex/config/psfonts.map) your ps-fonts should be mentioned there.
>From your explanation below it is not clear if you have done this.
>hh

Thnx 4 the reply! However, I am not using the pdftex format but rather the omega format. In any case, just to cover all bases, I added a map file to pdftex.cfg and rebuilt the ls-R database. I still get 
cmr12. And I'm still not sure how to get my sizes callibrated. 

Best wishes
Idris

==========================
Dr. Idris Samawi Hamid
Depatment of Philosophy
Colorado State University
Fort Collins, CO 80526


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

* Re: Font woes
@ 2002-04-07  9:08 h+i
  2002-04-07 18:22 ` Idris Samawi Hamid
  0 siblings, 1 reply; 7+ messages in thread
From: h+i @ 2002-04-07  9:08 UTC (permalink / raw)


As pdftex (with context) uses his own psfonts.map (e.g 
texfm/pdftex/config/psfonts.map) your ps-fonts should be mentioned there.
>From your explanation below it is not clear if you have done this.
hh

From:           	Idris Samawi Hamid <ishamid@attbi.com>
To: 	ntg-context@ntg.nl
Date sent:      	Sat, 06 Apr 2002 21:36:13 -0700
Subject:        	Font woes

> Dear folks,
> 
> I still can't get my Arabic fonts working. ConTeXt (omega format)
> keeps trying to load cmr12 instead. Also, setting up sizes is not
> clear to me.
> 
> I tried the following typescript:
> =======================================================
> %type-mtnaskhi.tex
> 
> \usetypescriptfile[type-buy]
> 
> \starttypescript [naskh] [mtnaskhi]
>   \definefontsynonym [Mtnaskh-Roman]       [mtnaskh]  
>   \definefontsynonym [Mtnaskh-Bold]        [mtnaskhb]  
>   \definefontsynonym [Mtnaskh-Italic]      [mtnaskh] 
>   \definefontsynonym [Mtnaskh-Bold-Italic] [mtnaskhb] 
> \stoptypescript
> 
> \starttypescript [naskh] [mtnaskhi] [name]
>   \usetypescript[serif][fallback]
>   \definefontsynonym [Serif]           [Mtnaskh-Roman]
>   \definefontsynonym [SerifBold]       [Mtnaskh-Bold]
>   \definefontsynonym [SerifItalic]     [Mtnaskh-Italic]
>   \definefontsynonym [SerifBoldItalic] [Mtnaskh-Bold-Italic]
> \stoptypescript
> 
> \starttypescript [Mtnaskh]
>   \definetypeface [MyMtnaskh] [rm] [naskh] [mtnaskhi] [default] 
> \stoptypescript
> ===============================================================
> 
> I tried using this font as follows:
> ===============================================================
> \usetypescriptfile[type-mtnaskhi]
> \usetypescript[Mtnaskh]
> \setupbodyfont[MyMtnaskh]
> 
> \starttext
> 
> <Arabic text here>
> 
> \stoptext
> ================================================================
> 
> Let me explain my situation. I have a font family, mtnaskhi, with 3
> raw fonts: 
> 
> mtnaskh;
> mtnaskhb;
> mtnaskh8. 
> 
> The encoding is OT1. `mtnaskhi' is the complete family name.
> 
> These fonts constitute a ``naskh'' family analogous to a 
> ``roman'' or ``serif'' family in Latin. I want to use these as
> follows:
> 
> mtnaskh for main text greater than 9pt;
> mtnaskh8 for main text smaller than 9pt (like footnotes)
> mtnaskhb for bold text;
> 
> All other medium styles should be substituted by the main text fonts
> as dictated by size All other bold styles should be substituted by the
> bold text font. Each font should be scaled by 1.6. 
> 
> Put another way, I'm trying to translate the following NFSS code into
> typescripts:
> 
> \DeclareFontShape{OT1}{mtnaskhi}{m}{n}{
>    <9-> [1.6] mtnaskh
>    <-9> [1.6] mtnaskh8
> }{}
> \DeclareFontShape{OT1}{mtnaskhi}{bx}{n}{
>    <-> [1.6] mtnaskhb
> }{}
> 
> These fonts are already installed on my system and listed in config.ps
> and config for dvipdfm. Plain Omega and Lambda have worked fine up to
> now so the problem is not in my font installation.
> 
> What am I doing wrong? How do I set up my needed sizes (which I have
> not done in the above typescript).
> 
> Best wishes
> Idris
> 
> ==========================
> Dr. Idris Samawi Hamid
> Depatment of Philosophy
> Colorado State University
> Fort Collins, CO 80526
> 
> 
> 


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

end of thread, other threads:[~2002-04-10 14:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-07  4:36 Font woes Idris Samawi Hamid
2002-04-07 20:02 ` Idris Samawi Hamid
2002-04-10 14:46   ` Idris Samawi Hamid
2002-04-07  9:08 h+i
2002-04-07 18:22 ` Idris Samawi Hamid
2002-04-08  7:54   ` Hans Hagen
2002-04-08 14:04     ` Idris Samawi Hamid

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