analyzing type-otf.tex
(1) Shouldn't these typescripts get splitted?: from \starttypescript [serif] [adventor,bonum,cursor,heros,pagella,schola,termes] to \starttypescript [serif] [bonum,pagella,schola,termes] \starttypescript [sans] [adventor,heros] \starttypescript [mono] [cursor] plus \starttypescript [calligraphy] [chorus] and from \starttypescript [serif] [pagella,termes,bonum,schola,chorus] [name] to \starttypescript [serif] [pagella,termes,bonum,schola] [name] \starttypescript [calligraphy] [chorus] [name] (2) This seems wrong to me (i.e. I don't understand it): \starttypescript [serif] [adventor,bonum,cursor,heros,pagella,schola,termes] \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Regular] [file:texgyre\typescriptthree\typescriptprefix{f:\typescripttwo}- regular] [features=default] That defines e.g. TeXGyrePagella-Regular --> file:texgyre???pagella- regular Why is there \typescriptthree without a third parameter of the typescript? And what file means "file:texgyre\typescriptthree"? I thought, "file:" should be followed by a proper filename like "{n: \typescripttwo}-Regular"? Are the first and second parameters swapped? (3) I get (maybe from that): kpathsea: Illegal fontname `texgyrename,default,ec,specialschola- regular': contains ','! Font \*gyr- mix12ptrmtfrm*:=texgyrename,default,ec,specialschola-regular at 12.0pt not loadable: Metric (TFM) file or installed font not found. This is my setup: \usetypescriptfile [type-otf] \usetypescriptfile [type-urw] \starttypescript [fiee] [gyr-mix] \definetypeface [gyr-mix] [rm] [serif] [schola] [default] \definetypeface [gyr-mix] [ss] [sans] [urw-grotesk-narrow] [default] [encoding=ec] \stoptypescript \usetypescript [fiee][gyr-mix] \setupbodyfont [gyr-mix,rm,8pt] Where's my error? Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
Am 2008-04-06 um 13:35 schrieb Henning Hraban Ramm:
(2) This seems wrong to me (i.e. I don't understand it):
\starttypescript [serif] [adventor,bonum,cursor,heros,pagella,schola,termes] \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Regular] [file:texgyre\typescriptthree\typescriptprefix{f:\typescripttwo}- regular] [features=default]
Works for me if I just leave out \typescriptthree ! Here's my working setup, including a PostScript font: \usetypescriptfile [type-otf2] % with change mentioned above \usetypescript [schoolbook][uc] \starttypescript [sans] [urw-grotesk] % PostScript name / file name (in texmf tree) / instead of an encoding \definefontsynonym [URWGroteskT-LighNarr] [file:u004242t] [features=default] \definefontsynonym [URWGroteskT-MediNarr] [file:u004244t] [features=default] \definefontsynonym [URWGroteskT-LighNarrObli] [file:u004262t] [features=default] \definefontsynonym [URWGroteskT-MediNarrObli] [file:u004264t] [features=default] \stoptypescript \starttypescript [sans] [urw-grotesk] %[name] \definefontsynonym [Sans] [URWGroteskT-LighNarr] \definefontsynonym [SansItalic] [URWGroteskT-LighNarrObli] \definefontsynonym [SansBold] [URWGroteskT-MediNarr] \definefontsynonym [SansBoldItalic][URWGroteskT-MediNarrObli] \definefontsynonym [SansSlanted] [SansItalic] \definefontsynonym [SansBoldSlanted] [SansBoldItalic] \stoptypescript \starttypescript [fiee] [mix] \definetypeface [mix] [rm] [serif] [schola] [default] %[encoding= \defaultencoding] \definetypeface [mix] [ss] [sans] [urw-grotesk] [default] [encoding=uc] \stoptypescript \usetypescript [fiee][mix] \setupbodyfont [mix,rm,8pt]
Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
Hello Hraban, thanks for pointing this out. To Hans: the \typescriptthree indeed needs to go out of those definitions (line 300 in type-otf). To Hraban: encoding=uc has *zero* effect. To be honest - I doubt that you will be able to extract any more than (theoretical limit of) 256 glyphs from the Type1 font with XeTeX - character slots and font glyphs are in one-to-one correlation, so I doubt that you can access the glyphs outside of those 256 slots (unless you make tfm & map files, but that's probably the reason why one wants to use XeTeX - to get rid of that encoding mess). So: I guess that Latin-1 works, but encoding=uc is ignored anyway. type-xtx contains quite some "uc" leftovers, but I'm not sure if "fixing" them is a wise idea or not (backward compatibility). Mojca On Sun, Apr 6, 2008 at 2:37 PM, Henning Hraban Ramm wrote:
Am 2008-04-06 um 13:35 schrieb Henning Hraban Ramm:
(2) This seems wrong to me (i.e. I don't understand it):
\starttypescript [serif] [adventor,bonum,cursor,heros,pagella,schola,termes] \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Regular] [file:texgyre\typescriptthree\typescriptprefix{f:\typescripttwo}- regular] [features=default]
Works for me if I just leave out \typescriptthree !
Here's my working setup, including a PostScript font:
\usetypescriptfile [type-otf2] % with change mentioned above \usetypescript [schoolbook][uc]
\starttypescript [sans] [urw-grotesk] % PostScript name / file name (in texmf tree) / instead of an encoding \definefontsynonym [URWGroteskT-LighNarr] [file:u004242t] [features=default] \definefontsynonym [URWGroteskT-MediNarr] [file:u004244t] [features=default] \definefontsynonym [URWGroteskT-LighNarrObli] [file:u004262t] [features=default] \definefontsynonym [URWGroteskT-MediNarrObli] [file:u004264t] [features=default] \stoptypescript
\starttypescript [sans] [urw-grotesk] %[name] \definefontsynonym [Sans] [URWGroteskT-LighNarr] \definefontsynonym [SansItalic] [URWGroteskT-LighNarrObli] \definefontsynonym [SansBold] [URWGroteskT-MediNarr] \definefontsynonym [SansBoldItalic][URWGroteskT-MediNarrObli] \definefontsynonym [SansSlanted] [SansItalic] \definefontsynonym [SansBoldSlanted] [SansBoldItalic] \stoptypescript
\starttypescript [fiee] [mix] \definetypeface [mix] [rm] [serif] [schola] [default] %[encoding= \defaultencoding] \definetypeface [mix] [ss] [sans] [urw-grotesk] [default] [encoding=uc] \stoptypescript \usetypescript [fiee][mix] \setupbodyfont [mix,rm,8pt]
Am 2008-04-07 um 12:58 schrieb Mojca Miklavec:
To Hraban: encoding=uc has *zero* effect. To be honest - I doubt that you will be able to extract any more than (theoretical limit of) 256 glyphs from the Type1 font with XeTeX - character slots and font glyphs are in one-to-one correlation, so I doubt that you can access the glyphs outside of those 256 slots (unless you make tfm & map files, but that's probably the reason why one wants to use XeTeX - to get rid of that encoding mess). So: I guess that Latin-1 works, but encoding=uc is ignored anyway.
Oh? I thought uc encoding would magically enhance my type1 fonts with full unicode range... ;-) Thanks for the clarification - I wasn't sure if I'd need "uc", but since it worked this way, I left it there. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
On Mon, Apr 7, 2008 at 8:22 PM, Henning Hraban Ramm
Am 2008-04-07 um 12:58 schrieb Mojca Miklavec:
To Hraban: encoding=uc has *zero* effect. To be honest - I doubt that you will be able to extract any more than (theoretical limit of) 256 glyphs from the Type1 font with XeTeX - character slots and font glyphs are in one-to-one correlation, so I doubt that you can access the glyphs outside of those 256 slots (unless you make tfm & map files, but that's probably the reason why one wants to use XeTeX - to get rid of that encoding mess). So: I guess that Latin-1 works, but encoding=uc is ignored anyway.
Oh? I thought uc encoding would magically enhance my type1 fonts with full unicode range... ;-)
It just used to map \eacute (and similar) to the proper Unicode glyph. With pdfTeX that mapping depends on font encoding, so it has to be specified. With XeTeX and LuaTeX unicode encoding is now applied automatically. That's much better since now even \font\a="low-level-font-loading" \a \eacute works OK, which wasn't the case one year ago. Mojca
On Mon, Apr 7, 2008 at 8:22 PM, Henning Hraban Ramm wrote:
Oh? I thought uc encoding would magically enhance my type1 fonts with full unicode range... ;-)
I almost forgot ... to be honest, I wanted to say: "LuaTeX does exactly that", but then I have remembered that you have explicitely asked not to mention any LuaTeX benefits to you any more (at least until next TeX Live comes out) ... :) Mojca PS: I didn't mean it seriously with internet connection in Bohinj - that's why there were smilies next to the remark :)
On Tue, Apr 8, 2008 at 12:50 AM, Mojca Miklavec
On Mon, Apr 7, 2008 at 8:22 PM, Henning Hraban Ramm wrote:
Oh? I thought uc encoding would magically enhance my type1 fonts with full unicode range... ;-)
I almost forgot ... to be honest, I wanted to say: "LuaTeX does exactly that", but then I have remembered that you have explicitely asked not to mention any LuaTeX benefits to you any more (at least until next TeX Live comes out) ... :)
This is indeed possible with LuaTeX because you could create a virtual font and use any other character from another font with more characters but there is no font with the complete unicode range, unicode support more signs as you could use in one OpenType/TrueType font. Wolfgang
2008/4/8, Wolfgang Schuster
On Tue, Apr 8, 2008 at 12:50 AM, Mojca Miklavec
wrote: On Mon, Apr 7, 2008 at 8:22 PM, Henning Hraban Ramm wrote:
Oh? I thought uc encoding would magically enhance my type1 fonts with full unicode range... ;-) I almost forgot ... to be honest, I wanted to say: "LuaTeX does exactly that", but then I have remembered that you have explicitely asked not to mention any LuaTeX benefits to you any more (at least until next TeX Live comes out) ... :) This is indeed possible with LuaTeX because you could create a virtual font and use any other character from another font with more characters but there is no font with the complete unicode range, unicode support more signs as you could use in one OpenType/TrueType font.
Please, don't take me dumber than I am. There's a smiley after my naive remark. It's great if luaTeX can access all available glyphs of a font (and that's really another reason to switch), and I guess it will also continue to combine accents and base characters for undefined glyphs, but of course it can't "invent" new glyphs. Most good Type1 fonts contain the range of Latin-1 and Mac-Roman, and if I'll be able to access that, it's great. I already started to combine several freeware fonts into OpenType (i.e. if there are e.g. Western, CE and alternate/expert fonts). But I guess that's only one of my "few" projects that stall until they're needed... Regarding luaTeX: Even if I can just include rsync into my daily update script to stay up-to-date on binaries (thanks for pointing that out!), I get a bad feeling if I see lots of threads on this list that show that luaTeX seems to have still some basic problems... On the other hand when I started using ConTeXt I did it for some features (grid setting!) even though it was a very much moving target. Greetlings, Hraban
On Tue, Apr 8, 2008 at 9:11 AM, Henning Hraban Ramm
2008/4/8, Wolfgang Schuster
: On Tue, Apr 8, 2008 at 12:50 AM, Mojca Miklavec
wrote: On Mon, Apr 7, 2008 at 8:22 PM, Henning Hraban Ramm wrote:
Oh? I thought uc encoding would magically enhance my type1 fonts with full unicode range... ;-) I almost forgot ... to be honest, I wanted to say: "LuaTeX does exactly that", but then I have remembered that you have explicitely asked not to mention any LuaTeX benefits to you any more (at least until next TeX Live comes out) ... :) This is indeed possible with LuaTeX because you could create a virtual font and use any other character from another font with more characters but there is no font with the complete unicode range, unicode support more signs as you could use in one OpenType/TrueType font.
Please, don't take me dumber than I am. There's a smiley after my naive remark.
I never meant this :-(
It's great if luaTeX can access all available glyphs of a font (and that's really another reason to switch), and I guess it will also continue to combine accents and base characters for undefined glyphs, but of course it can't "invent" new glyphs.
But you could use them from another font as fallback, not the best idea but possible. And no, you can't access all glyphs from a font, it is easy to to print the vertical forms from CJK punctuation with XeTeX but the LuaTeX output is nonsense.
Most good Type1 fonts contain the range of Latin-1 and Mac-Roman, and if I'll be able to access that, it's great.
I already started to combine several freeware fonts into OpenType (i.e. if there are e.g. Western, CE and alternate/expert fonts). But I guess that's only one of my "few" projects that stall until they're needed...
Regarding luaTeX: Even if I can just include rsync into my daily update script to stay up-to-date on binaries (thanks for pointing that out!), I get a bad feeling if I see lots of threads on this list that show that luaTeX seems to have still some basic problems... On the other hand when I started using ConTeXt I did it for some features (grid setting!) even though it was a very much moving target.
Wolfgang PS: I used your manuals to start with ConTeXt and never thought of you as a dumb user and this wasn't meant to critize you, the only thing I wanted to say it is still possible not not only a joke.
Mojca Miklavec wrote:
On Mon, Apr 7, 2008 at 8:22 PM, Henning Hraban Ramm wrote:
Oh? I thought uc encoding would magically enhance my type1 fonts with full unicode range... ;-)
I almost forgot ... to be honest, I wanted to say: "LuaTeX does exactly that", but then I have remembered that you have explicitely asked not to mention any LuaTeX benefits to you any more (at least until next TeX Live comes out) ... :)
actually, if you load a type one font (assuming that the afm is present), you can use features like compose=yes which will try to create missing characters using virtual font technology (mkiv tries to avoid using tfm files, although for math we still need them) 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 -----------------------------------------------------------------
Mojca Miklavec wrote:
Hello Hraban,
thanks for pointing this out.
To Hans: the \typescriptthree indeed needs to go out of those definitions (line 300 in type-otf).
hm, can you post the line? i have this \starttypescript [serif] [adventor,bonum,cursor,heros,pagella,schola,termes]
To Hraban: encoding=uc has *zero* effect. To be honest - I doubt that you will be able to extract any more than (theoretical limit of) 256 glyphs from the Type1 font with XeTeX - character slots and font glyphs are in one-to-one correlation, so I doubt that you can access the glyphs outside of those 256 slots (unless you make tfm & map files, but that's probably the reason why one wants to use XeTeX - to get rid of that encoding mess). So: I guess that Latin-1 works, but encoding=uc is ignored anyway.
in mkiv no encodings are used, although when an encoding is specicified, some trickery takes place, for instance: texnansi-whatever becomes whatever and so, i.e. the encoding is removed and internally fonts are remapped onto unicode.
type-xtx contains quite some "uc" leftovers, but I'm not sure if "fixing" them is a wise idea or not (backward compatibility).
i dunno either ... this may date from the time that not that many open type fonts were around, so we may consider dropping it (i.e. we kind of assume that xetex users use open type) 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 -----------------------------------------------------------------
On Tue, Apr 8, 2008 at 10:13 AM, Hans Hagen wrote:
Mojca Miklavec wrote:
Hello Hraban,
thanks for pointing this out.
To Hans: the \typescriptthree indeed needs to go out of those definitions (line 300 in type-otf).
hm, can you post the line? i have this
300-311 (301-310), this are the fixed ones, but probably broken across lines: \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Regular] [file:texgyre\typescriptprefix{f:\typescripttwo}-regular] [features=default] \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Italic] [file:texgyre\typescriptprefix{f:\typescripttwo}-italic] [features=default] \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Bold] [file:texgyre\typescriptprefix{f:\typescripttwo}-bold] [features=default] \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldItalic] [file:texgyre\typescriptprefix{f:\typescripttwo}-bolditalic] [features=default] \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Caps] [file:texgyre\typescriptprefix{f:\typescripttwo}-regular] [features=oldstyle] \definefontsynonym [\typescriptprefix{n:\typescripttwo}-ItalicCaps] [file:texgyre\typescriptprefix{f:\typescripttwo}-italic] [features=oldstyle] \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldCaps] [file:texgyre\typescriptprefix{f:\typescripttwo}-bold] [features=oldstyle] \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldItalicCaps] [file:texgyre\typescriptprefix{f:\typescripttwo}-bolditalic] [features=oldstyle] \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Slanted] [\typescriptprefix{n:\typescripttwo}-Italic] [features=default] \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldSlanted] [\typescriptprefix{n:\typescripttwo}-BoldItalic] [features=default]
type-xtx contains quite some "uc" leftovers, but I'm not sure if "fixing" them is a wise idea or not (backward compatibility).
i dunno either ... this may date from the time that not that many open type fonts were around, so we may consider dropping it (i.e. we kind of assume that xetex users use open type)
There are definitions like this one: \starttypescript[sans][arial][uc] \definefontsynonym[Arial] [name:Arial] [features=default] \definefontsynonym[ArialItalic] [name:Arial Italic] [features=default] \definefontsynonym[ArialBold] [name:Arial Bold] [features=default] \definefontsynonym[ArialBoldItalic][name:Arial Bold Italic][features=default] \stoptypescript It just predefines some (mostly Mac) typescripts. Some of those typescripts might be usable in luaTeX as well. I have no idea how many people have ever used \usetypescript[arial][uc] [uc] could be removed, but if these lines are deleted, the documents will be broken (which is probably true for quite some XeTeX documents from past which used the old notation). And on the other hand, the definitions could be made more generic (to be usable in LuaTeX as well). Mojca To Hraban: oh, I did not understand you joke at first :-) Now I see what you were trying to say with "extending the font to the full unicode range" :-) And sure enough - LuaTeX doesn't do that either. What I meant was - in afm files you have: C 235 ; WX 355 ; N ordmasculine ; B 38 369 317 710 ; C 241 ; WX 791 ; N ae ; B 45 -10 741 460 ; C 245 ; WX 283 ; N dotlessi ; B 75 -10 263 450 ; C 248 ; WX 328 ; N lslash ; B 20 -10 308 700 ; C 249 ; WX 497 ; N oslash ; B 55 -39 442 489 ; C 250 ; WX 792 ; N oe ; B 55 -10 742 460 ; C 251 ; WX 488 ; N germandbls ; B 80 -10 448 710 ; C -1 ; WX 620 ; N afii10017 ; B 10 0 610 700 ; C -1 ; WX 626 ; N afii10020 ; B 100 0 576 700 ; C -1 ; WX 626 ; N afii10050 ; B 100 0 576 770 ; C -1 ; WX 685 ; N afii10018 ; B 100 -10 625 700 ; C -1 ; WX 685 ; N afii10046 ; B 100 -10 625 700 ; C -1 ; WX 745 ; N afii10044 ; B 10 -10 685 700 ; C -1 ; WX 957 ; N afii10045 ; B 100 -10 857 700 ; C -1 ; WX 685 ; N afii10019 ; B 100 -10 625 710 ; C -1 ; WX 626 ; N afii10052 ; B 100 0 576 880 ; And there is probably no way for XeTeX to access afiiXXXXX, whatever that is, while LuaTeX tries to guess the unicode point from the glyph name and uses that one when available. But - I will stop talking about LuaTeX, as I have promised you already in the last email.
Mojca Miklavec wrote:
300-311 (301-310), this are the fixed ones, but probably broken across lines:
ok, fixed
To Hraban: oh, I did not understand you joke at first :-) Now I see what you were trying to say with "extending the font to the full unicode range" :-) And sure enough - LuaTeX doesn't do that either.
at some point we can start thinking of defining virtual font collections 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 -----------------------------------------------------------------
Am 2008-04-08 um 13:41 schrieb Hans Hagen:
To Hraban: oh, I did not understand you joke at first :-) Now I see what you were trying to say with "extending the font to the full unicode range" :-) And sure enough - LuaTeX doesn't do that either.
Sorry, I should know since a few years that my jokes aren't understandable... ;-) (I tend to joke with my father about details of grammar and constantly quote lyrics of unknown songs...)
at some point we can start thinking of defining virtual font collections
Would be cool! I'm working occasionally on a songbook that contains a Russian song, and I'd like to print the original text in cyrillic (even if I can hardly read it). I've everything in UTF-8, so it would be great if ConTeXt could change the font automatically or language-dependent. I still didn't try anything with that, though, maybe it's easy - the base font is Century Schoolbook (because that's LilyPond's default font and it works well for a songbook), and if I use XeTeX/luaTeX with TeXGyre Schola, it should just work. (Or don't you think?) Ok, maybe I don't even need virtual font collections... Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
participants (4)
-
Hans Hagen
-
Henning Hraban Ramm
-
Mojca Miklavec
-
Wolfgang Schuster