Please excuse this long post. I was/am fiddling with fonts, "probably the most complicated aspect of TeX," to quote Hans... I feel I'm almost there, but I still need some help and would be very grateful if anybody could give me a hint. Thanks to Giuseppe Bilotta's help, I managed to typeset classical Greek with the CB-Greek fonts. Everything works, the accents are in the right places etc., yet the original CB-Greek doesn't look very good in pdfs. I have a very beautiful Greek font that comes with the LaTeX "psgreek"-package; it works in LaTeX and is, according to the manual, encoded with the same map as CB-Greek (in LaTeX, the encoding is called lgrenc.def, but I couldn't find any useful imformation in that file). I wrote a typescriptfile to use it in ConTeXt. The font works, all the glyphs are there, as I can see with a \showfont, but they're not in the right slots, which means that it doesn't build the correct ligatures for displaying accents etc. I assume I need to write a new encoding file to reassign the glyphs to their new position. I'd be willing to do this by hand (there aren't too many of them, after all), but how do I go about that? What I have got about this font (it's called "GreekOxonia," and in my eyes, it's the most beautiful typeface that's out there for classical Greek): greeoxon.pfb greeoxon.sfd greeoxon.sfd~ greeoxon.afm greeoxon.tfm a map file psgreek.map and a couple of accompanying .vf, .ovf and .ofm-files (all of them containing just a few characters of gibberish when I try to open them). Can anybody give me a hint where I could start? Any help would be most appreciated! Best Thomas
Hi Thomas,
May be that I am not the right person to reply. Never the less I have
installed quite some fonts in ConTeXt.
As you show in your message, you have the pfb and afm files.
With afm2tfm you can generate a tfm file with the required encoding (Could
one use e.g. texnansi?)
By means of texfont you can generate the fontfiles needed for ConTeXt in the
required encoding including a mapfile which you can include in the
pdftex.cfg.
Willi
----- Original Message -----
From: "Thomas A.Schmitz"
Please excuse this long post. I was/am fiddling with fonts, "probably the most complicated aspect of TeX," to quote Hans... I feel I'm almost there, but I still need some help and would be very grateful if anybody could give me a hint. Thanks to Giuseppe Bilotta's help, I managed to typeset classical Greek with the CB-Greek fonts. Everything works, the accents are in the right places etc., yet the original CB-Greek doesn't look very good in pdfs. I have a very beautiful Greek font that comes with the LaTeX "psgreek"-package; it works in LaTeX and is, according to the manual, encoded with the same map as CB-Greek (in LaTeX, the encoding is called lgrenc.def, but I couldn't find any useful imformation in that file). I wrote a typescriptfile to use it in ConTeXt. The font works, all the glyphs are there, as I can see with a \showfont, but they're not in the right slots, which means that it doesn't build the correct ligatures for displaying accents etc. I assume I need to write a new encoding file to reassign the glyphs to their new position. I'd be willing to do this by hand (there aren't too many of them, after all), but how do I go about that? What I have got about this font (it's called "GreekOxonia," and in my eyes, it's the most beautiful typeface that's out there for classical Greek): greeoxon.pfb greeoxon.sfd greeoxon.sfd~ greeoxon.afm greeoxon.tfm a map file psgreek.map and a couple of accompanying .vf, .ovf and .ofm-files (all of them containing just a few characters of gibberish when I try to open them). Can anybody give me a hint where I could start? Any help would be most appreciated! Best Thomas
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Willi, thanks for your reply! The problem is: I do have proper tfm-files, and the font is installed properly (since it works). But given that classical (polytonic) Greek demands some unusual features, I think I will have to adapt the font by hand. On the /showfont map, for example, I can see that a certain "ligature" is in, say, slot 165. Combinations of accents [+ breathing] + vowel are produced by the ligature mechanisms (let's say that's the character for "alpha with acute accent and smooth breathing"). What I would need to do is: 1) tell TeX that the combination ">'a" should be considered a ligature 2) tell my driver that this ligature can be found in slot 165. Feasible? Or am I shooting for the impossible? Well, I got one step further and converted the tfm and vf-files into vp-files that I can read--and maybe edit, if only I knew how... The thing is, the font does work in LaTeX, so it shouldn't be impossible to make it work in ConTeXt, right? Best, Thomas
On Sat, 6 Sep 2003 18:13:21 +0200
Thomas A.Schmitz
What I would need to do is: 1) tell TeX that the combination ">'a" should be considered a ligature
in LaTeX this is implemented using some tricks (language support) from the 'babel' package. Thus, this has _nothing_ to do with fonts and their encoding. It is neither a remapping using virtual fonts nor a reencoding of fonts. It _is_ transliteration. Therefore, it has to be implemented in ConTeXt.
2) tell my driver that this ligature can be found in slot 165.
it's already done in the tfm and vf files Jens
Am Samstag, 06.09.03, um 17:49 Uhr (Europe/Zurich) schrieb Willi Egger:
With afm2tfm you can generate a tfm file with the required encoding (Could one use e.g. texnansi?)
No, texnansi encoding is a western european roman encoding. But I guess one could use a real greek encoding with texfont, perhaps lgr-tex (contains only numbers, I don't know what they mean) or one of the numerous kerkis encodings? (gpkerkis looks good) (It looks you could actually use Kerkis fonts; it's a greek Bookman.) But don't ask me more... ;-) Grüßlis vom Hraban! -- http://www.fiee.net/texnique/
Yes, I actually tried Kerkis, it may be appropriate for modern Greek, but I find it ugly for classical texts. When I do this texfont --encoding=gpkerkis --vendor=me --collection=Oxonia --makepath --install and try the font, I don't get any Greek glyphs - strange.
OK, another step (in the right direction?). lgr-tex is an encoding for monotoniko Greek (i.e. has only the acute accent, the only one used in moderne dimotiki Greek), so not suitable. However, it refers to a file of the CB-Greek family "cblig.mf," which contains just the information I was looking for - defines all the ligatures, like so: "ligtable ">": % smooth breathing "a" =: oct"202", "e" =: oct"342", "h" =: oct"232", "r" =: oct"374" I can actually understand what this file does: if TeX finds the combination >a, it will produce a ligature mapped to slot o202. Does this help me in any way? Is there a way I could use a similar table in ConTeXt? -- Thomas A. Schmitz Philologisches Seminar Universitaet Bonn Am Hof 1 e 53113 Bonn Tel.: 0228/73-7747 Fax: 0228/73-7748
Well, it's me again. I spent the entire weekend trying to set this up, but so far, I haven't had any real success. I tried a couple of things like different encodings with pfaedit, I tried texfont, fontinst, t1utils... I thought that defining the ligatures in a .vf-file would be the best approach. Well, it did work, but only kind of: I could create a .vpl-file via afm2tfm and edit it, introducing the ligatures I needed. These ligatures would then work as expected. The only problem was that when I recoded this .vpl to a .vf and a .tfm and installed the .tfm, it would miss a couple of characters--they were just gone (like uppercase D, G and P), their slots empty. When I actually installed the .vf-file in the "texmf/fonts/vf/"-folder, I would get no glyphs at all, sometimes a bunch of warnings about duplicate definitions. Please bear with me if I'm getting on your nerves--this my third or fourth attempt to use ConTeXt. I just love it, it's wonderful and makes so many things so easy. But every time, using Greek is the stumbling block for me. unfortunately, writing in classical Greek is part of my job, so if I can't make it work in acceptable quality, I will have to go back to LaTeX. So pretty please--can anybody help me? Or even point me to people with professional knowledge who might be able to help for a fee?
Hi Thomas, This matter is much more complicated than I thought in first instance. - I must admit, that am of no further help. I do hope, dat Hans is following this tread. He is the guru to get this matter moving. Cheers Willi
Willi, thanks for being supportive. In the meantime, I have taken another step: by using tftopl, I produced a .pl-file of my font and edited it. I inserted a "LIGTABLE" with ligature (and kerning) information. After using pltotf and using the new .tfm, I had partial success: I get a lot of the ligatures I want! However, a few problems remain: 1) The "space"-glyph has vanished. I assume it must somehow have been mismapped. Does anybody have an idea how I could remap this? 2) One Greek accent is called by using the "~"-character. However, I have no idea to which slot it is mapped; the same is true for the "|"-character. How can I find out? And, by what Giuseppe wrote me a while ago, I gather that I have to make at least the "|" inactive. Is this done with \catcode`|=\other ? I'm hopeful that these problems can be solved. And I am looking forward to that. I feel a lot like the monkey in a story by Wilhelm Busch: it has a coconut, it knows there must be something delicious inside, but it doesn't know how to reach it. that's the way i feel about context! Best Thomas
Monday, September 8, 2003 Thomas A.Schmitz wrote:
Willi, thanks for being supportive. In the meantime, I have taken another step: by using tftopl, I produced a .pl-file of my font and edited it. I inserted a "LIGTABLE" with ligature (and kerning) information. After using pltotf and using the new .tfm, I had partial success: I get a lot of the ligatures I want! However, a few problems remain: 1) The "space"-glyph has vanished. I assume it must somehow have been mismapped. Does anybody have an idea how I could remap this?
Can't help you here.
2) One Greek accent is called by using the "~"-character. However, I have no idea to which slot it is mapped; the same is true for the "|"-character. How can I find out? And, by what Giuseppe wrote me a while ago, I gather that I have to make at least the "|" inactive. Is this done with \catcode`|=\other ?
Yes, and you need to do the same for ~; or, you can use the = instead of the ~ for the circumflex accent. -- Giuseppe "Oblomov" Bilotta
On Mon, Sep 08, 2003 at 04:40:31PM +0200, Thomas A. Schmitz wrote:
Willi, thanks for being supportive. In the meantime, I have taken another step: by using tftopl, I produced a .pl-file of my font and edited it. I inserted a "LIGTABLE" with ligature (and kerning) information. After using pltotf and using the new .tfm, I had partial success: I get a lot of the ligatures I want! However, a few problems remain: 1) The "space"-glyph has vanished. I assume it must somehow have been mismapped. Does anybody have an idea how I could remap this?
TeX doesn't use a space glyph. Instead, there is a fontdimen space and there may be boundarychar kerns and ligatures to replace space kerns and -ligs. If you want more complete documentation: get a TeX source tree, run weave on pltotf.web or vptovf.web and compile the resulting TeX file. -- Siep Kroonenberg siep@elvenkind.com
Thanks again for helping. I'm happy to say that I'm almost home free. The trick was to go via .vpl-files and edit them. The missing glyphs were somewhere in the table, I could simply copy and paste them in the right position; I then added ligatures for all the accents/breathings etc and finally kerning information. I then used vptovf to produce a matching tfm, and everything worked as expected; even the "space" has micraculously reappeared. Strangely, when I put the resulting .vf-file into my "fonts/vf"-folder, TeX would go haywire; this means that I couldn't use any remapping in the fonts. I had to cut a few corners, it is just a "quick-and-dirty" fix, but it works!!! I've learnt more about fonts than I ever wanted, but I now have (almost) real control; I even managed to replace one character I didn't like with its counterpart from another font (and then edit this new character to perfection in pfaedit, a really amazing tool). One last (little) problem; maybe one of you has an idea: since I couldn't remap, I have trouble producing a single breathing in front of a capital letter. I helped myself by defining \define\<{\getglyph{greeoxon}{96}}, so I could at least use \
At 15:52 08/09/2003 +0200, you wrote:
Hi Thomas,
This matter is much more complicated than I thought in first instance. - I must admit, that am of no further help. I do hope, dat Hans is following this tread. He is the guru to get this matter moving.
sure, but this week i'm in dante+gutenberg meeting mode as well as project deadline mode 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 ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
participants (7)
-
Giuseppe Bilotta
-
Hans Hagen
-
Henning Hraban Ramm
-
Jens-Uwe Morawski
-
Siep Kroonenberg
-
Thomas A.Schmitz
-
Willi Egger