[NTG-context] Two questions about use of system ttf fonts

2008-02-29 Thread Eythan Weg
Hi,

I am trying to use truetype fonts with mkiv.

When loading a font given a full path name like
this:

\font\test=/usr/share/fonts/truetype/freefont/FreeSans.ttf at 12pt
   
the log shows 

 report  load otf: loading: /usr/share/fonts/truetype/freefont//FreeSans.ttf
 report  load otf: enhance: before
 report  load otf: enhance: enrich
 report  load otf: enhance: registering tlig feature
 report  load otf: enhance: registering trep feature
 report  load otf: enhance: flatten
 report  load otf: flattening 'specifications' tables
 report  load otf: flattening 'anchor' tables
 report  load otf: flattening 'gpos' tables
 report  load otf: flattening 'gsub' tables
 report  load otf: enhance: analyze
 report  load otf: enhance: after
 report  load otf: replacing 'kerns' tables by 'mykerns' tables
 report  load otf: enhance: patch
 report  load otf: enhance: strip
 report  load otf: enhance: pack
 report  load otf: file size: 458648
 report  load otf: saving: in cache
 fonts  : resetting map file list
 {/usr/local/share/texmf/fonts/map/pdftex/context/original-empty.map}
 fonts  : using map file: original-base
 {/usr/local/share/texmf/fonts/map/pdftex/context/original-base.map}
 fonts  : using map file: lm-math
 {/usr/share/texmf/fonts/map/dvips/lm/lm-math.map}
 fonts  : using map file: lm-rm
 {/usr/share/texmf/fonts/map/dvips/lm/lm-rm.map}
 fonts  : using map file: original-ams-base
 {/usr/local/share/texmf/fonts/map/pdftex/context/original-ams-base.map}
 fonts  : using map file: original-ams-euler
 {/usr/local/share/texmf/fonts/map/pdftex/context/original-ams-euler.map}
 fonts  : using map file: original-public-lm
 {/usr/local/share/texmf/fonts/map/pdftex/context/original-public-lm.map} [1.1]
 systems: end file 11 at line 24
  )
 !luaTeX error (file FreeSans.ttf): cannot open OpenType font file for reading
  == Fatal error occurred, no output PDF file produced!


How can I tell what's wrong?



Defining

\font\test=FreeSans.ttf at 12pt

results in 

 error  define font: font with name FreeSans is not found
 error  define font: name: FreeSans, loading aborted
 ! Font \test=FreeSans at 12pt not loadable: metric data not found or bad.

while using this construction with luatex's plain format seems to work
(I assume some definition to register the font).

What does context need to find the font?

Thanks,  Eythan 



___
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
___


Re: [NTG-context] Two questions about use of system ttf fonts

2008-02-29 Thread Hans Hagen
Eythan Weg wrote:
 Hi,
 
 I am trying to use truetype fonts with mkiv.
 
 When loading a font given a full path name like
 this:
 
 \font\test=/usr/share/fonts/truetype/freefont/FreeSans.ttf at 12pt

do you need to provide the full path?

why not set OSFONTDIR?

OSFONTDIR=/usr/share/fonts/truetype/freefont//

or so

 the log shows 
 
  report  load otf: loading: /usr/share/fonts/truetype/freefont//FreeSans.ttf
  report  load otf: enhance: before
  report  load otf: enhance: enrich
  report  load otf: enhance: registering tlig feature
  report  load otf: enhance: registering trep feature
  report  load otf: enhance: flatten
  report  load otf: flattening 'specifications' tables
  report  load otf: flattening 'anchor' tables
  report  load otf: flattening 'gpos' tables
  report  load otf: flattening 'gsub' tables
  report  load otf: enhance: analyze
  report  load otf: enhance: after
  report  load otf: replacing 'kerns' tables by 'mykerns' tables
  report  load otf: enhance: patch
  report  load otf: enhance: strip
  report  load otf: enhance: pack
  report  load otf: file size: 458648
  report  load otf: saving: in cache
  fonts  : resetting map file list
  {/usr/local/share/texmf/fonts/map/pdftex/context/original-empty.map}
  fonts  : using map file: original-base
  {/usr/local/share/texmf/fonts/map/pdftex/context/original-base.map}
  fonts  : using map file: lm-math
  {/usr/share/texmf/fonts/map/dvips/lm/lm-math.map}
  fonts  : using map file: lm-rm
  {/usr/share/texmf/fonts/map/dvips/lm/lm-rm.map}
  fonts  : using map file: original-ams-base
  {/usr/local/share/texmf/fonts/map/pdftex/context/original-ams-base.map}
  fonts  : using map file: original-ams-euler
  {/usr/local/share/texmf/fonts/map/pdftex/context/original-ams-euler.map}
  fonts  : using map file: original-public-lm
  {/usr/local/share/texmf/fonts/map/pdftex/context/original-public-lm.map} 
 [1.1]
  systems: end file 11 at line 24
   )
  !luaTeX error (file FreeSans.ttf): cannot open OpenType font file for reading
   == Fatal error occurred, no output PDF file produced!
 
 
 How can I tell what's wrong?
 
 
 
 Defining
 
 \font\test=FreeSans.ttf at 12pt
 
 results in 
 
  error  define font: font with name FreeSans is not found
  error  define font: name: FreeSans, loading aborted
  ! Font \test=FreeSans at 12pt not loadable: metric data not found or bad.
 
 while using this construction with luatex's plain format seems to work
 (I assume some definition to register the font).

is there a valid tma file in font cache?

(otherwise send me the font an i can have a look)

-
   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
___


Re: [NTG-context] Two questions about use of system ttf fonts

2008-02-29 Thread Wolfgang Schuster
Hi Eythan,

i wrote a typescriptfile for the complete family, you try if it will
work for you.

For all toher interested people, you could download the fonts from the
following page (scroll down to the section Downloading fonts): 
http://www.gnu.org/software/freefont/

Wolfgang

On Fri, 29 Feb 2008 10:08:16 -0500
[EMAIL PROTECTED] (Eythan Weg) wrote:

 Hi,
 
 I am trying to use truetype fonts with mkiv.
 
 When loading a font given a full path name like
 this:
 
 \font\test=/usr/share/fonts/truetype/freefont/FreeSans.ttf at 12pt

 the log shows 
 
  report  load otf: loading: /usr/share/fonts/truetype/freefont//FreeSans.ttf
  report  load otf: enhance: before
  report  load otf: enhance: enrich
  report  load otf: enhance: registering tlig feature
  report  load otf: enhance: registering trep feature
  report  load otf: enhance: flatten
  report  load otf: flattening 'specifications' tables
  report  load otf: flattening 'anchor' tables
  report  load otf: flattening 'gpos' tables
  report  load otf: flattening 'gsub' tables
  report  load otf: enhance: analyze
  report  load otf: enhance: after
  report  load otf: replacing 'kerns' tables by 'mykerns' tables
  report  load otf: enhance: patch
  report  load otf: enhance: strip
  report  load otf: enhance: pack
  report  load otf: file size: 458648
  report  load otf: saving: in cache
  fonts  : resetting map file list
  {/usr/local/share/texmf/fonts/map/pdftex/context/original-empty.map}
  fonts  : using map file: original-base
  {/usr/local/share/texmf/fonts/map/pdftex/context/original-base.map}
  fonts  : using map file: lm-math
  {/usr/share/texmf/fonts/map/dvips/lm/lm-math.map}
  fonts  : using map file: lm-rm
  {/usr/share/texmf/fonts/map/dvips/lm/lm-rm.map}
  fonts  : using map file: original-ams-base
  {/usr/local/share/texmf/fonts/map/pdftex/context/original-ams-base.map}
  fonts  : using map file: original-ams-euler
  {/usr/local/share/texmf/fonts/map/pdftex/context/original-ams-euler.map}
  fonts  : using map file: original-public-lm
  {/usr/local/share/texmf/fonts/map/pdftex/context/original-public-lm.map} 
 [1.1]
  systems: end file 11 at line 24
   )
  !luaTeX error (file FreeSans.ttf): cannot open OpenType font file for reading
   == Fatal error occurred, no output PDF file produced!
 
 
 How can I tell what's wrong?
 
 
 
 Defining
 
 \font\test=FreeSans.ttf at 12pt
 
 results in 
 
  error  define font: font with name FreeSans is not found
  error  define font: name: FreeSans, loading aborted
  ! Font \test=FreeSans at 12pt not loadable: metric data not found or bad.
 
 while using this construction with luatex's plain format seems to work
 (I assume some definition to register the font).
 
 What does context need to find the font?
 
 Thanks,  Eythan 
 
 
 
 ___
 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
 ___
\usetypefile[freefont]

\usetypescript[freefont]
\setupbodyfont[freefont]

\def\Example{ABC abc 123\space}

\starttext

\rm \Example \bf \Example \it \Example \bi \Example

\tf\ss \Example \bf \Example \it \Example \bi \Example

\tf\tt \Example \bf \Example \it \Example \bi \Example

\stoptext
\starttypescript[serif][freeserif]

\definefontsynonym[Serif]   [FreeSerif-Regular]   [features=default]
\definefontsynonym[SerifBold]   [FreeSerif-Bold]  [features=default]
\definefontsynonym[SerifItalic] [FreeSerif-Italic][features=default]
\definefontsynonym[SerifSlanted][FreeSerif-Italic][features=default]
\definefontsynonym[SerifBoldItalic] [FreeSerif-BoldItalic][features=default]
\definefontsynonym[SerifBoldSlanted][FreeSerif-BoldItalic][features=default]

\stoptypescript

\starttypescript[sans][freesans]

\definefontsynonym[Sans]   [FreeSans-Regular]   [features=default]
\definefontsynonym[SansBold]   [FreeSans-Bold]  [features=default]
\definefontsynonym[SansItalic] [FreeSans-Italic][features=default]
\definefontsynonym[SansSlanted][FreeSans-Italic][features=default]
\definefontsynonym[SansBoldItalic] [FreeSans-BoldItalic][features=default]
\definefontsynonym[SansBoldSlanted][FreeSans-BoldItalic][features=default]

\stoptypescript

\starttypescript[mono][freemono]

\definefontsynonym[Mono]   [FreeMono-Regular]   [features=default]
\definefontsynonym[MonoBold]   [FreeMono-Bold]  [features=default]
\definefontsynonym[MonoItalic] [FreeMono-Italic][features=default]
\definefontsynonym[MonoSlanted][FreeMono-Italic][features=default]

[NTG-context] Font question

2008-02-29 Thread Marcin Borkowski
Hi all!

I'm going to start using ConTeXt; I've been planning to do so for a few
years, but now I finally have Internet access at home, so it's easier
for me to look things up in the wiki (or ask here;)).

I have two questions.  The first one is connected with fonts.  I can't
understand ConTeXt's font mechanism, which seems way too complicated for
me; could anyone just tell me how I can switch to, e.g., Antykwa
Poltawskiego (I'm Polish, so I'd like to use it;)) or, say, Pagella?  Of
course, I'd also like to be able to typeset Polish texts with them; will

\enableregime[utf-8]
\mainlanguage[pl]

be enough (apart, of course, from adapting ConTeXt to Polish typography
customs, like dots after chapter numbers etc.)?

I think that that's what the wiki lacks: a beginner's guide on _using_
fonts (not _installing_ them or _messing_;) with them).  If someone
enlightens me on this, I could write something on the wiki about it.

And the second, a bit philosophical question: the official manual is
not so new.  How do I learn ConTeXt best?  I mean, are changes to the
user interface since 2001 so big that I could run into troubles using
the manual?  Or are there some changes which make something
easier/possible which was difficult/impossible at the time or writing
the manual - how do I learn about these?

And last but not least - Hans, thanks for such a great TeX macro
package!

Yours

-- 
Marcin Borkowski (http://mbork.faculty.fmcs.amu.edu.pl)

It is impossible to split a cube into two cubes, a fourth power into
two fourth powers and so on.  I've found a remarkable proof of this
fact, but unfortunately it's too long to fit into the signature.
___
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
___


Re: [NTG-context] Font question

2008-02-29 Thread Hans Hagen
Marcin Borkowski wrote:
 Hi all!
 
 I'm going to start using ConTeXt; I've been planning to do so for a few
 years, but now I finally have Internet access at home, so it's easier
 for me to look things up in the wiki (or ask here;)).
 
 I have two questions.  The first one is connected with fonts.  I can't
 understand ConTeXt's font mechanism, which seems way too complicated for
 me; could anyone just tell me how I can switch to, e.g., Antykwa
 Poltawskiego (I'm Polish, so I'd like to use it;)) or, say, Pagella?  Of
 course, I'd also like to be able to typeset Polish texts with them; will

\usetypescriptfile[type-gyr]
\usetypescript[palatino][qx]

\setupbodyfont[palatino,10pt]

 \enableregime[utf-8]
 \mainlanguage[pl]

 be enough (apart, of course, from adapting ConTeXt to Polish typography
 customs, like dots after chapter numbers etc.)?

that should be set up already (\mainlanguage does that)

 I think that that's what the wiki lacks: a beginner's guide on _using_
 fonts (not _installing_ them or _messing_;) with them).  If someone
 enlightens me on this, I could write something on the wiki about it.

most free fonts that ship with tex live are already set up (and you can 
make combinations of them, which is what typefaces is about)

it mostly bpild down to choosing a proper font encoding (qx in your case)

 And the second, a bit philosophical question: the official manual is
 not so new.  How do I learn ConTeXt best?  I mean, are changes to the
 user interface since 2001 so big that I could run into troubles using
 the manual?  Or are there some changes which make something
 easier/possible which was difficult/impossible at the time or writing
 the manual - how do I learn about these?

no changes to the user interface, only additional features (often 
discussed in dedicated manuals)

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
___


Re: [NTG-context] Font question

2008-02-29 Thread Marcin Borkowski
Dnia Fri, Feb 29, 2008 at 09:54:46PM +0100, Hans Hagen napisa#322;(a):
 Marcin Borkowski wrote:
  Hi all!
  
  I'm going to start using ConTeXt; I've been planning to do so for a few
  years, but now I finally have Internet access at home, so it's easier
  for me to look things up in the wiki (or ask here;)).
  
  I have two questions.  The first one is connected with fonts.  I can't
  understand ConTeXt's font mechanism, which seems way too complicated for
  me; could anyone just tell me how I can switch to, e.g., Antykwa
  Poltawskiego (I'm Polish, so I'd like to use it;)) or, say, Pagella?  Of
  course, I'd also like to be able to typeset Polish texts with them; will
 
 \usetypescriptfile[type-gyr]
 \usetypescript[palatino][qx]
 
 \setupbodyfont[palatino,10pt]
 

Thanks a lot - it works!

But...

1) when I substituted pagella for palatino, it stopped working;

2) and I still don't understand what's going on...

I assume that \usetypescriptfile takes one argument, the name of the
file with definitions.  I assume that \usetypescript somehow defines a
typescript - but the syntax is unclear to me...  Finally, \setupbodyfont
seems clear - it actually chooses given font.  Am I right?

(Sorry for being a nuisance - I just want to understand what's
happening, at least approximately, so that I can switch to whatever
fonts I'd like to, assuming they are quite standard and hence
pre-configured in ConTeXt.)

  \enableregime[utf-8]
  \mainlanguage[pl]
 
  be enough (apart, of course, from adapting ConTeXt to Polish typography
  customs, like dots after chapter numbers etc.)?
 
 that should be set up already (\mainlanguage does that)
 

Well, dots after chapter numbers didn't appear (this should be easy to
do with \setuphead etc., however).  I'd have to experiment a bit to see
what exactly is done by \mainlanguage.  Or is there some place I could
read about it?

  I think that that's what the wiki lacks: a beginner's guide on _using_
  fonts (not _installing_ them or _messing_;) with them).  If someone
  enlightens me on this, I could write something on the wiki about it.
 
 most free fonts that ship with tex live are already set up (and you can 
 make combinations of them, which is what typefaces is about)
 
 it mostly bpild down to choosing a proper font encoding (qx in your case)
 

I see.  Still, there are amost no clues in the wiki on how to use
them...  I hope to grasp it some day and explain on the wiki then;).
That makes my conscience more clear about asking you again;).

  And the second, a bit philosophical question: the official manual is
  not so new.  How do I learn ConTeXt best?  I mean, are changes to the
  user interface since 2001 so big that I could run into troubles using
  the manual?  Or are there some changes which make something
  easier/possible which was difficult/impossible at the time or writing
  the manual - how do I learn about these?
 
 no changes to the user interface, only additional features (often 
 discussed in dedicated manuals)

OK.  That sounds good, especially that I'm planning to do some XML
typesetting using ConTeXt soon - I hope that example.pdf will be enough
for my purposes;).

You see, I'm a kind of guy who has nothing against being said RTFM;
but I couldn't understand the documentation on fonts...  But I don't
want to give up, and when I know what's going on I'll be happy to
explain it somewhere in the wiki, partially for others and partially for
myself, in case I forget something;)...

 
 Hans
 

Thanks a lot for your help!

-- 
Marcin Borkowski (http://mbork.faculty.fmcs.amu.edu.pl)

Jezus żyje NAPRAWDĘ.
A Ty?
___
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
___


Re: [NTG-context] Font question

2008-02-29 Thread Marcin Borkowski
Dnia Fri, Feb 29, 2008 at 11:57:30PM +0100, Hans Hagen napisa#322;(a):
 Marcin Borkowski wrote:
 
  1) when I substituted pagella for palatino, it stopped working;
 
 pagella has no typescripts, as long as gyre is not finished, we overload 
   the traditional fonts (font file remapping)
 
  2) and I still don't understand what's going on...
  
  I assume that \usetypescriptfile takes one argument, the name of the
  file with definitions.  I assume that \usetypescript somehow defines a
 
 no, it filters ... see mfonts.pdf
 
  typescript - but the syntax is unclear to me...  Finally, \setupbodyfont
  seems clear - it actually chooses given font.  Am I right?
 
 inded, in this case, it selects a typeface (grep for palatino and ou 
 will find a typeface definition)
 

Thanks for your prompt answers, Hans!  Things are starting to become
clear to me, although there is much to be understood...  I'll try to
write something on the wiki soon; hopefully this will clarify things to
other newcomers;).

  OK.  That sounds good, especially that I'm planning to do some XML
  typesetting using ConTeXt soon - I hope that example.pdf will be enough
  for my purposes;).
 
 better consider switching to luatex/context mkiv then -)
 

Well, I'm a bit afraid of its experimental status..


 
 Hans
 
Greets,

-- 
Marcin Borkowski (http://mbork.faculty.fmcs.amu.edu.pl)

Najkrótszy dowcip matematyczny:
Obierzmy epsilon ujemne.
___
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
___


Re: [NTG-context] Font question

2008-02-29 Thread Idris Samawi Hamid
Hi,

On Fri, 29 Feb 2008 17:17:23 -0700, Marcin Borkowski  
[EMAIL PROTECTED] wrote:

 better consider switching to luatex/context mkiv then -)


 Well, I'm a bit afraid of its experimental status..

Don't be, its bark is worse than its bite... I use it for production  
purposes (opentype, bidirectionality, otp/ovf...).

Best wishes
Idris

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

___
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
___